OneTrans: Unifying Sequence Modeling and Feature Interaction in Recommender Ranking
2025-11-6
Words 1446Read Time≈ 4 min
Ever since ranking moved to deep learning, the industry has split ranking-model research into two basic parts — sequence modeling and feature interaction — and some companies even split their ranking groups into two teams, one for behavior sequences and one for feature interaction. In the early days, a sequence was processed with something like DIN and compressed into one or more vectors, which then took part in interactions with other features: think MLP(concat(DIN, Features)). Most model research today still evolves the two halves separately — swapping the MLP for DCN, adding LHUC, elaborating it into RankMixer or a Transformer; stacking MHA on DIN or replacing it with a Transformer outright — which you could write as RankMixer(concat(Transformer, Features)).
From MLP(concat(DIN, Features)) to RankMixer(concat(Transformer, Features)), nothing essential has changed: sequence modeling and feature interaction remain an implicit two-stage process, and the sequence is compressed into vector space before it ever interacts with features. What's interesting about LLMs is that the interactions behind next-token prediction happen in the token space of the word sequence. The lesson for recommendation ranking models: every feature interaction should happen in the token space of the user sequence.
notion image
The core idea of OneTrans is simple: unify the user sequence and the user/item features into tokens as the backbone's input, and make the backbone a decoder-only Transformer. That alone captures 80% of the work's value. How features become tokens, how the user sequence is laid out, which Transformer variants to use — each part admits several approaches, and what the paper shows isn't necessarily the best one.
With a similar idea, Meituan released MTGR mid-year. As the architecture diagram below shows, the core idea is very much the same, so the view above isn't unique to us — others are also choosing this route to break through the bottleneck. Still, even today, inside the company or across the industry, very few have shipped a fully deployed system that unifies sequences and features with a single, simple network.
notion image
Where MTGR differs is that it turns cross features into tokens as well and ablates their contribution — a bit like the old-meets-new compromise of Wide & Deep. When we settled on OneTrans's main architecture at the start of the year, we stuffed the system's huge FM implicit cross vectors and the massive sparse Cartesian-product explicit cross features into the non-seq features as individual tokens, to avoid losing performance. But as the model scaled up — wider d_model, more layers, longer sequences — we phased out these hand-crafted cross features of the old era over one or two iterations. Interestingly, the very hand-crafted crosses that once brought big gains started hurting generalization after scaling up, with no AUC gain. These somewhat "cheating" memorization features probably crowd out gradients: when model-side interaction was only at the DCN/LHUC level, they mattered a lot; against a scaled-up Transformer, they no longer do.
notion image
Start with the inputs. On the left, the Seq Tokenizer takes user behavior sequences. Recommenders usually have several kinds: impressions, the user's positive actions (clicks, purchases), and positive actions from other domains (likes, follows, searches). In the two-stage setup described above, each kind of behavior is typically compressed into its own vector. Now there's a single sequence, and its layout affects results, because the Transformer uses unidirectional causal attention: later positions on the right can see the behaviors to their left, but not the reverse. An early empirical finding was to put behaviors closer to the system on the right — from left to right: other-domain behaviors (likes, follows, searches), in-domain positive behaviors (clicks, purchases), then recommender impressions. With this layout, results matched full attention.
I see this tricky layout as a non-universal method that may not carry over to another business, but it's a useful reference when moving from the old multi-sequence architecture to a single sequence. Later versions reorganized the sequence features in chronological order, the most natural scheme: more recent behaviors see further back and can attend to the entire history. The earlier layout was necessarily an intermediate step: without chronological order you can still use a KV cache, but you can't update it incrementally when the user adds new behaviors.
The non-seq tokens on the right started as grouped raw features and evolved into concatenating all features, applying one transformation layer, and splitting the result into multiple tokens.
Next come some Transformer "optimizations." To me they're more like tricks — compromises under specific conditions. I believe that as the architecture's inference capacity and the Transformer's width and depth grow, these "optimizations" will gradually disappear and the whole structure will settle into a standard Transformer.
The first "optimization" is per-token Transformer parameters. The blue part on the left is the standard shared Transformer parameters; the orange part on the right gives each feature token its own independent parameters, much like RankMixer. It does improve results, and our explanation is that feature tokens are heterogeneous and need independent parameters — but it carries a lot of potential harm.
First, the parameter count explodes. Some will ask whether that's really bad — isn't that exactly scaling up? My understanding is that scaling laws are fundamentally about scaling compute: the optimal allocation of compute between parameters and data, not simply making the parameter count bigger. Since the compute hasn't really changed, unshared parameters just add memory traffic, lowering arithmetic intensity and GPU utilization. Second, I believe LLMs broke through on the back of strong enough compression — compression produces intelligence. Recommendation data is actually limited, and spreading limited training signal across many parameter sets isn't necessarily the best allocation. So whenever I see multi-billion-parameter models built by stacking per-token parameters with sparse MoE, I can't help grumbling: their real compute and GPU utilization are badly inflated. For example, a 4B model might be only 6 layers deep, while Qwen 0.5B has 24 layers and a wider d_model.
For more on scaling laws and arithmetic intensity, see:
The future direction is surely to get rid of these per-token parameters — for example, no per-token sparse MoE; perhaps through better tokenizers, or perhaps scaling far enough will solve it naturally.
The other trick is the pyramid design. The idea is that not every layer needs to process thousands of tokens — trimming compute along the sequence length to afford more depth. But heuristically always keeping the most recent tokens risks every layer being dominated by recent, homogeneous behaviors. The most standard approach is still to drop tokens dynamically layer by layer, as in LazyLLM: Dynamic Token Pruning.
Engineering optimizations for training and inference follow the standard Transformer playbook. The most important: as sequences get longer, use a KV cache to avoid recomputing attention — at both request and session level, so training and inference compute each request only once and reuse historical computation across feed refreshes.
notion image
Next, why we chose a Transformer that is as standard as possible. Recommendation loves to borrow from other fields and modify the ideas into a bespoke architecture, and the flexibility of deep-learning frameworks gives plenty of freedom. Even among the few works that stress unified modeling of sequences and features, the architectural changes are all over the place — never mind the many model-complexity (scaling-up) papers. Our baseline once switched to RankMixer too, before we moved to One Transformer — and that wasn't simply about which structure was stronger. The empiricist's rule is to A/B both and keep the winner; our stance was that we had to go in the OneTrans direction, and if it wasn't good enough, analyze and improve it. That stance comes from recognizing how small we are — and how small the recommendation field is.
Our technical call was to use a standard Transformer, which puts us on the same foundation as LLMs. I'd lean toward the Transformer in almost any situation and stop exploring other basic structures — not because it's always stronger, but because I trust the foundation-model choice of the vast majority of closed and open LLMs. And because we share the LLM's basic architecture, the LLM research community and industry will keep supplying a steady stream of model understanding and incremental innovation. For example, DeepMind MoR controls computation along token depth, with recursive parameters and early exit, saving half the memory and compute — with a decoder-only Transformer as our base, we can try and reuse it directly. Likewise, DeepSeek's sparse attention work (DSA, NSA) and the LLM ecosystem's FlexAttention are all sources of incremental gains for us. Building on the Transformer and mapping our problems onto LLMs is like hiring a crowd of LLM researchers for free to help analyze problems, offer new ideas, and build open-source tooling.
notion image
One more hiring note: we welcome anyone interested in LLMs and recommender systems who wants to use LLM technology to transform recommendation:

Get new essays by email

Recsys Frontier: how recommender systems scale, from models to infra. Written by a 10-year RecSys engineer.

Subscribe on Substack

Free. Unsubscribe anytime.

  • OneTrans
  • Talent Dilution Roofline: Your Algorithm Team May Not Need More HiresHow to Earn Good Performance Ratings at an Internet Company
    Loading...
    Catalog
    中