SearcharxivSearch

arXiv subjects

Xiaojiang Zhang

Publications and source records attributed to Xiaojiang Zhang.

11 recordsLinked to original sources

Tree Training: Accelerating Agentic LLMs Training via Shared Prefix Reuse

Agentic large language model (LLM) training often involves multi-turn interaction trajectories that branch into multiple execution paths due to concurrent tool use, think-mode, sub-agent, context management and other runtime designs. As a result, the tokens produced by a single task naturally form a tree-structured token trajectory with shared prefixes, rather than a linear sequence. Existing training pipelines linearize such trajectories and treat each branch independently, leading to substantial redundant computation in both forward and backward passes. We derive that averaging the loss over all branches independently is algebraically identical to a per-token weighted loss, where each token's weight equals the fraction of branches passing through it. The problem therefore reduces to computing the log-probability of every token in the prefix tree exactly once, with no repeated computation across shared prefixes: we propose DFS serialization of the tree, which visits every token exactly once, and adapt full-attention and SSM layers to ensure the resulting log-probabilities match independent per-branch calculation exactly. In practice, a single trajectory tree can be too large to fit in GPU memory; we therefore propose Redundancy-Free Tree Partitioning, which handles memory-constrained settings with zero redundant computation and peak memory bounded by a single root-to-leaf path. Together, these contributions form Tree Training, an efficient framework for training LLMs on tree-structured trajectories, achieving up to 6.2x end-to-end training speedup on dense and MoE models for both supervised fine-tuning and reinforcement learning.

cs.LG

SWE-Compass: Towards Unified Evaluation of Agentic Coding Abilities for Large Language Models

Evaluating large language models (LLMs) for software engineering has been limited by narrow task coverage, language bias, and insufficient alignment with real-world developer workflows. Existing benchmarks often focus on algorithmic problems or Python-centric bug fixing, leaving critical dimensions of software engineering underexplored. To address these gaps, we introduce SWE-Compass1, a comprehensive benchmark that unifies heterogeneous code-related evaluations into a structured and production-aligned framework. SWE-Compass spans 8 task types, 8 programming scenarios, and 10 programming languages, with 2000 high-quality instances curated from authentic GitHub pull requests and refined through systematic filtering and validation. We benchmark ten state-of-the-art LLMs under two agentic frameworks, SWE-Agent and Claude Code, revealing a clear hierarchy of difficulty across task types, languages, and scenarios. Moreover, by aligning evaluation with real-world developer practices, SWE-Compass provides a rigorous and reproducible foundation for diagnosing and advancing agentic coding capabilities in large language models.

cs.SE

KAT-Coder Technical Report

Recent advances in large language models (LLMs) have enabled progress in agentic coding, where models autonomously reason, plan, and act within interactive software development workflows. However, bridging the gap between static text-based training and dynamic real-world agentic execution remains a core challenge. In this technical report, we present KAT-Coder, a large-scale agentic code model trained through a multi-stage curriculum encompassing Mid-Term Training, Supervised Fine-Tuning (SFT), Reinforcement Fine-Tuning (RFT), and Reinforcement-to-Deployment Adaptation. The Mid-Term stage enhances reasoning, planning, and reflection capabilities through a corpus of real software engineering data and synthetic agentic interactions. The SFT stage constructs a million-sample dataset balancing twenty programming languages, ten development contexts, and ten task archetypes. The RFT stage introduces a novel multi-ground-truth reward formulation for stable and sample-efficient policy optimization. Finally, the Reinforcement-to-Deployment phase adapts the model to production-grade IDE environments using Error-Masked SFT and Tree-Structured Trajectory Training. In summary, these stages enable KAT-Coder to achieve robust tool-use reliability, instruction alignment, and long-context reasoning, forming a deployable foundation for real-world intelligent coding agents. Our KAT series 32B model, KAT-Dev, has been open-sourced on https://huggingface.co/Kwaipilot/KAT-Dev.

cs.CL

SeamlessFlow: A Trainer Agent Isolation RL Framework Achieving Bubble-Free Pipelines via Tag Scheduling

We introduce SeamlessFlow, a server based reinforcement learning (RL) framework that addresses two core challenges in industrial scale RL: (1) decoupling RL training from the complex execution flow of agents; (2) maximizing GPU utilization with minimal idle time while preserving the stability and scalability required for large-scale deployments. First, SeamlessFlow introduces a data plane that decouples the RL trainer from diverse, complex agent implementations while sustaining high throughput. A central trajectory manager maintains complete interaction histories and supports partial rollout, allowing rollout to pause for weight updates and resume seamlessly, keeping agents unaware of service interruptions. Second, we propose a tag driven scheduling paradigm that abstracts hardware into capability tagged resources, unifying colocated and disaggregated architectures. Based on this, SeamlessFlow introduces a spatiotemporal multiplexing pipeline that dynamically reassigns idle training nodes to rollout in a train rollout separated setup, eliminating pipeline bubbles and fully exploiting heterogeneous cluster resources. By combining these innovations, SeamlessFlow delivers both stability and high performance, making it well suited for multi agent, long horizon, and other complex RL tasks.

cs.LG

KAT-V1: Kwai-AutoThink Technical Report

We present Kwaipilot-AutoThink (KAT), an open-source 40B large language model developed to address the overthinking problem in reasoning-intensive tasks, where an automatic thinking training paradigm is proposed to dynamically switch between reasoning and non-reasoning modes based on task complexity. Specifically, first, we construct the dual-regime dataset based on a novel tagging pipeline and a multi-agent synthesis strategy, and then we apply Multi-Token Prediction (MTP)-enhanced knowledge distillation, enabling efficient and fine-grained reasoning transfer with minimal pretraining cost. Besides, we implement a cold-start initialization strategy that introduces mode-selection priors using majority-vote signals and intent-aware prompting. Finally, we propose Step-SRPO, a reinforcement learning algorithm that incorporates intermediate supervision into the GRPO framework, offering structured guidance over both reasoning-mode selection and response accuracy. Extensive experiments across multiple benchmarks demonstrate that KAT consistently matches or even outperforms current state-of-the-art models, including DeepSeek-R1-0528 and Qwen3-235B-A22B, across a wide range of reasoning-intensive tasks while reducing token usage. Notably, KAT outperforms all open-source models and even surpasses o3-mini on the leakage-controlled LiveCodeBench Pro. Beyond academic evaluation, KAT has been successfully deployed in Kwaipilot (i.e., Kuaishou's internal coding assistant), where it improves real-world development workflows with high accuracy, efficiency, and controllable reasoning behaviors. Moreover, we are actively training a 200B Mixture-of-Experts (MoE) model with 40B active parameters, and early results already show significant gains, further demonstrating the scalability of the AutoThink paradigm.

cs.CL

SRPO: A Cross-Domain Implementation of Large-Scale Reinforcement Learning on LLM

Recent advances of reasoning models, exemplified by OpenAI's o1 and DeepSeek's R1, highlight the significant potential of Reinforcement Learning (RL) to enhance the reasoning capabilities of Large Language Models (LLMs). However, replicating these advancements across diverse domains remains challenging due to limited methodological transparency. In this work, we present two-Staged history-Resampling Policy Optimization (SRPO), which surpasses the performance of DeepSeek-R1-Zero-32B on the AIME24 and LiveCodeBench benchmarks. SRPO achieves this using the same base model as DeepSeek (i.e. Qwen2.5-32B), using only about 1/10 of the training steps required by DeepSeek-R1-Zero-32B, demonstrating superior efficiency. Building upon Group Relative Policy Optimization (GRPO), we introduce two key methodological innovations: (1) a two-stage cross-domain training paradigm designed to balance the development of mathematical reasoning and coding proficiency, and (2) History Resampling (HR), a technique to address ineffective samples. Our comprehensive experiments validate the effectiveness of our approach, offering valuable insights into scaling LLM reasoning capabilities across diverse tasks.

cs.LG

A deterministic solver for the linear Boltzmann model of a single mono-directional proton beam

The linear Boltzmann model for proton beams is a six-dimensional partial differential equation (PDE). We propose a deterministic solver for the linear Boltzmann model based on scattering decomposition and depth-splitting methods. The main idea is to first divide the protons into primary protons and scattering protons, whose equations are derived using the source iteration method. We then treat depth as the time variable in classical time-evolutionary problems and apply the depth-splitting method. In the depth-splitting method, the full operator is decomposed into three parts, with each subsystem being easily parallelizable, which is crucial for efficient simulations. The resulting discretization exhibits second-order convergence in both the depth and energy variables. The dose distributions obtained from our solver are compared with those from Monte Carlo simulations for various materials and heterogeneous cases.

math.NA

Asymptotic-preserving particle-in-cell method for the magnetized Vlasov--Poisson--Fokker--Planck equation

In this work, we develop and rigorously analyze a new class of particle methods for the magnetized Vlasov--Poisson--Fokker--Planck system. The proposed approach addresses two fundamental challenges: (1) the curse of dimensionality, which we mitigate through particle methods while preserving the system's asymptotic properties, and (2) the temporal step size limitation imposed by the small Larmor radius in strong magnetic fields, which we overcome through semi-implicit discretization schemes. We establish the theoretical foundations of our method, proving its asymptotic-preserving characteristics and uniform convergence through rigorous mathematical analysis. These theoretical results are complemented by extensive numerical experiments that validate the method's effectiveness in long-term simulations. Our findings demonstrate that the proposed numerical framework accurately captures key physical phenomena, particularly the magnetic confinement effects on plasma behavior, while maintaining computational efficiency.

math.NA

A fully asymptotic preserving decomposed multi-group method for the frequency-dependent radiative transfer equations

The opacity of FRTE depends on not only the material temperature but also the frequency, whose values may vary several orders of magnitude for different frequencies. The gray radiation diffusion and frequency-dependent diffusion equations are two simplified models that can approximate the solution to FRTE in the thick opacity regime. The frequency discretization for the two limit models highly affects the numerical accuracy. However, classical frequency discretization for FRTE considers only the absorbing coefficient. In this paper, we propose a new decomposed multi-group method for frequency discretization that is not only AP in both gray radiation diffusion and frequency-dependent diffusion limits, but also the frequency discretization of the limiting models can be tuned. Based on the decomposed multi-group method, a full AP scheme in frequency, time, and space is proposed. Several numerical examples are used to verify the performance of the proposed scheme.

math.NA

A Spatial-Temporal asymptotic preserving scheme for radiation magnetohydrodynamics in the equilibrium and non-equilibrium diffusion limit

The radiation magnetohydrodynamics (RMHD) system couples the ideal magnetohydrodynamics equations with a gray radiation transfer equation. The main challenge is that the radiation travels at the speed of light while the magnetohydrodynamics changes with the time scale of the fluid. The time scales of these two processes can vary dramatically. In order to use mesh sizes and time steps that are independent of the speed of light, asymptotic preserving (AP) schemes in both space and time are desired. In this paper, we develop an AP scheme in both space and time for the RMHD system. Two different scalings are considered. One results in an equilibrium diffusion limit system, while the other results in a non-equilibrium system. The main idea is to decompose the radiative intensity into three parts, each part is treated differently with suitable combinations of explicit and implicit discretizations guaranteeing the favorable stability conditionand computational efficiency. The performance of the AP method is presented, for both optically thin and thick regions, as well as for the radiative shock problem.

math.NA

Accurate front capturing asymptotic preserving scheme for nonlinear gray radiative transfer equation

We develop an asymptotic preserving scheme for the gray radiative transfer equation. Two asymptotic regimes are considered: one is a diffusive regime described by a nonlinear diffusion equation for the material temperature; the other is a free streaming regime with zero opacity. To alleviate the restriction on time step and capture the correct front propagation in the diffusion limit, an implicit treatment is crucial. However, this often involves a large-scale nonlinear iterative solver as the spatial and angular dimensions are coupled. Our idea is to introduce an auxiliary variable that leads to a ``redundant" system, which is then solved with a three-stage update: prediction, correction, and projection. The benefit of this approach is that the implicit system is local to each spatial element, independent of angular variable, and thus only requires a scalar Newton's solver. We also introduce a spatial discretization with a compact stencil based on even-odd decomposition. Our method preserves both the nonlinear diffusion limit with correct front propagation speed and the free streaming limit, with a hyperbolic CFL condition.

math.NA