TGR-EvoDAG: A DAG-based Multi-Agent Code Evolution Framework for Generative Recommendation on Tencent
Organizations: Platform and Content Group, Tencent, Shenzhen, China · The Hong Kong Polytechnic University, Hong Kong, China · McGill University, Montreal, Canada · Independent Researcher, China
Abstract
Large Language Model (LLM) agents have enabled automated code evolution for algorithm discovery. However, current recursive self-improvement (RSI) research for sequential recommendation faces a dilemma: general-purpose frameworks lack domain-specific feedback, while recommender-specific frameworks rely on linear evolution. Crucially, naively integrating them fails when applied to Generative Recommendation (GR). Unlike end-to-end models, GR relies on a module-cascaded pipeline (tokenization, pre-training, and alignment). In this paradigm, existing evolution methods suffer from: i) cost blindness, squandering budgets by ignoring stage-asymmetric retraining overheads; and ii) short-sighted evaluation, discarding promising upstream innovations that temporarily regress metrics before downstream adaptation. To bridge these gaps, we propose TGR-EvoDAG, a multi-agent code evolution framework tailored for GR. TGR-EvoDAG models code evolution as a Directed Acyclic Graph (DAG) to maintain multiple evolution branches and merge complementary innovations, unifying advanced search with rich GR diagnostic feedback. We further introduce stage-aware cost planning to optimize GPU-hour budgets, and active downstream co-adaptation to navigate temporary regressions and unlock cross-stage gains. On public Amazon datasets, TGR-EvoDAG enables the first autonomous evolution of a complete GR pipeline, improving offline metrics by up to 37.4% and Agent4Rec simulated user satisfaction by 19.7% over the strongest baseline. Furthermore, in industrial deployment on Tencent's large-scale commercial media platform, the evolved GR achieves a 12.16% relative improvement in offline Hit@1 and a statistically significant 0.40% increase in online click-through rate (CTR).
Figures & tables
| Testset Metrics | Agent4Rec | ||||||
| Method | Hit@10 | Hit@20 | NDCG@10 | NDCG@20 | View | Sat. | Depth |
| Existing Non-Evolutionary Baselines | |||||||
| TIGER (Pre-train) ( Rajput et al., 2023 ) | 0.0626 | 0.0944 | 0.0316 | 0.0396 | 0.270 | 5.45 | 2.45 |
| SDPO ( Chen et al., 2024 ) | 0.0614 | 0.0946 | 0.0313 | 0.0396 | 0.288 | 5.75 | 2.55 |
| SPRec ( Gao et al., 2025 ) | 0.0626 | 0.0975 | 0.0310 | 0.0398 | 0.305 | 5.95 | 2.70 |
| ReReGRPO ( Tan et al., 2025 ) | 0.0663 | 0.0991 | 0.0331 | 0.0414 | 0.333 | 6.20 | 2.80 |
Appendix figures & tables4 assets
Supplementary material from the paper’s appendix.
Appendix
| Dataset | |||||
| Amazon Office | 4,905 | 2,420 | 53,258 | 10.86 | 0.45% |
| Group | Configuration | Value |
| Tokenizer | Semantic encoder | Llama-3.1-8B-Instruct |
| Quantizer | RQ-Kmeans | |
| # Levels | 4 | |
| Collision handling | de-duplication suffix | |
| Backbone (TIGER) | Architecture | Transformer encoder-decoder |
| # Encoder / decoder layers | 4 / 4 |
| Representative probes | Diagnosed failure mode |
| Family: sid_generation | |
| layer_entropy , layer_confidence | per-layer decoding confidence; last-step or coarse-level collapse |
| layer_top5_mass | |
| prefix_diversity_topk | whether the top- list concentrates on few shared prefixes (i.e., SID utilisation) |
| branching_factor_per_layer | fan-out per SID layer; whether the top- list is a rich subtree or parallel trajectories |
| avg_lcp_depth_topk | beam collapse to a single coarse prefix |
| Field | Type | Semantics |
| status | string | verdict in { CRITICAL , NEEDS_IMPROVEMENT , STABLE } |
| alignment | list[str] | behaviours where the model aligns with user choice logic |
| misalignment | list[str] | behaviours where the model misreads user intent |
| overused_signals | list[str] | decision patterns the model relies on excessively |
| missing_signals | list[str] | signals the model under-weights or misses |
| primary_failure_mode | string | the dominant failure mode at the top of the list |
Generative Recommendation
Generative recommendation models user histories and item catalogs to generate personalized items, lists, or queries rather than only scoring candidates.
See all 106 papers