Multimodal Enhancement and Post-Training Optimization: Key Pathways to Long-Horizon Agent Capabilities in Large Models

    This article examines the core challenges of reinforcement learning for long-horizon agent tasks, where sparse outcome-only rewards penalize good intermediate decisions. It introduces counterfactual local branching—a technique inspired by MCTS and causal reasoning—as a way to derive process-level reward signals without human annotation, explains how sandbox scaling has emerged as a new dimension of the scaling law for post-training, and discusses how these techniques allow smaller models to outperform larger ones on agentic benchmarks, along with future challenges such as reward hacking and evaluation design.

    From Outcome-Only Rewards to Process Awareness: The Dilemma of RL for Long-Horizon Tasks

    The capability frontier of large language models is rapidly extending from short question-answering toward complex multi-step reasoning and interactive tasks. In real-world software engineering or cybersecurity scenarios, a model often needs to interact with its environment for dozens or even hundreds of rounds—locating problems, understanding code architecture, designing fixes, applying changes, and verifying results. Long-horizon agent tasks share a common characteristic: the quality of any single step is hard to judge directly, while the extreme sparsity of the final outcome pushes traditional reinforcement learning algorithms into a corner.

    Take a programming task as an example. A model might produce a nearly perfect reasoning trajectory across the first 78 rounds of interaction—accurately pinpointing the root cause of a bug, thoroughly understanding inter-module dependencies, and even conceiving an elegant solution. Then, at step 79, a typo in a variable name causes the final unit test to fail, and the reward for the entire trajectory drops to zero. Under classic policy gradient methods such as PPO or GRPO, because the final return of the whole trajectory is 0, the gradient signal indiscriminately penalizes the token generation probabilities at every timestep. The model’s 78 steps of “brilliant moves” receive no positive reinforcement—instead, they are suppressed together with the final blunder.

    This outcome-only evaluation mechanism also exists in Go: if you lose the game, your entire strategy is judged a failure regardless of how brilliant your tactical combinations were along the way. But a Go game has a limited number of moves, and human experts can annotate critical moves through post-game review. In LLM training environments, trajectories number in the millions, and every round requires quality assessment of each intermediate step. This creates a fundamental contradiction: evaluating intermediate steps requires understanding the deep structure of the task itself, yet understanding task structure is precisely the core capability the model is trying to learn.

    Counterfactual Local Branching: Solving the Chicken-and-Egg Problem of Process Rewards

    How can we provide effective reward signals for every intermediate step in long-horizon agent tasks without relying on human annotation? This is the central challenge of the post-training stage. The intuitive solution is to introduce a Process Reward Model (PRM) that scores each step immediately. However, this approach faces two obstacles. First, training a PRM itself requires large amounts of process-level human-annotated data, which is extremely costly and hard to scale. Second, for complex engineering tasks, even experts struggle to assign objective quantitative scores to abstract capabilities such as “code exploration strategy” or “depth of architectural understanding.”

    A breakthrough idea from frontier research comes from deeply integrating Monte Carlo Tree Search (MCTS) with causal reasoning. The core technique is called counterfactual local branching. Its elegance lies in this: rather than trying to directly evaluate the quality of a step, it perturbs branches from the current trajectory and observes how much subsequent outcomes change, thereby indirectly inferring the step’s importance.

    Concretely, after the model completes a state transition at a given moment, the optimization algorithm starts from that state, tries multiple different candidate branch actions, and uses a value network or reward model to estimate the expected return of each branch’s continuation. If a particular branch action shows a significantly higher probability of success across multiple subsequent rollouts, that step is treated as a critical decision point, and its tokens receive a higher advantage estimate. Conversely, if all branches perform similarly, the step’s decision space is relatively flat and has limited impact on the final result.

    This approach closely mirrors the search mechanism of Go AIs such as AlphaZero. In Go, MCTS simulates games to evaluate the win rate of different move positions, converting the final win/loss outcome into immediate feedback for every move. Counterfactual local branching performs an analogous search-and-backup process over the “game records” of language tasks. It sidesteps the difficulty of directly judging “whether this step was written well,” and instead infers advantage by comparing “what would happen if it were written differently.”

    Notably, this valuation method requires neither precise domain knowledge nor human process annotations—it only needs a reward function capable of judging the outcome of complete trajectories. The trade-off is a significant increase in inference-time sampling compute: to ensure the reliability of counterfactual branches, the system must generate multiple distinct branches at each critical node and roll each one out for several steps, which depends heavily on the parallel computing capacity of the sandbox environment.

    Sandbox Scaling: New Fuel for the Data Flywheel

    At this point, the iron law that “there is no intelligence without scale” remains unbroken. Although some open-source small models show surprising performance gains under specific training techniques, what often lies behind them is a shift in where the compute investment is concentrated.

    In the post-training stage of large models, a new scaling dimension is emerging—the scale of sandbox environments. In the training of coding and cybersecurity agents, lightweight sandboxes provide models with safe code execution environments, network topology simulation, and target system images. As training tasks grow more complex, each trajectory demands more sandbox resources, while the number of trajectories required to train a high-performance agent grows exponentially. Therefore, the number of sandbox instances that can be allocated in parallel directly determines the volume of high-quality training data that can be collected per unit of time.

    Public reports indicate that sandbox resources for frontier models’ post-training have increased by tens of times compared to previous generations. This “sandbox scaling law” is becoming a new growth curve following parameter scale, data scale, and compute scale. Under this framework, architectural parameter count is no longer the sole decisive factor—through training on massive volumes of high-quality interaction data with process-level reward signals, a smaller model can outperform models several times its size on specific tasks.

    This phenomenon carries deep theoretical implications. Traditional scaling laws focus on the parameter count of a model’s forward pass, emphasizing growth in static fitting capacity. Sandbox scaling, by contrast, focuses on the throughput and diversity of experiential data generated by agent-environment interaction—essentially a scale effect of dynamic reinforcement learning. When the training distribution closely matches the evaluation distribution, post-training gains can even compensate for architectural capacity gaps of tens of times in parameter count.

    The Dynamic Balance Between Architecture and Training: Practical Observations and Outlook

    With this technical logic in mind, it is instructive to re-examine how current models’ capabilities are evolving. During an upgrade, one model in the industry did not switch its base architecture, instead choosing to strengthen the post-training pipeline on the existing structure. This decision sparked public controversy—some voices argued that not changing the architecture signaled depleted technical reserves—but when evaluation data was released, the results caught the market’s attention.

    Across multiple benchmarks of long-horizon agent capability—including real software repository issue resolution, cyber attack-and-defense exercises, and comprehensive agent evaluations—the new model, with roughly half the activated parameters, surpassed a larger model built on a next-generation architecture and fully pre-trained, on several core metrics.

    Judged solely by theoretical capacity at the pre-training stage, this result seems counterintuitive. But once systematic engineering optimization at the post-training stage is taken into account, the phenomenon is logically consistent. The new model’s training pipeline multiplied the inference-side search budget (the number of counterfactual branch samples) several-fold and refined the stabilizer mechanisms throughout the optimization process. This amounts to a large-scale “specialized training camp” during the reinforcement learning stage, using compute resources to close the generational gap in the base architecture.

    This trend suggests that competition in model capability is shifting from a “pre-training arms race” toward “refined post-training operations.” Pre-training determines the ceiling of a model’s capability; post-training determines how much of that ceiling is converted into actual task performance. As test-time compute strategies mature, there is good reason to believe this closed-loop process of repeated “search–execute–evaluate–feedback” will become the mainstream paradigm for future capability improvement.

    Looking Ahead: From Task Execution to Autonomous Evolution

    Looking forward, the post-training route built on counterfactual local branching and sandbox scaling has potential far beyond programming and cybersecurity. Any task with a clear outcome signal that requires multi-step reasoning—including mathematical problem solving, scientific experiment design, and complex document drafting—could achieve significant capability leaps under this framework.

    However, this route also faces serious challenges. The accuracy of counterfactual branch valuation depends heavily on the quality of reward function design. Scaling up sandbox environments brings exponential compute consumption. And within the exploration–exploitation dilemma of reinforcement learning, how to prevent the model from exploiting loopholes in environment design to gain process rewards—reward hacking—remains an ongoing research problem.

    Meanwhile, the evaluation of long-horizon agent tasks is itself evolving toward greater systematization. Ideal evaluation should measure not only the success rate of final outcomes, but also provide a panoramic assessment of dimensions such as intermediate-process interpretability, resource utilization efficiency, and error recovery capability. Only when training objectives and evaluation systems are progressively aligned can AI’s autonomous decision-making in complex real-world tasks truly move toward autonomous evolution.

    It is foreseeable that every iteration of post-training technology pushes the capability boundary of large models forward by a significant step. Teams that achieve coordinated innovation across reasoning depth, systems engineering, and compute infrastructure will hold a favorable position in this continuously evolving race for intelligence.