Shanghai AI Lab's TREX Automates LLM Fine-Tuning and Beats Human Experts
A multi-agent system from Shanghai AI Lab uses tree search to automate LLM fine-tuning, beating expert-designed recipes on multiple tasks.
PRO- TREX automates the entire LLM fine-tuning lifecycle using a Researcher and Executor agent pair (paper).
- Uses MCTS to plan experiment trees, balancing exploitation of good recipes with exploration of new ones.
- Beats human-expert fine-tuning on TOMG-Bench (+0.498 vs +0.189) and matches complex pipelines on OpenFinData.
- Ships with FT-Bench, a 10-task benchmark for automated fine-tuning across clinical, legal, and financial domains.
- AIDP data-processing library provides deterministic operators built on HuggingFace Datasets for agent orchestration.
- Code and data to be released at github.com/trex-project.
Automated research agents have gotten good at bounded problems like tuning hyperparameters or patching code. Designing an end-to-end LLM fine-tuning recipe, choosing data, mixing ratios, algorithms, and training configs, has stayed stubbornly manual. A team from Shanghai AI Laboratory and Fudan University is taking a swing at that gap with TREX, a multi-agent system that runs the whole fine-tuning lifecycle on its own and, on several tasks, outperforms recipes built by human experts.
Why fine-tuning resisted automation
Existing research agents typically focus on well-defined optimization targets that can be represented as finite-length text sequences, such as structured parameters or code patches. Those artifacts fit inside an LLM's context window, so an agent can propose, verify, and iterate quickly. Fine-tuning is a different beast.
Even if we limit the scope to the fine-tuning stage, where the model architecture and initialization weights are fixed, a typical training scheme still requires considering multiple factors, including the training data distribution, algorithms, and hyperparameters. While training data has a decisive impact on results, its massive scale makes it impossible to place directly in the agent's context. On top of that, each training run costs real GPU hours, so the batch-proposal-and-verify style used by evolutionary agents becomes impractical.
Two agents, one search tree
TREX splits the work between two agents that talk to each other in a loop. The Researcher interprets the requirement goals to conduct literature reviews and formulate experimental plans. The Executor, a code agent integrated with the GPU clusters, implements those plans to construct data, perform model training, and run evaluation, closing the loop by feeding empirical results back to the Researcher for analysis.
This story is for Pro members
You've reached the end of the free preview. Upgrade to AlphaSignal Pro to read the full article - and everything else behind the paywall.