Manuscript Offprint

arXiv:2610.32326

TGR-EvoDAG: A DAG-based Multi-Agent Code Evolution Framework for Generative Recommendation on Tencent

Junlin He, Junzhang Zhu, Yudong Li, Yihong Tang, Xuefeng Jiang, Wei Ma, Chengxiang Zhuo, Zang Li

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

Large Language Model (LLM) agents have enabled automated code evolution, offering a promising paradigm for algorithm discovery. However, current recursive self-improvement (RSI) research for sequential recommendation faces a critical dilemma: general-purpose code evolution frameworks possess flexible search mechanisms but lack domain-specific feedback, whereas recommender-specific evolution frameworks utilize rich feedback but rely on linear evolution. More critically, naively integrating them fails when applied to Generative Recommendation (GR). Unlike traditional end-to-end models, GR relies on a module-cascaded training pipeline (i.e., tokenization, pre-training, and alignment). In this paradigm, existing naive evolution methods inevitably suffer from i) cost blindness: squandering budgets by ignoring stage-asymmetric retraining overheads; and ii) shortsighted 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 explicitly tailored for GR. TGR-EvoDAG organizes code evolution as a Directed Acyclic Graph (DAG) that explicitly maintains multiple evolution branches and merges complementary innovations, and harmonizes an advanced search mechanism with rich GR-specific diagnostic feedback. We further introduce stage-aware cost planning to optimize real-world GPU-hour budgets, and active downstream co-adaptation to navigate temporary regressions and unlock deferred cross-stage gains. On public Amazon datasets, TGR-EvoDAG marks the first autonomous evolution of a complete GR pipeline, improving offline metrics by up to 37.4% and boosting Agent4Rec simulated user satisfaction by 19.7% over the strongest GR baseline. Furthermore, in industrial settings, the evolved GR achieves a 12.16% relative improvement in offline Hit@1 and, when deployed as an additional retrieval channel on Tencent's large-scale commercial media platform, a statistically significant 0.40% increase in online click-through rate (CTR).

1 INTRODUCTION

With the emergence of Large Language Model (LLM) agents, LLM-driven code evolution has emerged as a promising paradigm, paving the way for Recursive Self-Improvement (Romera-Paredes et al., 2024; Jiang et al., 2025; Chen et al., 2026). This approach gives agents research-like capabilities: they propose hypotheses, modify code, run experiments, and collect feedback, enabling algorithms to self-evolve continuously (Lu et al., 2024; Chan et al., 2025; Huang et al., 2024; Liu et al., 2026; Chen et al., 2021). To accelerate experimental iterations and reduce labor costs for recommendation engineers, an increasing number of studies have introduced this paradigm into the field of sequential recommendation (Wang et al., 2026; Kim et al., 2026; Mu et al., 2026).

While general-purpose code evolution has achieved sophisticated search mechanisms, such as multi-branch exploration and cross-branch merging, through population-based approaches (Romera-Paredes

∗^{*}Equal contribution.

(a) Sequential recommendation

Figure

(b) Generative recommendation: a 3-stage cascade

(c) What a cascaded GR pipeline demands — and what existing evolution frameworks provide

Framework familyEvolution topologyRec-domain feedbackCascade awareness (gaps 1 2)
Multi-branch explorationCross-branch mergingUser Simulation Math ProbesStage-aware cost planningDeferred-gain co-adaptation
General-purpose code evolution●○○○○
Recommender-specific evolution○○●○○
TGR-EvoDAG (ours)●●●●●

● supported

partial / implicit

○ not supported

Figure 1: Comparison of recommendation paradigms and evolution framework capabilities. (a) Traditional sequential recommendation relies on an end-to-end architecture characterized by uniform retraining costs and immediate metric feedback. (b) GR utilizes a cascaded pipeline, which introduces stage-asymmetric retraining costs and deferred cross-stage gains, causing existing frameworks to suffer from cost blindness and short-sighted evaluation. (c) Capability comparison demonstrating that TGR-EvoDAG uniquely fulfills the specific demands required to evolve cascaded GR pipelines.

et al., 2024; Lange et al., 2026; Jiang et al., 2025) and tree/graph-based architectures (Jin et al., 2026), they generally lack the domain-specific feedback signals essential for recommender systems. Conversely, existing recommender evolution frameworks invest heavily in feedback quality by utilizing simulated users and diagnostic probes, yet they predominantly rely on primitive search mechanisms. For instance, SERS (Wang et al., 2026) uses a simple fan-out/fan-in strategy without branch maintenance; EvoRec performs greedy, round-by-round linear advancement (Mu et al., 2026); and Self-EvolveRec samples a parent node from multiple elites (Kim et al., 2026).

These simple search mechanisms restrict existing recommender evolution frameworks to traditional end-to-end models, where modifications incur a uniform full-training cost and produce immediate metric changes (Kang & McAuley, 2018; Hidasi et al., 2016; Sun et al., 2019). They fail on Generative Recommendation (GR), an increasingly popular paradigm built on a cascaded pipeline (tokenizer, pre-training, and alignment)(Geng et al., 2022; Rajput et al., 2023; Wang et al., 2024; Deng et al., 2025; Pang et al., 2025; TGR Team et al., 2026), because they cannot effectively maintain or merge cross-stage innovations. While explicitly combining advanced general-purpose search mechanisms with domain-specific feedback seems like a natural solution, this naive integration still falls short. General-purpose mechanisms fundamentally rely on two implicit assumptions that a cascaded GR pipeline structurally violates: 1) Cost Blindness vs. Stage-Dependent Costs. General-purpose search policies evaluate all candidate nodes uniformly, ignoring how much retraining an edit requires. In GR, however, retraining costs are highly asymmetric: modifying the upstream Tokenizer forces a full-pipeline retraining, whereas editing the downstream Alignment stage only re-runs the final segment. Being “cost-blind,” existing frameworks cannot triage edits based on actual overhead, systematically squandering budgets on expensive upstream explorations. 2) Short-Sighted Evaluation vs. Deferred Gains. General-purpose frameworks judge modifications by their immediate scores, pruning candidates that initially regress performance. However, because GR stages are tightly coupled, modifying an upstream stage almost always breaks compatibility with the unadapted downstream stage, causing a temporary performance drop. Lacking structural awareness, existing frameworks abandon these upstream innovations, missing the opportunity to actively schedule the necessary downstream adaptations to unlock “deferred” gains(Liu et al., 2025a).

To this end, we present TGR-EvoDAG, a multi-agent code evolution framework explicitly built for cascaded GR pipelines. TGR-EvoDAG seamlessly marries advanced graph search mechanisms with rich domain-specific feedback. It represents the search space as a Code Directed Acyclic Graph (Code DAG), driven by a five-stage collaborative Agent workflow (comprising an Operator Selector,

Architect-Critic, Coder-Reviewer, Distiller, and Pruner) that digests fine-grained recommendation signals, such as mathematical probes and simulated user (Zhang et al., 2024). Building upon this foundation, TGR-EvoDAG tightly integrates the multi-agent workflow with two novel mechanisms to overcome the inherent blind spots of cascaded pipelines. First, to address cost blindness, we introduce Stage-Aware Cost Planning via the Operator Selector. Each DAG node records the exact pipeline stages its edit touches and the corresponding retraining overhead. Empowered by this stage-aware schema, our Operator Selector dynamically balances the expected performance gain against the actual GPU-hour cost, preventing the framework from blindly exhausting budgets on expensive upstream explorations. Second, to overcome short-sighted evaluation, we design Active Downstream Co-Adaptation. Instead of rigidly discarding candidates that cause immediate performance drops, TGR-EvoDAG explicitly retains these seemingly “regressed” upstream branches. When the framework identifies an upstream edit (e.g., Tokenizer) lacking a corresponding downstream adaptation (e.g., Pre-training), the agents deliberately schedule a child node to adapt the downstream stage. This recovers gains from upstream edits that greedy frameworks would discard.

To evaluate our framework fairly, we construct a standardized GR evolution platform equipped with stage-aware feedback and precise GPU-hour accounting, ensuring all compared frameworks evolve from an identical seed codebase. In summary, our core contributions are:

• We identify and formulate the structural mismatch between current code evolution frameworks and cascaded GR pipelines. Specifically, we expose how cost blindness and short-sighted evaluation cause existing methods to systematically misallocate computational budgets and discard promising cross-stage innovations.

• We propose TGR-EvoDAG, which harmonizes Code DAG search mechanisms with domain-specific feedback via a comprehensive five-stage multi-agent workflow. By further introducing stage-aware cost planning and active co-adaptation, TGR-EvoDAG enables efficient GR evolution.

• We develop a standardized GR evolution platform. Extensive experiments demonstrate that TGR-EvoDAG achieves the fully autonomous evolution of a complete GR training pipeline, surpassing both general and recommender-specific evolutionary baselines. It improves offline metrics by up to 37.4% and boosts user satisfaction in the Agent4Rec simulated environment by 19.7% over the strongest GR baseline. Moreover, applying the evolved architecture to Tencent's real-world industrial scenarios yields a 12.16% relative improvement in offline Hit@1 and a statistically significant 0.40% increase in online Click-Through Rate in a 14-day A/B test, demonstrating its practical value.

TGR-EvoDAG is part of the TGR series of generative recommendation research at Tencent (TGR Team et al., 2026). Beyond this paper, TGR-EvoDAG has been integrated into Tencent's internal Uppimo platform as its implementation backbone, which productizes the recursive self-improvement (RSI) workflow described here for production recommendation teams; the platform will be made available for public trial in the future.

References (48)