<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://marovi.ai/index.php?action=history&amp;feed=atom&amp;title=MTGR%3A_Industrial-Scale_Generative_Recommendation_Framework_in_Meituan%2Fen</id>
	<title>MTGR: Industrial-Scale Generative Recommendation Framework in Meituan/en - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://marovi.ai/index.php?action=history&amp;feed=atom&amp;title=MTGR%3A_Industrial-Scale_Generative_Recommendation_Framework_in_Meituan%2Fen"/>
	<link rel="alternate" type="text/html" href="https://marovi.ai/index.php?title=MTGR:_Industrial-Scale_Generative_Recommendation_Framework_in_Meituan/en&amp;action=history"/>
	<updated>2026-04-27T17:02:42Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.1</generator>
	<entry>
		<id>https://marovi.ai/index.php?title=MTGR:_Industrial-Scale_Generative_Recommendation_Framework_in_Meituan/en&amp;diff=12911&amp;oldid=prev</id>
		<title>FuzzyBot: Updating to match new version of source page</title>
		<link rel="alternate" type="text/html" href="https://marovi.ai/index.php?title=MTGR:_Industrial-Scale_Generative_Recommendation_Framework_in_Meituan/en&amp;diff=12911&amp;oldid=prev"/>
		<updated>2026-04-27T08:00:07Z</updated>

		<summary type="html">&lt;p&gt;Updating to match new version of source page&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;languages /&amp;gt;&lt;br /&gt;
{{PaperTabs}}&lt;br /&gt;
{{PaperInfobox&lt;br /&gt;
 | topic_area  = NLP&lt;br /&gt;
 | difficulty  = Research&lt;br /&gt;
 | authors     = Ruidong Han; Bin Yin; Shangyu Chen; He Jiang; Fei Jiang; Xiang Li; Chi Ma; Mincong Huang; Xiaoguang Li; Chunzhen Jing; Yueming Han; Menglei Zhou; Lei Yu; Chuan Liu; Wei Lin&lt;br /&gt;
 | year        = 2025&lt;br /&gt;
 | arxiv_id    = 2505.18654&lt;br /&gt;
 | source_url  = https://arxiv.org/abs/2505.18654&lt;br /&gt;
 | pdf_url     = https://arxiv.org/pdf/2505.18654.pdf&lt;br /&gt;
}}&lt;br /&gt;
{{ContentMeta&lt;br /&gt;
 | generated_by   = claude-code-direct&lt;br /&gt;
 | model_used     = claude-opus-4-7&lt;br /&gt;
 | generated_date = 2026-04-27&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;MTGR: Industrial-Scale Generative Recommendation Framework in Meituan&amp;#039;&amp;#039;&amp;#039; is a 2025 paper by Ruidong Han, Bin Yin and colleagues at Meituan that introduces a ranking model unifying the strengths of Deep Learning Recommendation Models (DLRMs) and Generative Recommendation Models (GRMs). MTGR builds on the HSTU transformer architecture but, unlike prior generative recommenders, retains the hand-crafted cross features that DLRMs rely on, and reorganizes user-candidate data into a single shared sequence so that scaling computation does not scale linearly with the number of candidates. The authors report a 65× increase in forward FLOPs per sample over a mature DLRM baseline together with a +1.22% gain in conversion volume and +1.31% in click-through rate, and have deployed the model on the main traffic of the Meituan take-away platform.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
Industrial recommenders typically face a tension between expressiveness and cost. DLRMs ingest curated features — user profile, behavior sequences, candidate features, and especially cross features that encode user-item interactions — but their inference cost grows roughly linearly with the number of candidates per request, capping how far the model can be scaled.&lt;br /&gt;
&lt;br /&gt;
GRMs replace this with a transformer over tokenized user behavior trained with next-token prediction, achieving favorable scaling but forcing the removal of cross features, which the authors found severely degrades ranking quality even at large parameter counts.&lt;br /&gt;
&lt;br /&gt;
MTGR resolves the tension by treating the user as a context shared across all candidates in a request, packing user features, two kinds of behavior sequences, and per-candidate features (with cross features attached to candidate tokens) into a single token sequence consumed by a stack of HSTU blocks under a custom attention mask. Because the user is encoded once per request rather than once per candidate, the cost of growing the transformer is amortized over many candidates and inference scales sub-linearly in the candidate count. Discriminative scoring on the candidate tokens then preserves the ranking objective familiar to DLRM practitioners.&lt;br /&gt;
&lt;br /&gt;
== Key Contributions ==&lt;br /&gt;
&lt;br /&gt;
* A hybrid scaling architecture that preserves all DLRM input features — including cross features — while inheriting the GRM-style scalability of HSTU, by reformulating recommendation as discriminative scoring over a tokenized user-aggregated sequence rather than next-token prediction.&lt;br /&gt;
* Group-Layer Normalization (GLN), a layer normalization variant that normalizes tokens within each semantic group (user, historical behavior, real-time behavior, candidate) separately so that heterogeneous feature domains can share a single attention stack.&lt;br /&gt;
* A dynamic three-rule attention mask that distinguishes static context, causal real-time interactions, and self-only candidate visibility, preventing temporal information leakage between candidates and recent user actions inside the same training sample.&lt;br /&gt;
* User-level sample aggregation that compresses all candidates of a request (or training window) into one forward pass, reducing training samples from O(candidates) to O(users) and giving sub-linear inference cost in the candidate count.&lt;br /&gt;
* A TorchRec-based training stack with dynamic hash-table embeddings, two-stage ID deduplication, automatic table merging, dynamic per-GPU batch size for load balance, bf16 mixed precision, and a CUTLASS attention kernel; together these yield 1.6×–2.4× higher throughput than vanilla TorchRec and good scaling beyond 100 GPUs.&lt;br /&gt;
&lt;br /&gt;
== Methods ==&lt;br /&gt;
&lt;br /&gt;
For a request with &amp;lt;math&amp;gt;K&amp;lt;/math&amp;gt; candidates, the traditional DLRM expands the data into &amp;lt;math&amp;gt;K&amp;lt;/math&amp;gt; independent samples &amp;lt;math&amp;gt;\mathbb{D}_i = [\mathbf{U}, \vec{\mathbf{S}}, \vec{\mathbf{R}}, \mathbf{C}_i, \mathbf{I}_i]&amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt;\mathbf{U}&amp;lt;/math&amp;gt; is the user profile, &amp;lt;math&amp;gt;\vec{\mathbf{S}}&amp;lt;/math&amp;gt; the long-term behavior sequence, &amp;lt;math&amp;gt;\vec{\mathbf{R}}&amp;lt;/math&amp;gt; recent real-time interactions, &amp;lt;math&amp;gt;\mathbf{C}_i&amp;lt;/math&amp;gt; the cross features between the user and candidate &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;\mathbf{I}_i&amp;lt;/math&amp;gt; the candidate&amp;#039;s own features. After per-feature embedding, target attention summarizes &amp;lt;math&amp;gt;\vec{\mathbf{S}}&amp;lt;/math&amp;gt; against &amp;lt;math&amp;gt;\mathbf{I}_i&amp;lt;/math&amp;gt; and an MLP produces a logit per candidate.&lt;br /&gt;
&lt;br /&gt;
MTGR rearranges the data so that the user appears once per request and the cross features are attached to candidate tokens:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\mathbb{D} = [\mathbf{U}, \vec{\mathbf{S}}, \vec{\mathbf{R}}, [\mathbf{C}, \mathbf{I}]_1, \ldots, [\mathbf{C}, \mathbf{I}]_K]&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each scalar feature in &amp;lt;math&amp;gt;\mathbf{U}&amp;lt;/math&amp;gt; becomes a token of dimension &amp;lt;math&amp;gt;d_{\text{model}}&amp;lt;/math&amp;gt;; each item in &amp;lt;math&amp;gt;\vec{\mathbf{S}}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\vec{\mathbf{R}}&amp;lt;/math&amp;gt; becomes a token via embedding-and-MLP; each candidate is a token whose embedding fuses its identity features with the user-specific cross features. The full token stream is fed through &amp;lt;math&amp;gt;L&amp;lt;/math&amp;gt; stacked HSTU blocks. Inside a block, the input &amp;lt;math&amp;gt;\mathbf{X}&amp;lt;/math&amp;gt; is normalized by Group-Layer Normalization, projected to four heads &amp;lt;math&amp;gt;\mathbf{Q}, \mathbf{K}, \mathbf{V}, \mathbf{U}&amp;lt;/math&amp;gt;, and updated via&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\tilde{\mathbf{V}} = \frac{\text{silu}(\mathbf{K}^T \mathbf{Q})}{N_{\mathbf{U}} + N_{\vec{\mathbf{S}}} + N_{\vec{\mathbf{R}}} + N_{\mathbf{I}}} \mathbf{M} \mathbf{V}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\mathbf{X} \leftarrow \text{MLP}(\text{GroupLN}(\tilde{\mathbf{V}} \odot \mathbf{U})) + \mathbf{X}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The custom mask &amp;lt;math&amp;gt;\mathbf{M}&amp;lt;/math&amp;gt; enforces three rules: the static sequence (&amp;lt;math&amp;gt;\mathbf{U}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\vec{\mathbf{S}}&amp;lt;/math&amp;gt;) is visible to all tokens; tokens in the dynamic sequence &amp;lt;math&amp;gt;\vec{\mathbf{R}}&amp;lt;/math&amp;gt; are causal — only visible to tokens chronologically later than themselves, including candidates that occurred after a given real-time event; candidate tokens are visible only to themselves, so candidates within the same request cannot leak signal to one another. This eliminates the temporal leakage that a naive causal mask would introduce when real-time interactions and candidate exposures are aggregated in the same window.&lt;br /&gt;
&lt;br /&gt;
Group-Layer Normalization, in contrast to a single shared layer norm, computes statistics within each domain (user, long-term behavior, real-time behavior, candidate) separately. Because these domains live in different semantic spaces and have different feature counts, sharing a normalization across them collapses their distributions and weakens the attention signal; the ablation study shows GLN to be roughly as impactful as adding several HSTU blocks.&lt;br /&gt;
&lt;br /&gt;
The training framework departs from TensorFlow in favor of PyTorch with TorchRec. Embedding tables use a decoupled hash-based design — a compact key-to-pointer index plus a separate value structure — that allows real-time insertion and eviction of sparse IDs without pre-allocating capacity. Cross-device embedding lookup is accelerated by two-stage ID deduplication and automatic table merging. Long-tail user sequence lengths are handled by dynamic per-GPU batch size with gradient reweighting. Three pipelined streams (copy, dispatch, compute) overlap I/O, embedding lookup, and forward/backward computation, and a CUTLASS-based attention kernel similar to FlashAttention is used together with bf16 mixed precision.&lt;br /&gt;
&lt;br /&gt;
== Results ==&lt;br /&gt;
&lt;br /&gt;
On a 10-day Meituan ranking dataset with 0.21 billion users, 4.3 million items, 23.7 billion exposures and rich cross features, MTGR is compared against several DLRM scaling families — DNN, MoE, Wukong, MultiEmbed, and UserTower — each combined with either SIM-style sequence retrieval or full end-to-end sequence modeling. The strongest DLRM baseline is UserTower-SIM. Even MTGR-small (3 HSTU blocks, &amp;lt;math&amp;gt;d_{\text{model}} = 512&amp;lt;/math&amp;gt;, 5.47 GFLOPs/example) exceeds it on AUC and GAUC for both CTR and CTCVR, and MTGR-medium (5 blocks, &amp;lt;math&amp;gt;d_{\text{model}} = 768&amp;lt;/math&amp;gt;) and MTGR-large (15 blocks, &amp;lt;math&amp;gt;d_{\text{model}} = 768&amp;lt;/math&amp;gt;, 55.76 GFLOPs/example) extend the gain monotonically, with the improvement on CTCVR GAUC following an approximately power-law relationship in computational complexity.&lt;br /&gt;
&lt;br /&gt;
Ablations show that removing Group-Layer Normalization or dynamic masking each costs roughly as much performance as the gap between MTGR-small and MTGR-medium, and removing cross features wipes out the entire MTGR-large advantage over DLRM, confirming that the design&amp;#039;s main payoff is feeding cross features into a scalable transformer rather than the transformer alone. Scalability sweeps along three independent axes — the number of HSTU blocks, the model dimension &amp;lt;math&amp;gt;d_{\text{model}}&amp;lt;/math&amp;gt;, and the input sequence length — all yield smooth power-law improvements in CTCVR GAUC.&lt;br /&gt;
&lt;br /&gt;
In a six-month online A/B test against a UserTower-SIM model that had been trained continuously for two years, MTGR-large delivered +0.0153 CTR GAUC, +0.0288 CTCVR GAUC, +1.90% PV_CTR and +1.02% UV_CTCVR — by Meituan&amp;#039;s reckoning the largest single ranking gain in nearly two years — at flat training cost and 12% lower inference cost, the latter coming from sub-linear scaling of inference in the candidate count. Notably, the MTGR model used only six months of training data while the DLRM baseline had been continuously updated over two years, suggesting that more training data should widen the margin further.&lt;br /&gt;
&lt;br /&gt;
== Impact ==&lt;br /&gt;
&lt;br /&gt;
MTGR is one of the first reported industrial deployments to make the HSTU-style generative architecture compatible with the cross-feature-rich pipelines that drive most production rankers, addressing a key obstacle that had limited generative recommenders to feature-light public benchmarks. By showing that scaling laws hold for ranking models when input richness is preserved, the work strengthens the case that recommendation can follow the same compute-driven trajectory as language and vision.&lt;br /&gt;
&lt;br /&gt;
Practically, the system runs on the main traffic of Meituan, the world&amp;#039;s largest food-delivery platform, serving hundreds of millions of users; the released framework choices — TorchRec with dynamic hash tables, group-wise normalization, and dynamic masking — provide a concrete reference for other industrial teams migrating from DLRM-style stacks to transformer-based ranking.&lt;br /&gt;
&lt;br /&gt;
The authors close by sketching a path toward multi-scenario foundation models for recommendation, in which a single MTGR-style backbone could be shared across multiple business surfaces, mirroring the way large language models are reused across downstream tasks.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Recommender system]]&lt;br /&gt;
* [[Deep learning]]&lt;br /&gt;
* [[Transformer (deep learning architecture)]]&lt;br /&gt;
* [[Attention (machine learning)]]&lt;br /&gt;
* [[Neural scaling law]]&lt;br /&gt;
* [[Click-through rate]]&lt;br /&gt;
* [[Layer normalization]]&lt;br /&gt;
* [[Embedding (machine learning)]]&lt;br /&gt;
* [[FlashAttention]]&lt;br /&gt;
* [[Mixture of experts]]&lt;br /&gt;
* [[Meituan]]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* Han, R., Yin, B., Chen, S., Jiang, H., Jiang, F., Li, X., Ma, C., Huang, M., Li, X., Jing, C., Han, Y., Zhou, M., Yu, L., Liu, C., and Lin, W. (2025). &amp;#039;&amp;#039;MTGR: Industrial-Scale Generative Recommendation Framework in Meituan&amp;#039;&amp;#039;. arXiv:2505.18654.&lt;br /&gt;
* Zhai, J. et al. (2024). Actions Speak Louder than Words: Trillion-Parameter Sequential Transducers for Generative Recommendations (HSTU).&lt;br /&gt;
* Deng, J. et al. (2025). OneRec: Unifying Retrieve and Rank with Generative Recommender and Iterative Preference Alignment. arXiv:2502.18965.&lt;br /&gt;
* Kaplan, J. et al. (2020). Scaling Laws for Neural Language Models.&lt;br /&gt;
* Dao, T. et al. (2022). FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness.&lt;br /&gt;
* Ivchenko, D. et al. (2022). TorchRec: a PyTorch Domain Library for Recommendation Systems.&lt;br /&gt;
* Pi, Q. et al. (2020). Search-Based User Interest Modeling with Lifelong Sequential Behavior Data for Click-Through Rate Prediction (SIM).&lt;br /&gt;
* Zhang, B. et al. (2024). Wukong: Towards a Scaling Law for Large-Scale Recommendation.&lt;br /&gt;
* Guo, X. et al. (2023). On the Embedding Collapse when Scaling up Recommendation Models.&lt;br /&gt;
&lt;br /&gt;
[[Category:NLP]]&lt;br /&gt;
[[Category:Research]]&lt;br /&gt;
[[Category:Research Papers]]&lt;/div&gt;</summary>
		<author><name>FuzzyBot</name></author>
	</entry>
</feed>