---
title: 'MPFormer: Adaptive Multi-Task Retriever'
url: https://www.emergentmind.com/topics/mpformer
type: topic
---

# MPFormer: Adaptive Multi-Task Retriever

Searching arXiv for MPFormer and related recommendation retrieval papers.
MPFormer, introduced in "MPFormer: Adaptive Framework for Industrial Multi-Task Personalized Sequential Retriever" [2508.20400], is an industrial multi-task personalized sequential retriever for large-scale recommendation systems, especially short-video platforms. It is designed to close the optimization mismatch between a retrieval stage that traditionally uses single-objective embedding-based retrieval and a ranking stage that increasingly optimizes multiple objectives jointly, such as CTR, watch duration, conversion, or engagement. The framework retrieves candidates for multiple targets in a single unified framework, while still allowing user-personalized retrieval quotas and objective-specific representations, and it has been integrated into the Kuaishou short video recommendation system.

## 1. Problem setting and industrial motivation

MPFormer is situated in the standard cascaded architecture of industrial recommendation systems, in which retrieval first fetches a few hundred or thousand candidates from a billion-scale item pool, and ranking then optimizes multiple business objectives more precisely [2508.20400]. The paper identifies a semantic gap between these stages: the ranker is already multi-objective, whereas retrieval is usually single-objective. In this formulation, the ranker can optimize effectively only if the retriever supplies candidate sets with good multi-objective coverage.

The paper emphasizes that this mismatch is consequential when objectives are loosely coupled rather than nested. In the short-video setting used to motivate the method, the retrieval stage must support objectives such as **pro\_lvr**, **max\_time**, and **vtr**. These are related but not equivalent, and the paper argues that they are not well captured by a single score.

The mainstream industrial remedy is parallel multi-path single-objective retrieval: one model per objective, one retrieval path per objective, followed by merging. MPFormer characterizes this design as insufficient for two reasons. First, training and serving cost grow roughly linearly with the number of objectives \(K\). The paper contrasts independent multi-task retrieval, with complexity
\[
\mathcal{O}_{\text{independent}} = K \cdot O\left((n+1)d^2 + (n+1)^2 d\right),
\]
against MPFormer’s shared design,
\[
\mathcal{O}_{\text{shared}} = O\left((n+K)d^2 + (n+K)^2 d\right).
\]
Second, separate single-objective pipelines do not model interactions among objectives and do not provide a principled mechanism for dynamic per-user allocation of retrieval budgets.

## 2. Core formulation and objective-conditioned sequence modeling

The framework defines a user set \(\mathcal{U}\), an item set \(\mathcal{I}\), a user \(u \in \mathcal{U}\), and a user behavior sequence \(\mathcal{B}_u\) within a time window:
\[
\mathcal{B}_u = \{(x^{(t)}_1, f^{(t)}_1), \ldots, (x^{(t)}_n, f^{(t)}_n)\},
\]
where \(x_k^{(t)} \in \mathcal{I}\) is the interacted item ID and \(f_k^{(t)} \in \mathbb{R}^d\) contains handcrafted features such as watch duration ratio, interaction type, author embedding, and tag embedding. Retrieval is modeled through an inner-product scoring function,
\[
s_\theta(u,i) = \langle \phi_\theta(u,\mathcal{B}_u), \varphi_\theta(i) \rangle,
\]
and the score must encode \(K \ge 3\) business objectives [2508.20400].

The central modeling device is the objective-conditioned Transformer. For each objective \(k\), MPFormer constructs a query vector from user-side features and historical sequence summaries:
\[
U = \big[ u\ ;\ \mathrm{sum\_pooling}(L_{rs})\ ;\ \mathrm{sum\_pooling}(L_{\mathrm{click}})\ ;\ \mathrm{sum\_pooling}(L_{\mathrm{long\_view}}) \big].
\]
Each objective then receives its own transformed representation,
\[
\mathbf{O}_k = \text{MLP}(\mathbf{[U]}) \in \mathbb{R}^d,
\]
yielding a learnable target embedding \(\mathbf{O}_k\). Historical behaviors are encoded as
\[
t_i = \text{MLP}([E_{\text{item}(x_i)}; f_i]) \in \mathbb{R}^d.
\]

A defining architectural step is that objective tokens are appended directly to the behavior sequence:
\[
\mathbf{H}^{(0)} = \{t_1, \dots, t_n, \mathbf{O}_1, \dots, \mathbf{O}_K\} \in \mathbb{R}^{d \times (n+K)}.
\]
This permits attention between behavior history and objective tokens in a shared decoder-style Transformer with shared QKV parameters across objectives. The final representation for objective \(k\) is taken from the hidden state at the position of \(\mathbf{O}_k\):
\[
\mathbf{Emb}_u^k = \text{MLP}_k(\mathbf{H}^{(L)}[:, n+k]).
\]

This design differs from a bank of separate objective-specific models. Objectives are not merely served in parallel; their semantics are injected as tokens into the sequence encoder itself. The consequence is a shared sequence model whose latent states are explicitly conditioned on business targets rather than only on user history.

## 3. Personalization and dynamic quota allocation

MPFormer augments multi-objective retrieval with adaptive per-objective weights that determine retrieval quotas at the user level. Instead of using fixed recall ratios, the framework learns objective-specific weights \(w_{ik}\) for a user-item pair \((u,i)\), using the ranking-stage fused score \(pscore_i\) as supervision [2508.20400]. The quota-learning objective is defined so that the weighted combination of objective-specific retrieval scores approximates the downstream fused ranking signal.

The paper explicitly restricts this supervision to positive instances. Its rationale is operational rather than theoretical: negative items are not exposed in logging, so their downstream fused score is not reliable, and positives-only training avoids distribution-shift issues.

At serving time, the learned weights from a user’s recent interactions are aggregated as
\[
\tilde{w}_u = \text{softmax}\left(\sum_{i\in\mathcal H_u} w_i\right) \in \mathbb{R}^K,
\]
and the retrieval quota for objective \(k\) is assigned proportionally:
\[
Q_k(u) = \left\lfloor \tilde{w}_{uk} \cdot Q_{\text{total}} \right\rfloor.
\]
This mechanism is intended to reflect the fact that different users require different mixtures of objectives. One user may respond more strongly to long-view items, while another may respond more to surprise content.

Personalization is also injected into the model’s internal representation. On the user side, the query representation uses demographic and statistical features together with behavioral aggregates, rather than relying on user IDs alone. The paper notes that including user/device IDs in this stage causes representation homogenization, collapsing different objective embeddings into similar vectors; it therefore prefers age, gender, geography, and aggregated behavior statistics in the query construction. At the same time, MPFormer adds a specialized decoder block, referred to as **PFormer** or a personalized FFN module, in only one Transformer layer for efficiency. In this block, a user embedding \(E_u\), formed from concatenated user ID and device ID, modulates expert-gated FFN computation. The resulting design separates coarse-grained personalization used to avoid homogenization from a more targeted, sparsely deployed expert-gating mechanism used to improve expressivity.

## 4. Item-side modeling and multi-objective optimization

The architecture comprises a user tower, an item tower, a multi-objective loss, and an online serving system. On the item side, MPFormer uses target-specific mappings:
\[
Emb_{I}^{(k)} = \text{MLP}_{k}([e_{\text{id}}; f_{\text{side}}]) \quad \forall k \in K,
\]
where \(e_{\text{id}}\) is the item ID embedding and \(f_{\text{side}}\) includes side features such as category, popularity, and content embeddings [2508.20400]. The paper states that this design prevents gradient interference across tasks and allows each objective to obtain a suitable item embedding space.

Training is conducted jointly across objectives with
\[
\mathcal{L} = \sum_{k \in K} \alpha_k \mathcal{L}_k.
\]
Each objective uses a temperature-scaled softmax contrastive loss over user and item representations. To mitigate class imbalance, the task weights are set adaptively:
\[
\alpha_k = \frac{\log(1+\gamma/|\mathcal I_k^+|)}{\sum_{k'} \log(1+\gamma/|\mathcal I_{k'}^+|)}.
\]
Here, \(|\mathcal I_k^+|\) is the number of positive samples for objective \(k\), and \(\gamma\) controls rebalancing strength. The intended effect is to give rarer objectives more weight so that click-heavy objectives do not dominate optimization.

Taken together, these components produce a hybrid parameter-sharing regime. The Transformer computation is shared across objectives for scalability, but the objective tokens, output heads, item-side mappings, and adaptive loss weights preserve task-specific expressiveness where the paper argues it is most necessary.

## 5. Offline evaluation, ablation results, and online deployment

The reported offline evaluation uses Kuaishou production logs with training on **5 billion interactions over 5 days** and testing on **1 billion interactions on day 6** [2508.20400]. The baselines are **MVKE**, **ComiRec**, and **KuaiFormer**. MPFormer is reported to outperform all baselines across the three objectives.

For **pro\_lvr**, the paper reports **recall@10: 33.30% vs 23.00% for KuaiFormer** and **ndcg@100: 26.98% vs 19.96%**. For **max\_time**, it reports **recall@10: 41.26% vs 26.75% for ComiRec** and **ndcg@100: 32.38% vs 22.80%**. For **vtr**, it reports **recall@10: 30.45% vs 21.58% for ComiRec** and **ndcg@100: 25.27% vs 19.08%**.

The ablations focus on the trade-off between efficiency and task specificity. Shared QKV is described as much more efficient than independent QKV, with only small metric differences. Shared item-side MLP causes a noticeable drop, which the authors interpret as evidence for the need for task-specific item transformations. The paper also reports that including ID features can collapse representations and that removing them improves objective separation.

At the systems level, MPFormer is presented as a scalability-oriented retriever. Relative to baseline approaches, it reports a **63% reduction in multi-task training overhead**, a **31% reduction in GPU memory consumption** versus multi-model baselines, and a **66.7% reduction in serving resources** compared with running \(K\) separate models. Serving latency is reported as a stable **P99 latency of 80 ms**, with no meaningful latency degradation compared with single-objective retrieval.

The online A/B test is a **7-day deployment on live traffic**. The reported changes are **Total Watch Time: +0.426%**, **Total App Usage Time: +0.195%**, **Average View Duration: +0.455%**, and **Real Show: -0.411%**. The dynamic quota mechanism is reported to improve exposure rate by **12.7%** and effective-view rate by **1.3%**. The industrial case study further states that the system was deployed on a platform serving **400M+ daily active users**, with peak load of **1.2M QPS** and **99.99% service availability**.

## 6. Position in the literature and name disambiguation

MPFormer is positioned against several adjacent retrieval paradigms. Relative to single-objective sequential retrievers, the paper’s claim is not that sequential modeling is inadequate, but that methods designed for one target do not directly solve the multi-task retrieval problem. Relative to multi-interest models, MPFormer’s distinction is that it explicitly aligns objective-conditioned representations with business objectives rather than merely learning multiple latent interest vectors. Relative to prior multi-objective retrieval baselines, the asserted novelty lies in combining a unified Transformer for multi-task sequence encoding, explicit objective conditioning, learned per-user quota allocation, and shared serving infrastructure [2508.20400].

A recurrent misconception is to treat MPFormer as a packaging of several independent retrievers under one interface. The architecture described in the paper does not support that interpretation. Objective tokens are part of the token stream, attention is shared across objectives, and quota allocation is learned from downstream fused scores rather than fixed by manually assigned ratios. This suggests that the method is intended as a unified retrieval framework rather than a coordination layer over parallel models.

The name also requires disambiguation. MPFormer is distinct from **MM-Former**, the **Mask Matching Transformer** for few-shot segmentation, which adopts a “decompose first and then blend” paradigm based on class-agnostic mask proposals and support-guided proposal fusion [2301.01208]. It is also distinct from **PMformer**, the **Partial-Multivariate Transformer** for forecasting, which models dependencies within sampled feature subsets rather than across all features or one feature at a time [2408.09703]. The similarity in naming does not imply methodological overlap: MPFormer addresses industrial multi-objective sequential retrieval, whereas MM-Former and PMformer address few-shot segmentation and multivariate time-series forecasting, respectively.

Source: https://www.emergentmind.com/topics/mpformer