《OneRank: Unified Transformer-Native Ranking Architecture for Multi-Task Recommendation》
多任务学习(Multi-task learning: MTL)在推荐系统中至关重要,能够实现 diverse user feedback 之间的互补的学习(complementary learning)。尽管现代工业实践已从 DNN 转向以 Transformer 为中心的架构,以增强 sequence modeling 能力和 scaling 能力,但它们仍然将 feature encoding 与 multi-task prediction 解耦,将 Transformer 视为任务无关的编码器(task-agnostic encoder)。这种设计从根本上限制了性能和 scalability,原因在于:
(1):在 heterogeneous task objectives 下造成信息瓶颈(information bottleneck)。
(2):引入梯度干扰,导致跷跷板现象(seesaw phenomenon)。
(3):强制发生数据流转换(dataflow transition),即 attention-based 的、context-adaptive 的 representation learning 被转换为 static feed-forward task prediction,且 information read–write dynamics 不兼容。
在本文中,我们提出 OneRank,一种 Transformer 原生的 multi-task ranking 框架,消除了 encoder–predictor separation,并同时为 forward representation learning 和 backward optimization 引入了 task-private channels,实现了 task-specialized learning,同时最小化任务间干扰(inter-task interferences)。
在前向传播中,OneRank 通过 task-conditioned information selection、candidate–aware contextualization 和 controlled cross-task interaction,以自底向上的方式学习 task-specific representations。
在反向传播中,cross-task gradient detachment 将 task-private parameter updates 与 shared knowledge extraction modules 隔离,防止负向迁移(negative transfer)。
最后,我们用基于 dynamic matching 的评分公式替换静态的 task-specific MLP scorers,实现 context-aware personalized ranking。
通过将 multi-task reasoning pathways 内化到 Transformer stack 中,OneRank 建立了一种具有 unified modeling and scalable computation design 的新架构范式。在大规模工业数据集上的大量离线和在线实验表明,OneRank 在多个任务上显著优于 SOTA 的基线方法,在保持计算效率的同时大幅提升了 ranking 效果。
多任务学习(Multi-task learning: MTL)已成为现代推荐系统中事实上的范式(《Multi-task learning for recommender system》、《Multi-task deep recommender systems: A survey》、《Advances and challenges of multi-task learning method in recommender systems: A survey》),其中对 dense-but-noisy and sparse-yet-informative feedback 进行联合建模,以捕获 user preferences 的互补方面。早期的深度学习推荐模型(DLRM)(《Entire space multi-task model: An effective approach for estimating post-click conversion rate》、《Entire space multi-task modeling via post-click behavior decomposition for conversion rate prediction》、《A multi-task learning framework for product ranking with BERT》、《Large-scale causal approaches to debiasing post-click conversion rate estimation with multi-task learning》)主要通过两种方式利用 task dependencies:
(i):通过 structured knowledge transfer 进行显式的 dependency modeling,如 ESMM(《Entire space multi-task model: An effective approach for estimating post-click conversion rate》)、ESCM(《ESCM2: Entire space counterfactual multi-task model for post-click conversion rate estimation》)、AITM(《Modeling the sequential dependence among audience multi-step conversions with multi-task learning in targeted display advertising》)和 ResFlow(《Residual Multi-Task Learner for Applied Ranking》)。
(ii):通过 dynamic routing 和 expert balancing 机制进行隐式的 knowledge sharing,如 MMoE(《Modeling task relationships in multi-task learning with multi-gate mixture-of-experts》)和 PLE(《Progressive layered extraction (ple): A novel multi-task learning (mtl) model for personalized recommendations》)。
受大语言模型进展的启发,近期工作(《Longer: Scaling up long sequence modeling in industrial recommenders》、《Onepiece: Bringing context engineering and reasoning to industrial cascade ranking system》、《Mtgr: Industrial-scale generative recommendation framework in meituan》、《Climber: Toward efficient scaling laws for large recommendation models》、《OneTrans: Unified Feature Interaction and Sequence Modeling with One Transformer in Industrial Recommender》、《Rankmixer: Scaling up ranking models in industrial recommenders》)已转向以 Transformer 为中心的架构,以利用其强大的 sequence modeling 能力和良好的 scaling behavior。
然而,这一 transition 并不构成根本性的架构变革。现有方法在很大程度上保留了 encoder–predictor 设计,可以形式化为
representation
task-specific predictors。
这一范式具有以下三个根本性局限:
首先,shared representation task-agnostic information bottleneck,其中 task-specific signals 与 shared knowledge 纠缠在一起,失去了其身份。将 Transformer 增加了编码容量,但并未改变这一结构性的约束,使得下游 predictors fused embedding 中解耦 task-specific information。这种架构选择严重限制了模型在 pipeline 早期学习 task-specific representations 的能力,迫使复杂的 disentanglement 发生在 prediction 阶段,而建模能力通常在 prediction 阶段受限。
其次,shared-bottom architectures 容易产生跷跷板现象(《Metabalance: improving multi-task recommendations via adapting gradient magnitudes of auxiliary tasks》),即 shared parameters 上的 conflicting gradients 可能改善一个任务而降低其他任务。这是因为 task-agnostic bottleneck task-specific optimization 方向,这个 optimization 是通过
第三,encoder–predictor separation 强制发生根本性的 dataflow 和 design pattern 转换,其中 context-adaptive learning 被移交给 static feed-forward task predictors。具体而言,
Transformer 通过 attention 执行迭代式的、上下文相关的 information routing。
而 DNN-based predictors 则寻求静态的、全局非线性的决策边界(decision boundary),适应 dynamic user context 的能力有限。
这种设计范式的错配破坏了 end-to-end task reasoning 和 coherent computation scaling。
为了解决这些局限,我们提出 OneRank,一种 Transformer 原生的 multi-task ranking 框架,通过将 multi-task reasoning 内化到 Transformer stack 本身来消除 encoder–predictor split。
在前向传播中,OneRank 以自底向上的方式在 task-shared pathways 之外构建 task-private channels:
在 input level,具有相互不可见性的 task-specific tokens 实现早期 specialization。
在 intermediate level,candidate-aware contextualization 通过 situational descriptors 来聚合 cross-candidate signals。
在 prediction level,controlled cross-task relational attention 在有收益时选择性地注入 domain-specific task dependencies。
在反向传播中,OneRank 采用 strategic gradient detachment 来阻断通过 attention 的 cross-task gradient,将 task-specific parameter updates 与 shared components 隔离,有效地将 cross-task attention 转变为 read-only memory 从而用于 knowledge transfer。
在预测时,OneRank 用 dynamic matching-based formulation 替换 static global MLP scorers,其中 task-aware global representations 通过内积相似度直接与 context-conditioned candidate embeddings 进行匹配。
这种统一设计在不引入额外架构组件的情况下实现了 context-aware 的和 task-adaptive 的 ranking。
总之,我们的贡献如下:
我们识别了 Transformer-based MTL recommenders 中的关键局限,并提出了 OneRank,一种统一框架,它在 Transformer 原生设计中内化了 multi-task reasoning。
我们设计了一种自底向上的、task-aware 的计算范式,支持 task specialization、task-wise global representation with contextualization、controlled cross-task interaction 、以及 stable optimization,缓解了 information bottleneck 和任务间梯度干扰(inter-task gradient interference)。
我们用 Transformer 原生的 matching 公式替换了 static MLP-based prediction heads,在一致的 representation space 内实现了 context-aware and task-adaptive ranking。
在大规模工业数据集上的大量离线和在线 A/B 测试实验表明,OneRank 在效果和效率上均显著优于 SOTA 的基线方法。
我们的工作与推荐系统中的 multi-task learning 和 Transformer-based ranking architectures 密切相关。我们简要回顾代表性工作。
Multi-Task Learning for Recommendation:Multi-Task Learning 已成为现代推荐系统中联合建模 diverse user behaviors 的关键(《A contrastive sharing model for multi-task recommendation》、《Multi-task learning for recommendation over heterogeneous information network》、《Multitask mixture of sequential experts for user activity streams》、《Mixture of virtual-kernel experts for multi-objective user profile modeling》)。现有方法主要通过两种范式来利用 task dependencies。
第一种范式侧重于通过 structured knowledge transfer 进行 explicit dependency modeling。
ESMM(《Entire space multi-task model: An effective approach for estimating post-click conversion rate》)利用 CTR 和 CVR 之间的条件关系(conditional relationship)来解决 data sparsity 问题,而 ESCM (《ESCM2: Entire space counterfactual multi-task model for post-click conversion rate estimation》)通过反事实推理(counterfactual reasoning)进一步改进。
AITM(《Modeling the sequential dependence among audience multi-step conversions with multi-task learning in targeted display advertising》)和 ResFlow(《Residual Multi-Task Learner for Applied Ranking》)分别通过 attention-based adaptive transfer and residual connections 扩展了这一范式。
然而,这些方法依赖 predefined task structures 或启发式的迁移规则,限制了适应性。
第二种范式侧重于通过 dynamic routing 机制进行 implicit knowledge sharing。
MMoE(《Modeling task relationships in multi-task learning with multi-gate mixture-of-experts》)引入具有 task-specific gating 的 mixture-of-experts,而 SNR(《Snr: Sub-network routing for flexible parameter sharing in multi-task learning》)和 PLE(《Progressive layered extraction (ple): A novel multi-task learning (mtl) model for personalized recommendations》)提出具有 shared and task-specific experts 的 progressive layered extraction。
OnePiece(《Onepiece: Bringing context engineering and reasoning to industrial cascade ranking system》)排序模型通过 reasoning tokens 连接多个任务,但仍遵循 encoder-predictor separation 和 MLP-based scoring。
尽管具有灵活性,这些方法将 features 压缩为 task-agnostic shared representations,造成 information bottlenecks 和 gradient conflicts,同时缺乏大规模部署的 inherent scaling 机制。
Transformer-Based Ranking:受大语言模型的启发,近期工作探索了用于 ranking 的 Transformer。
KuaiFormer(《KuaiFormer: Transformer-Based Retrieval at Kuaishou》)侧重于 long-sequence modeling,而 Climber(《Climber: Toward efficient scaling laws for large recommendation models》)处理 heterogeneous sequences。
包括 HHFT (《HHFT: Hierarchical Heterogeneous Feature Transformer for Recommendation Systems》)、MTGR(《Mtgr: Industrial-scale generative recommendation framework in meituan》)、OneTrans(《OneTrans: Unified Feature Interaction and Sequence Modeling with One Transformer in Industrial Recommender》)和 HyFormer(《HyFormer: Revisiting the Roles of Sequence Modeling and Feature Interaction in CTR Prediction》)在内的统一架构在单一 Transformer 框架内联合建模 feature interactions 和 sequential patterns。
然而,这些方法保留了传统的 encoder-predictor 范式 Transformer encoder 产生 task-agnostic representations MLP-based task towers。这种设计引入了三个局限:
(1):shared bottleneck predictors 解缠(disentangle)冲突的 task requirements。
(2):shared parameters 上的 gradient conflicts 导致跷跷板现象。
(3):从 attention-based encoding 到 static MLP scoring 的架构转换阻止了 end-to-end context-aware ranking 并造成计算瓶颈(computational bottlenecks)。
相比之下,OneRank 通过 task-specific tokens with mutual invisibility、candidate-aware contextualization、strategic gradient detachment、以及 dynamic matching-based scoring,将 multi-task reasoning 内化到统一的Transformer 架构中,实现了优越的 scaling 和稳定的 multi-task optimization。
在本节中,我们介绍 OneRank,一种 Transformer 原生的 multi-task ranking 框架,它将 multi-task reasoning 内化到Transformer 架构本身,消除了传统的 encoder-predictor split task-shared pathways 之外构建 task-private channels,在 multiple architectural levels 实现 task specialization,同时保持有益的 knowledge sharing。
我们按如下方式组织方法论:
我们首先描述如何将 heterogeneous inputs 结构化为统一的 token sequence representation。
为了实现 early task specialization 和缓解 gradient conflicts,我们引入具有相互不可见性的 task-specific token injection,在 input level 为每个任务分配 dedicated parameters。
然后我们设计 candidate-aware contextualization,通过 situational descriptors 来聚合 cross-candidate signals,弥合 training-serving gap。
为了实现 controlled cross-task knowledge transfer,我们提出灵活的 cross-task relational attention,具有 strategic gradient detachment 和 configurable masking strategies。
最后,我们提出 joint optimization objectives。
我们在以下小节中详细阐述每个组件。OneRank 的架构如 Figure 1 、Figure 2 所示。

注意:下图错误。在左上侧 的K/V 部分,应该是:左边蓝色的①②,右边红色的①②。因为相同的颜色才是同一种任务。这个 MHCA 表示:给定 task candidates 的 representations,以 SD 为 query 从而抽取 task representation。

遵循已有范式(《Onepiece: Bringing context engineering and reasoning to industrial cascade ranking system》),我们采用 structured tokenization 策略来组织 heterogeneous inputs。我们的方法将 diverse input modalities 转换为 a unified token sequence representation,实现 sequential patterns 和 feature interactions 的有效联合建模。
Interaction History (IH):我们按时间顺序组织 user behavioral sequences 为 interaction。为了捕获 temporal dynamics 和 evolving preferences,我们用可学习的 positional encodings interaction:
其中 embedding 函数,embedding 维度。
完整的 interaction history sequence 表示为
Preference Anchoring (PA):受大语言模型中检索增强生成(retrieval-augmented generation: RAG)(《Retrieval-augmented generation for large language models》、《A comprehensive survey of retrieval-augmented generation (rag): Evolution, current landscape and future directions》、《Retrieval-augmented generation for ai-generated content: A survey》)的启发,我们用外部知识增强 user interaction history。具体而言,我们引入 Preference Anchors,包含多个 retrieved sequences domain knowledge)动态选择而来。
注意,这里
个 retrieved sequences是针对单个样本。即,每个样本在构造inputs时动态检索/选择出来的条序列。
对于 personalized search,我们检索与当前 query 相关的 top-clicked and top-purchased item sequences。
论文并未说明如何从这些
top-clicked and top-purchased item sequences切分出个序列。这里令人疑惑。 可能的方式包括:
按行为类型切:
top-clicked序列、top-purchased序列分别作为不同anchors,。 按类目(或品牌):当前
query下不同类目(或品牌)的点击/购买序列,为类目(或品牌)数量。
对于 recommendation,我们选择历史上 high-engagement sequences 作为补充信号。
high-engagement sequences可以理解为:用户历史上高参与度/高互动行为构成的物品序列。但论文没有给出精确定义。通常可能包括:高点击序列、购买序列、加购物车序列、互动序列(收藏、分享、点赞、评论) 等等。但是,如何从这些序列中切分出
个序列?这里也令人疑惑。
每个序列 boundary tokens 来封装:
其中:
retrieved sequences 的数量。
learnable tokens。
Preference Anchoring的序列之内如何排序、序列之间如何排序,论文都没有提到。
Candidate-Task Token Groups:对于 candidate set candidate item token group,包含 candidate embedding task-specific tokens。task tokens candidates 之间共享的 learnable parameters,其中每个 task-specific query template。对于每个 candidate task tokens,形成 a candidate-task group:
注意,虽然 task token parameters candidate groups 之间共享,但每个 group 在 encoding 过程中通过 structured attention masking 独立操作,允许 task tokens 能够通过对不同 candidate embeddings shared user context 执行注意力机制,提取 candidate-specific task representations。
一个
candidate set包含个 candidates,那么就有:其中:
就是 ,它在所有 candidates上共享,。但是 不能 attend到。
task token之间互不可见,即:不能 attend到, 。 也就是,
只能对 shared user context和执行 attend。
Unified Token Sequence:final input 将 shared user context 与所有 candidate-task groups 拼接:
其中:
这种组织方式自然地将 task-shared pathways(user context)与 task-private channels(task-specific tokens)分开,便于高效的 attention masking 和并行计算。
为了实现 early task specialization 和缓解 shared-bottom architectures 中的跷跷板现象,我们在 input level 引入具有相互不可见性的 task-specific token injection。与依赖 shared representations shared task-specific token templates 注入每个 candidate group,通过 structured attention 机制实现独立的 task-specific feature extraction。
Structured Attention Mask:为了确保 task-specific representation learning,我们构建一个 structured attention mask task tokens 之间的相互不可见性,同时保持 shared user context 的可见性:
Causal User Context:user context(tokens 遵循 causal attention 进行时间建模,其中每个位置只能关注自身及其之前的位置。
注意,
,因为 在 之后,因此 可以 attend到的所有 tokens,但是无法 attend到的任何 token。
Candidate Group Isolation:每个 group group single-user multiple-candidate parallelization。Tokens 可以 attend:
user context 中的所有 tokens(带 causal masking)。
同一 group 内的 candidate embedding
自身(self-attention)。
Task Token Mutual Invisibility: 即使在同一 candidate group 内,来自不同任务的 task tokens 也相互不可见。具体而言,group task token 只能 attend user context (with causal masking)、candidate embedding group 中的其他 task tokens。
形式上,设 token user context 中的 sequential position,设 candidate group task token(从 shared parameter token positions mask 定义为:
Transformer Encoding:我们应用 masked Multi-Head Self-Attention (MHSA) with residual connections and layer normalization,以获得更好的训练稳定性:
其中:layer 的索引。
encoding 之后,我们通过从每个 candidate group 中选择相应 task token 的 output 来提取 task-specific representations:
其中:candidate task task-relevant features。
尽管所有 candidate groups 共享相同的 task token parameters task token 通过 attend 不同的 candidate embeddings shared user context 中整合 candidate-specific signals,产生不同的 representations early task specialization。
传统的 point-wise scoring 存在 training-serving gap:在孤立样本上训练好的模型无法捕获 serving 时存在的 cross-candidate dependencies。我们通过 candidate-aware contextualization 来解决这一问题,通过 situational descriptors 聚合 cross-candidate signals。
Situational Descriptors (SD):我们定义 Situational Descriptors contextual signals,包括用户人口统计信息(user demographics)、query information、以及 session metadata(例如 time、location)。这作为 aggregation 的 contextual anchor。
SD不包含用户的行为序列。这是将静态的信息注入到candidate item。
Task-Specific Cross-Candidate Aggregation: 对于每个 task task-specific parameters 来变换 SD 并聚合candidate information 。具体而言,我们使用 task-specific 投影函数 situational descriptor:
其中
然后我们采用 task-specific Multi-Head Cross-Attention (MHCA)(《Attention is all you need》)来聚合 candidate-aware global information :
事实上,这个公式是:
其中:
task task-specific multi-head cross-attention。
task task-wise global representation,在整个 candidate set 上聚合。
这种设计通过 independent parameter sets 来显式地解耦 task-specific information flows,确保每个任务在捕获 cross-candidate competitive dynamics 的同时保持自己的 aggregation pathway。
编码了所有 candidate在task中的全局信息,有点类似于 list-wise information。
为了实现 controlled cross-task knowledge transfer,同时尊重 domain-specific dependencies,我们设计了具有 strategic gradient detachment 的灵活的 cross-task relational attention。与采用 fixed task tower structures 的传统方法不同,我们的框架允许 configurable information flow patterns。
Cross-Task Attention with Strategic Gradient Detachment:我们组织从 candidate-aware contextualization 获得的 task representations configurable cross-task attention mask multi-head self-attention:
其中,任务
这是为了建模任务之间的依赖关系。
为了在允许 forward knowledge transfer 的同时防止反向梯度干扰(backward gradient interference),我们采用 strategic gradient detachment。具体而言,我们自定义 cross-task attention的反向算子(backward operator),仅允许对角梯度流(diagonal gradient flow),同时阻断非对角梯度(off-diagonal gradients)。在反向传播过程中,计算任务 attention computation 中分离来自 attended tasks optimizing 任务 inter-task gradient conflicts),同时保留有益的 forward information transfer,将 cross-task attention 转变为 read-only memory 从而用于 knowledge transfer。
然后我们应用 residual connection 和 layer normalization:
.
Dynamic Matching-Based Scoring:我们通过带残差连接的前馈网络来 refine representations:
与无论上下文如何都应用 fixed transformations 的 static MLP-based scoring 不同,我们通过 inner product similarity 来计算 task-candidate relevance:
其中:
enriched by controlled cross-task interactions)捕获 task-aware global context。
task-specific encoding)捕获 context-conditioned candidate embeddings。
这种 Transformer 原生的 matching 公式动态适应 session context,实现 context-aware and task-adaptive ranking。
是任务 的全局上下文 representation,它包含了:在给定条件下(用户、上下文)所有candidate在task中的全局信息、任务之间的依赖关系。 而
是在任务 下的、由用户上下文条件化的私有 representation。它包含了:在给定条件下(用户、上下文)candidate在 task中的信息。
Flexible Cross-Task Masking Strategies:cross-task attention mask domain-specific task relationships and expert knowledge 来灵活配置。我们讨论以下几种代表性策略:
Parallel Masking:当需要不同 recommendation tasks 之间的 independent predictions 时,我们强制相互不可见性(global representation,没有 cross-task information flow。这种策略适用于探索性场景、或数据充足从而允许独立建模的情况。
Null Masking:对于数据充足且任务关系复杂模糊的场景,我们允许所有任务相互关注(bidirectional attention 来自主学习 task correlations,适用于 domain knowledge about task dependencies 有限的情况。
Cascade Masking:当 behavioral dependencies 遵循清晰的漏斗结构时,我们按照 data-rich-to-sparse cascade 施加单向信息流(sparse downstream tasks 能够利用 upstream tasks 的信号。例如,在电子商务中, click -> cart -> purchase 的自然递进表现出清晰的因果依赖关系,purchase prediction 受益于 click and cart signals。
Hybrid Masking:对于复杂的现实场景,从业者可以根据领域专业知识(domain expertise)来设计 custom masks ,从而编码 partial visibility 或 mixed patterns。例如,在 behavioral relationships (例如 点赞 like、关注 follow、评论 comment、转发 forward)缺乏清晰因果结构的短视频平台中,可以允许 engagement-related tasks(点赞 、评论)之间的 bidirectional attention,同时保持从丰富的 click signals 到稀疏的 follow actions 的 unidirectional flow。
总之,我们的灵活的 masking 机制基于 domain-specific task dependencies 实现 controlled cross-task interaction,适应从 strict cascades 到完全自主学习的 diverse relationship patterns。
通过 dynamic matching 机制计算得到 relevance scores list-wise objectives 和 point-wise objectives 的 hybrid learning 策略。对于 discriminative ranking ,我们采用基于 InfoNCE 的 contrastive loss(《InfoNCE: Identifying the gap between theory and practice》、《Towards robust recommendation via decision boundary-aware graph contrastive learning》、《Recgpt technical report》):
其中:candidate set 大小。
注意,这里的
candidate set直接作为负样本 + 一个正样本。考虑到 candidate set通常来自于retrieval stage,因此它们与user/request具备一定的相关性,负样本是hard negatives而不是随机负样本,甚至也不是in-batch负样本。
对于工业系统所需的 calibrated probability estimation,我们采用二元交叉熵(binary cross-entropy: BCE)损失:
其中:ground-truth label,sigmoid 函数。
joint training objective 结合所有任务的两种损失,公式化为:
其中:list-wise optimization 和 point-wise optimization。
这个公式显式地假设每个任务的损失权重相同。
我们的 unified framework 相比传统
传统的 point-wise learning 范式(《Personalized Inter-Task Contrastive Learning for CTR&CVR Joint Estimation》、《Prototype feature extraction for multi-task learning》、《Cross-task knowledge distillation in multi-task recommendation》)孤立地优化单个 user-item pairs,与 models must rank entire candidate sets 的 serving 环境存在根本性错配。OneRank 通过 integrated context-aware modeling and dynamic scoring 来解决这一差距。
Explicit Cross-Candidate Dependency Modeling:我们 situational descriptor-based global information modeling 通过 cross-attention 聚合整个 candidate set 的信号,使模型能够捕获 competitive dynamics 和 relative preferences 而非 absolute scores。global representation task-specific characteristics,还编码 candidate pool 的 distributional properties,允许模型根据 competing items 自适应地调整 rankings。
Dynamic Ranking Scoring:与无论 context 如何都应用 fixed transformations 的 static MLP predictors 不同,我们的基于 matching 的公式 dynamic adaptation。global representation cross-task attention 而被 refined ,并由 situational descriptors 被 informed),捕获了 session-specific user intent、query semantics 和 temporal context。因此,同一 user-item pair 可以根据 contextual variations(例如,morning vs. evening browsing、search vs. browse mode)在不同 sessions 中获得不同分数,实现真正的个性化排序。
此外,内积公式诱导了一个共享几何空间(shared geometric space),其中 task representations candidate representation semantic alignment,相比架构分离的 MLP tower,促进了更好的 gradient flow 和更有效的 multi-task learning。
跷跷板现象,即优化一个任务会降低其他任务,源于 multi-task learning 中 shared parameters 上的 gradient conflicts。OneRank 通过 three-level decoupling strategy 缓解这一问题:
Input-Level Task-Specific Parameters:通过注入具有 task-isolated attention masks 的可学习 task tokens feature extraction 的 earliest stage 为每个任务分配专用参数(dedicated parameters)。这确保任务从 shared context(interaction history、preference anchors)中提取 specialized representations,而不会 backpropagation through the encoding layers 过程中相互干扰 gradient flows。
Intermediate-Level Information Flow Decoupling:在 global modeling 阶段,我们同时对 situational descriptor projection(cross-candidate aggregation(task-specific parameters。即使任务共享相同的 situational descriptor input dedicated parameter sets 保持独立的 transformation and aggregation pathways。这种架构设计防止了 aggregation 阶段的梯度冲突:optimizing 任务 projection and attention parameters 不会直接干扰其他任务的学习,因为每个任务通过自己的 parameter space 操作。
Prediction-Level Gradient Detachment:在 final decoding 解码阶段,我们的 gradient detachment 机制允许任务 representations(knowledge transfer),同时防止任务 optimization isolation)。通过自定义 backward operator 仅允许对角梯度流(diagonal gradient flow),我们实现了非对称的 information transfer:forward sharing 实现 knowledge transfer,backward isolation 消除负面干扰(negative interference)。
除了解决跷跷板现象和 training-serving gap 外,OneRank 的 unified design 在 modeling flexibility 和 computational efficiency方面也具有显著优势。
Flexible Task Dependency Modeling:我们的 configurable cross-task attention masks 相比 ESMM 的 fixed cascades(《Entire space multi-task model: An effective approach for estimating post-click conversion rate》)或 MMoE 的 independent towers(《Modeling task relationships in multi-task learning with multi-gate mixture-of-experts》)等刚性架构提供了前所未有的灵活性。从业者可以通过简单的 mask design 来编码 domain-specific knowledge:电子商务漏斗(e-commerce funnels)的 strict cascades、ambiguous engagement patterns的 bidirectional attention、或复杂 user journeys 的 hybrid configurations。这种灵活性消除了对 architecture search 或 task-specific model variants 的需求,在单一 unified framework 内实现对 diverse scenarios 的快速适应。
Computational Efficiency and Scalability:通过消除 transition,OneRank 在单一 Transformer 原生架构内实现端到端优化,避免了 hybrid 方法中 heterogeneous module transitions 的计算开销。我们的 single-user multiple-candidate 范式在训练期间大幅减少 redundant context encoding,而 user-specific components(interaction history and preference anchors)的 KV-caching 实现 efficient serving:仅 candidate and task tokens 需要在线计算,实现低延迟和高 GPU 利用率。这种 unified design 释放了 Transformer 的全部 scaling 潜力,支持 deeper models 和 larger candidate sets,没有 architectural bottlenecks。
总之,OneRank 在统一的 Transformer 架构内对 feature extraction、task-specific representation learning 和 multi-task decoding 的协同设计(co-design),解决了传统的解耦方法的根本局限,为工业 multi-task ranking systems 提供了优越的建模能力、optimization 稳定性、计算效率和适应性。
我们在从 Shopee(领先的电子商务平台)收集的大规模专有数据集上进行离线实验。该数据集涵盖 2025 年 12 月连续 30 天的 user interaction 日志,包括 click、add-to-cart 和 order 等等 feedback signals。Table 2 总结了数据集统计信息。我们报告 click (C)、add-to-cart (A) 和 order (O) 的 prediction tasks 的 AUC 和 GAUC。完整数据集详情见附录 A。

baseline 方法:为了提供全面的评估,我们将 OneRank 与 combinations of different encoder architectures and multi-task learning strategies 进行比较。这种实验设计使我们能够分离 encoder capacity 和 multi-task optimization strategies 的影响,并公平评估 OneRank’s unified Transformer-native multi-task ranking architecture 的优势。
我们考虑以下代表性的 encoder 架构:
DNN:Shopee 中基于 deep neural networks 的 well-optimized production baseline,作为传统 DLRM 风格架构的基础。
MTGR(《Mtgr: Industrial-scale generative recommendation framework in meituan》):Meituan 开发的工业级 generative recommendation 框架,采用基于 Transformer 的 sequence modeling 从而用于 user behavior understanding。
OneTrans(《OneTrans: Unified Feature Interaction and Sequence Modeling with One Transformer in Industrial Recommender》):ByteDance 提出的用于 feature interaction 和 sequential modeling 的统一的 Transformer 架构,代表 Transformer-based ranking models 的 SOTA。
在每个 encoder 之上,我们评估多种 multi-task learning 策略:
noMTL:独立的 single-task training,无 multi-task learning,作为衡量 multi-task optimization 收益的基线。
NSE (Naive Shared Embedding):独立的 task-specific networks,但所有任务共享一个 common embedding table,代表最简单的 parameter sharing 形式。
MMoE(《Modeling task relationships in multi-task learning with multi-gate mixture-of-experts》):Multi-gate Mixture-of-Experts,在 shared expert networks 上采用 task-specific gating networks,实现灵活的 task-specific feature extraction。
PLE(《Progressive layered extraction (ple): A novel multi-task learning (mtl) model for personalized recommendations》):Progressive Layered Extraction,以渐进方式(progressive manner)组织 shared experts 和 task-specific experts,平衡 knowledge sharing 和 task specialization。
DCMT(《Dcmt: a direct entire-space causal multi-task framework for post-click conversion estimation》):面向 debiasing 的 multi-task 框架,通过 causal-based counter-factual learning 技术解决 sample selection bias。
ResFlow(《Residual Multi-Task Learner for Applied Ranking》):residual-based multi-task learning 方法,通过 multi-task towers 之间的简单 residual connections 实现灵活的信息流。
实现细节:除非另有说明,所有模型在相同实验设置下实现以确保公平比较。
OneRank 采用 2-layer Transformer encoder with pre-norm architecture(《Deepseek-v3 technical report》、《Qwen2 technical report》、《Qwen3 technical report》),每层 4 attention heads。模型全程使用 256 的 hidden dimension,feed-forward networks 设置为 hidden size 的两倍,遵循标准 Transformer 配置。最大序列长度设置为 256,以平衡计算效率和建模能力。应用可学习的 positional encodings(《Parallel Latent Reasoning for Sequential Recommendation》、《Think before recommend: Unleashing the latent reasoning power for sequential recommendation》)来捕获 user interaction sequences 中的时间依赖关系(temporal dependencies)。
Sequence-side features (包括 item attributes、category information 和 behavioral metadata)和 situational descriptors(user demographics、query information、session metadata)通过线性层投影到模型维度(256)。OneRank 实例化三个 task-specific tokens(每个任务一个:click、add-to-cart、order)和三个 ranking head tokens。multi-task prediction module 应用 one layer of task-specific self-attention,后接one layer of cross-task attention with configurable masking,两者都配备 FFN 模块从而进行非线性变换。
什么是
ranking head tokens?论文没有详细说明。读者猜测应该是 $$
对于 InfoNCE loss,初始温度 0.2。list-wise loss 和 point-wise loss 相等(loss weights。
Table 1 总结了整体离线性能,从中可以得出三个关键观察。
在传统 DNN encoders下,Multi-task learning 始终有益。与 noMTL baseline 相比,所有 multi-task learning 方法在 DNN encoder 之上构建时,在 click、add-to-cart 和 order 等 prediction tasks 上均产生明显改进。这一结果证实,联合建模 dense and sparse user feedback 提供了互补的 supervision signals,确立了 multi-task learning 作为工业推荐系统的必要组件。
Stronger encoder architectures 进一步放大了 multi-task modeling 的收益。将 DNN-based encoders 替换为 Transformer-based architectures(如 MTGR 和 OneTrans)在大多数 multi-task strategies 上带来额外性能增益,突出了 expressive sequence 和 context modeling 在 multi-task recommendation 中的重要性。
然而,我们观察到 DCMT 在 Transformer encoders 下表现不佳,可能是因为其 debiasing-oriented design 可能过度校正 sparse tasks 并加剧 task imbalance,导致与 high-capacity models 结合时 optimization 性能不稳定。
OneRank 通过在 Transformer 原生框架内统一了 representation learning 和 multi-task ranking 从而实现了最佳性能。在所有指标和任务上,OneRank 始终优于所有 baseline combinations,证明了消除 encoder–predictor decoupling 并将 multi-task reasoning 直接内化到 Transformer 架构中的有效性。
值得注意的是,这些增益是在 a compact parameterization 和 a moderate increase in computation 的情况下实现的,突出了有利的 performance–efficiency 权衡。
这些结果验证了我们的核心主张:统一的 Transformer-native ranking 范式比外部的 encoder-predictor separation 架构更适合大规模 multi-task recommendation。

为了验证 OneRank 中每个设计组件的有效性,我们通过移除或替换关键架构模块进行全面的消融研究。Figure 3 展示了以下变体的结果:
V1:移除 task-specific tokens,直接在 candidate encodings 上应用线性投影。
V2:用单个 shared token 替换 task-specific tokens。
V3:在 V2 基础上进一步移除 cross-task relational attention。
V4:移除 cross-task attention 中的 strategic gradient detachment。
V5:用 randomly initialized parameters 替换 situational descriptors。
V6:应用 full bidirectional attention without selective masking。
从结果中我们观察到:
(1):移除 task-specific tokens(V1)导致显著退化,A-AUC 从 0.8463 降至 0.8424,O-GAUC 从 0.8350 降至0.8337,验证了 early task specialization 的必要性。
(2):使用 single shared token(V2)表现不如完整模型,确认了 independent task tokens 对于缓解 gradient conflicts 至关重要。
(3):移除 cross-task attention(V3)与 V2 相比显示 mixed results,表明 cross-task knowledge transfer 在与proper task isolation 相结合时有益。
(4):移除 gradient detachment(V4)实现了强性能但在 add-to-cart 任务上导致不稳定(A-AUC:0.8460 vs. 0.8463),证明了 strategic gradient control 的必要性。
(5):用 random parameters 替换 situational descriptors(V5)导致严重退化,C-AUC 降至 0.7872,O-GAUC 降至0.8318,确认了 candidate-aware contextualization 对于弥合 training-serving gap 至关重要。
(6):Full bidirectional masking(V6)在所有任务上始终不如 controlled masking strategies。
总体而言,这些研究验证了所有提出组件的协同作用对于优越的 multi-task ranking 性能至关重要。

为了研究 OneRank 的 scaling behavior,我们研究了其在两个 fundamental model scaling dimensions 下的性能:encoder layer (depth) 和 hidden dimension (width)。具体而言,我们逐步增加 encoder 层数和模型维度,同时保持所有其他组件不变。我们报告相对于 smallest model configuration 的ΔAUC 和 ΔGAUC 绝对性能改进。
Scaling Encoder Depth:Figure 4 (left) 显示了增加 encoder depth 的效果。我们观察到:
随着 encoder 层数的增加,所有 feedback signals 在 AUC 和 GAUC 指标上均持续改进。
从 shallow configurations 扩展到中等深度时增益最为显著,在更大深度时逐渐饱和,表明边际收益递减。
这一趋势表明更深的 Transformer stacks 增强了 OneRank 建模复杂 sequential patterns 和 task interactions 的能力,同时统一的架构在深度增加时保持稳定的 optimization。
Scaling Hidden dimension:Figure 4 (right) 展示了 scaling the hidden dimension 的影响。增加 model width 在不同任务上持续改善排序性能。与 depth scaling 相比,width scaling 表现出更平滑和更均匀的增益,特别是对于 click 相关指标,反映了 richer representation capacity 对 fine-grained user–item interaction modeling 的益处。值得注意的是,性能 improvements 在各任务间保持稳定,表明 OneRank 有效利用 increased model capacity,而没有引入严重的 task imbalance 或 optimization instability。
总体而言,多个任务和指标上的一致 improvements 进一步支持了所提出的统一的 Transformer-native ranking 框架的 scalability,使其非常适合大规模工业部署,其中 model capacity 和性能需要被联合 optimized。

为了验证 OneRank 在真实工业环境中的实际效果,我们在 Shopee 的主要个性化排序场景中进行了为期 7 天的大规模在线 A/B 测试,与之前部署的 baseline 进行比较,其中这个 baseline 是将精心优化的 Transformer encoder 与 multi-task predictor 相结合而来。OneRank 完全部署在标准 multi-stage ranking pipeline 中,通过 score fusion 来平衡用户体验和业务目标。遵循工业实践,我们将 10% 的实时流量分配给使用 OneRank 的实验组,10% 分配给 baseline 对照组。我们沿着两个互补维度评估在线性能:平台收益(GMV/UU、Paid GMV/UU、AR/UU)和用户体验(Bad Query Rate)。详细部署配置见附录 B。
在线 A/B 测试结果总结在 Table 3 中。OneRank 持续改善以业务为中心的指标和以用户为中心的指标,实现了 GMV/UU +1.01% 的提升、paid GMV per user +1.17% 的增长和广告收入 +0.81% 的增益,同时将 Bad Query Rate 降低了 2.29% 。这些结果表明,OneRank 不仅提高了货币化效率(monetization efficiency),还改善了工业场景中的 recommendation relevance 和用户体验。
总体而言,观察到的增益验证了 OneRank 的实际有效性,并突出了统一的 Transformer-native designs 在大规模工业推荐系统中 scalable and reliable deployment 的强大潜力。

在本文中,我们识别了现有 multi-task recommender systems 中由传统 encoder-predictor separation 引起的关键局限:task-agnostic information bottlenecks、导致跷跷板现象的 gradient conflicts、以及阻止 context-aware dynamic ranking and scaling potential 的 architectural transitions。
为了应对这些挑战,我们提出了 OneRank,一种统一的 Transformer-native multi-task ranking 框架,在连贯的架构设计中内化 multi-task reasoning 。我们的方法:
引入了 task-specific tokens with mutual invisibility 以实现 early specialization。
通过 situational descriptors 进行 candidate-aware contextualization以弥合 training-serving gaps。
以及 controlled cross-task attention with strategic gradient detachment 以实现灵活的 knowledge transfer
通过用 dynamic matching formulations 替换 static MLP-based scoring。
最终,OneRank 在统一的范式内实现上 context-aware and task-adaptive ranking 。
大量离线实验和大规模在线 A/B 测试表明,OneRank 在多个任务上显著优于 SOTA 的基线方法,同时保持计算效率,验证了我们统一的 Transformer-native design 用于 scalable 工业部署的有效性。
Dataset Details:现有公共数据集无法提供现实工业模型评估所需的 rich sequential item features、explicit multi-task annotations 和 ranking-stage candidate sets required。因此,我们在从 Shopee(领先的电子商务平台,服务东南亚和拉丁美洲的十亿级用户)收集的大规模专有数据集上进行离线实验。该数据集由 2025 年 12 月连续 30 天的 user interaction 日志构建,专门为 multi-task ranking 而设计,涵盖 click 、add-to-cart 和 order 等等 feedback signals。
Evaluation Metrics:我们在三种类型的 user feedback signals 下评估模型性能:click (C)、add-to-cart (A) 和 order (O)。对于每种 feedback 类型,遵循先前工作(《Pepnet: Parameter and embedding personalized network for infusing with personalized prior information》、《Long-Sequence Recommendation Models Need Decoupled Embeddings》、《Deep interest network for click-through rate prediction》),我们报告 AUC 和 GAUC,分别记为 C-AUC/C-GAUC、A-AUC/A-GAUC 和 O-AUC/O-GAUC。
Online Deployment Details:OneRank 部署在 Shopee 的标准 multi-stage ranking pipeline 中,通过 a score fusion strategy 集成,该策略将 multiple task outputs 组合为 a unified ranking score:
其中:predicted 的点击率和转化率。
第一项显式优化商品交易总额(gross merchandise value: GMV)。
第二项考虑广告收入。
第三项强制 search relevance and user intent alignment。
系数 production 中的用户体验和业务目标。
在 online inference 中,每个请求可能涉及多达 4,096 个 candidate items。为了实现 ranking quality 和 computational efficiency 之间的有利权衡,candidates 被分为 cross-attention-based ranking,有效将 OneRank 扩展到 large candidate pools,同时保持 context-aware list modeling。
Evaluation Protocol and Metrics:在线 A/B 测试在 2026 年 1 月 8 日至 1 月 14 日的 7 天期间进行。遵循标准工业评估实践,我们将 10% 的实时流量分配给使用 OneRank 的实验组,10% 分配给 baseline 对照组。遵循先前工作(《Onepiece: Bringing context engineering and reasoning to industrial cascade ranking system》),我们沿着两个互补维度评估在线性能:
平台收益(Platform Benefits),包括 GMV/UU(gross merchandise value per user)、Paid Orders/UU(average number of completed paid orders per user,不包括退款)和 AR/UU(advertising revenue per user)。
用户体验(User Experience),通过 Bad Query Rate 衡量,定义为被判定为不相关(irrelevant)的 user queries 比例,作为推荐准确性和用户满意度的代理指标。
关于 OneRank 对 Figure 5 报告了不同温度 0.2 左右达到峰值,当温度过小时略有下降。这一趋势在 AUC 和 GAUC 指标上一致,并且对于 click、add-to-cart 和 orer 等等 prediction tasks 都成立。这种行为与 temperature in contrastive learning 中的作用一致:
大的温度 similarity distribution,削弱 candidates 之间的 discriminative supervision。
而过小的温度 similarity distribution 并可能放大噪声或 hard negatives,导致 suboptimal optimization。
适中的温度(约 discrimination strength 和 training stability 之间取得平衡,产生最佳整体性能。
基于此分析,我们将温度 0.2。

关于公式 Loss Weight 的性能:我们进一步研究公式 list-wise InfoNCE loss 和 point-wise BCE loss 之间相对权重的影响。Table 4 报告了不同 loss weight ratios 下的性能。我们观察到:
为 InfoNCE 和 BCE 分配相等权重在所有任务和评估指标上始终产生最佳结果。
当 BCE loss 过度加权(1:2)时,性能下降,表明过度依赖 point-wise supervision 限制了模型捕获 relative ranking signals among candidates 的能力。
相反,强调 InfoNCE(2:1)相比 BCE-dominant setting 改善了 ranking 质量,但仍不如 balanced configuration。
这些结果表明,list-wise discrimination 和 point-wise calibration 在 OneRank 中发挥互补作用,两者的 balanced combination 导致最稳定的和最有效的 optimization。基于此分析,我们采用相等权重策略。
