Source-linked AI summary
AutoLLMResearch: Training Research Agents for Automating LLM Experiment Configuration - Learning from Cheap, Optimizing Expensive
Taicheng Guo, Nitesh V. Chawla, Olaf Wiest, Xiangliang Zhang
TL;DR
Expensive LLM experiment configuration remains difficult to automate because only a handful of costly trials are feasible. AutoLLMResearch trains an agent to extrapolate from low-fidelity experiments through a multi-fidelity environment and structured reinforcement-learning pipeline, outperforming NAP across stress-test fidelity levels.
Problem
Automating scalable LLM experiment configuration remains largely unaddressed because costly trials make low-cost methods’ repeated trial-and-error impractical.
Method
AutoLLMResearch combines the multi-fidelity LLMConfig-Gym with a long-horizon reinforcement-learning pipeline that trains agents to extrapolate from low- to high-fidelity experiments.
Results
The method outperforms NAP across fidelity levels and degrades more gracefully under sparse-coverage and reversed-optimal-region stress tests.
Takeaways & Limitations
AutoLLMResearch offers a practical path toward scalable real-world automation of expensive LLM experiment configuration.
Takeaways & Limitations
Direct reinforcement-learning training can converge to local optima and produce instruction-forgetting or format errors during long-horizon environment interaction.
Abstract
from arXiv · showhide
Effectively configuring scalable large language model (LLM) experiments, spanning architecture design, hyperparameter tuning, and beyond, is crucial for advancing LLM research, as poor configuration choices can waste substantial computational resources and prevent models from realizing their full potential. Prior automated methods are designed for low-cost settings where repeated trial and error is feasible, but scalable LLM experiments are too expensive for such extensive iteration. To our knowledge, no work has addressed the automation of high-cost LLM experiment configurations, leaving this problem labor-intensive and dependent on expert intuition. Motivated by this gap, we propose AutoLLMResearch, an agentic framework that mimics how human researchers learn generalizable principles from low-fidelity experiments and extrapolate to efficiently identify promising configurations in expensive LLM settings. The core challenge is how to enable an agent to learn, through interaction with a multi-fidelity experimental environment that captures the structure of the LLM configuration landscape. To achieve this, we propose a systematic framework with two key components: 1) LLMConfig-Gym, a multi-fidelity environment encompassing four critical LLM experiment tasks, supported by over one million GPU hours of verifiable experiment outcomes; 2) A structured training pipeline that formulates configuration research as a long-horizon Markov Decision Process and accordingly incentivizes cross-fidelity extrapolation reasoning. Extensive evaluation against diverse strong baselines on held-out experiments demonstrates the effectiveness, generalization, and interpretability of our framework, supporting its potential as a practical and general solution for scalable real-world LLM experiment automation.
1. Introduction
AutoLLMResearch addresses the unmet need to automate expensive LLM experiment configuration, where only a handful of costly trials are feasible. It trains an LLM-based agent to learn from low-fidelity experiments and extrapolate toward high-fidelity decisions using LLMConfig-Gym and a structured training pipeline.
- Motivation: Large-scale LLM configuration spans hyperparameters, architecture settings, training recipes, and data-mixture design, while poor choices waste substantial computational resources.The challenge becomes acute for models at least 7B or training runs using at least 20B tokens.
- Core idea: The framework targets cross-fidelity learning: agents develop generalizable principles from low-fidelity experiments and extrapolate them to high-fidelity configuration decisions.The motivating question is whether an agent can learn from low-fidelity LLM experiments and optimize high-fidelity ones.
- Challenges: Three challenges are identified: missing verifiable multi-fidelity outcomes, configuration-space shifts between fidelities, and a third cross-fidelity learning challenge.The supplied passage explicitly names the first two challenges and states that the framework addresses three challenges overall.
- Contributions and results: Experiments across four representative LLM configuration tasks and models up to 7B or training tokens up to 20B show superior performance, generalization, and interpretable cross-fidelity reasoning.The tasks are Model Architecture, Pretraining Hyperparameter, RL GRPO Tuning, and Data Mixture; analyses report natural-language explanations of the reasoning process.
2. Related Work
Prior methods automate LLM experiment configuration within same-fidelity settings, leaving experience transfer across fidelity levels unaddressed. AutoLLMResearch instead applies RLVR in an RL Gym-style environment to promote sample-efficient and interpretable configuration reasoning.
- Methods for Automating LLM Experiment Configuration: Prior work has not addressed experience transfer across fidelity levels, motivating a distinction between meta-Bayesian optimization, HPO tools, and other adjacent methods.The paper organizes adjacent methods because cross-fidelity experience transfer remains unaddressed.
- Methods for Automating LLM Experiment Configuration: MetaBO and NAP learn meta-probabilistic models from offline experiments but operate exclusively at the same fidelity and cannot extrapolate across fidelity levels or configuration spaces.These methods guide optimization on test problems using offline experimental data, but lack cross-fidelity and cross-space extrapolation.
- Incentivizing LLM Reasoning by RL with Verifiable Rewards: AutoLLMResearch is the first RL Gym-style environment for LLM experiment configuration and uses RLVR to incentivize researcher-like reasoning with sample-efficient, interpretable decisions.The approach builds on RLVR advances in frontier LLM generalization and reasoning.
3. LLMConfig-Gym: Environment for Training Agents
LLMConfig-Gym is an offline environment for training and evaluating agents on LLM experiment configuration, designed to support cumulative experiential learning across representative tasks and multiple fidelities. It organizes lookup-table experiments hierarchically and provides a unified interface with task-specific metadata.
- Desired Agent Capabilities, Task Design and Hierarchical Organization: LLMConfig-Gym is built as a gym for RL training and evaluation of agents on LLM experiment configuration, addressing the lack of a well-defined offline environment for cumulative experiential learning.The framework identifies four representative configuration tasks, including model architectures and data mixture weight ratios.
- Desired Agent Capabilities, Task Design and Hierarchical Organization: The environment organizes experiments hierarchically as Task → Fidelity → Experiment and collects multiple fidelity levels using open-source datasets or offline grid-search experiments.Fidelity is exposed flexibly rather than imposed through a rigid definition.
- Unified Format, Interface and Sufficient Text-Based Context: Because online LLM experiment runs are too costly, LLMConfig-Gym unifies massive offline runs in a lookup table whose tell function returns configuration performance and experimental details within seconds.The interface is designed for consistent use across tasks.
- Unified Format, Interface and Sufficient Text-Based Context: Per-task metadata describing tasks, configurations, and related information helps agents interpret each problem and make informed decisions.Metadata is part of the unified text-based context provided to the agent.
4. Methodology of AutoLLMResearch
AutoLLMResearch formulates LLM configuration as sequential optimization, with an LLM policy making text-based Think and Execute decisions in LLMConfig-Gym. Its training combines multi-fidelity demonstrations, trajectory-based policy distillation, and multi-turn RL with regret-based rewards to promote reliable cross-fidelity extrapolation.
- Sequential configuration optimization: The LLM agent acts as a policy that sequentially reasons in text and executes configurations in LLMConfig-Gym to observe performance and experimental details.Each trial contains two text-based actions: Think identifies a promising configuration, and Execute submits it to the Gym.
- Multi-fidelity reasoning: Lower-fidelity results with fidelity information are provided as in-context demonstrations so the agent learns configuration trends and extrapolates to higher fidelities.Experiments are split into low-, medium-, and high-fidelity sets; training pairs (L, m_i), while testing pairs (M, h_i), using Top-K lower-fidelity configurations.
- Policy distillation: The training pipeline samples 20 rollout trajectories at temperature 0.8 and adds successful trajectories to a policy-distillation set, while simulating alternatives when rollouts remain at local minima.Trajectory Simulation randomly truncates a local-best trajectory before prompting the LLM to continue it, addressing local optima and long-horizon format errors.
- Multi-turn reinforcement learning: Multi-turn GRPO reinforces the thinking process by applying loss masking to experiment observations and instruction tokens, retaining only thinking-related tokens.The objective uses group-normalized advantages over sampled trajectories and focuses learning on Think and Execute behavior.
- Reward design: Cumulative regret rewards consistently strong proposals across all T trials, penalizing repeated or invalid outputs with a worst reward of −1 to reduce overfitting and format errors.The reward compares cumulative performance with T· y_best using the task’s best and worst performances; most-similar configuration matching is introduced when format violations make rewards sparse.
5. Experiments
Experiments evaluate AutoLLMResearch across four LLMConfig-Gym tasks, training on low-/medium-fidelity experiments and testing on high-fidelity settings. The results show lower regret, transferable cross-fidelity reasoning, effective training components, and rapidly amortized deployment cost.
- Benchmarks and Baselines: The evaluation covers all four LLMConfig-Gym tasks, training agents on low-/medium-fidelity experiments and testing them on high-fidelity ones against normal and meta-training baselines.This setup tests effectiveness and generalization under varying resource budgets.
- Overall Results: Our approach achieves the lowest regret across all tasks and budget settings, with small-backbone agents substantially outperforming other baselines.The results attribute effective high-fidelity optimization to cumulative learning from low-fidelity experiments.
- Cross-Fidelity Generalization: ∼0.01 regret from budget 2 onward is achieved by Qwen3-4B on Task 1 under configuration-space shift, while all other methods remain above 0.2 regret.Task 4 shows a similar trend, supporting generalization across disjoint train/test discretizations.
- Ablations: Removing Train/Test Experiment Curation raises regret to 0.302, removing Rich Text Information raises it to 0.281, and Policy Distillation alone yields 0.144.These ablations indicate that curation, rich task-specific text, and direct regret optimization each contribute to cross-fidelity learning.
- Deployment Cost: 3.6× cumulative GPU-hour reduction at 30 tasks is obtained versus from-scratch baselines as the one-time training cost is amortized across scalable deployment.Low-fidelity training can also be scheduled during spare GPU capacity.
- Interpretability and Training Dynamics: The trained agent learns transferable principles rather than fixed configurations, including balancing shifted architecture spaces and fidelity-dependent trends that improve search initialization and prune the search space.In one case, it selects unseen embed_dim=640 and improves the test score from 0.9464 to 0.6627 (a 30% relative gain); across training, regret decreases while critic scores rise and invalid outputs diminish.
6. Discussion, Broader Impact and Future Work
AutoLLMResearch remains robust under sparse coverage and reversed training/testing optima, degrading gracefully and recovering as informative experiments are added. The framework also supports broader AI-scientist applications, extensions to new configuration domains and fidelities, and future multi-objective optimization.
- Stress-Testing the Boundary of Low-to-High Extrapolation: Across sparse-coverage and reversed-optimal-region stress tests, AutoLLMResearch consistently achieves lower regret than NAP and degrades more gracefully.The tests target misaligned training and testing configuration distributions and adversarial optimal regions.
- Broader Impact and Future: The framework is positioned for more LLM configuration scenarios and domains where cheap trials guide expensive decisions, including catalyst optimization.This broader-impact direction is framed as contributing to the broader AI Scientist.
- Broader Impact and Future: Future work includes expanding LLMConfig-Gym with more tasks and fidelity, adding multi-objective optimization, and advancing Recursive LLM Design.Multi-objective optimization is intended to balance competing goals.
7. Conclusion · Appendix · Appendix Contents
AutoLLMResearch addresses high-cost LLM experiment configuration under strict budgets by learning principles from low-fidelity experiments and extrapolating them to expensive settings. The framework combines LLMConfig-Gym with structured agentic training, and experiments support its effectiveness, generalization, and interpretability.
- 7. Conclusion: AutoLLMResearch targets high-cost LLM experiment configuration under strict budget constraints.Prior methods were designed for low-cost trial-and-error settings.
- 7. Conclusion: Prior automated methods had not addressed high-cost LLM experiment configuration.The conclusion characterizes earlier approaches as low-cost trial-and-error methods.
- 7. Conclusion: AutoLLMResearch is presented as the first agentic training framework for this problem.Its stated objective is to automate configuration in expensive high-fidelity settings.
- 7. Conclusion: The framework learns generalizable principles from low-fidelity experiments and extrapolates them to expensive high-fidelity settings.This cross-fidelity strategy is the framework’s central methodological contribution.
- 7. Conclusion: LLMConfig-Gym supports AutoLLMResearch as part of the proposed framework.The conclusion identifies LLMConfig-Gym alongside a structured training pipeline.
- 7. Conclusion: A structured training pipeline completes the framework’s support for cross-fidelity configuration research.The conclusion names this pipeline together with LLMConfig-Gym.
- 7. Conclusion: Extensive experiments confirm AutoLLMResearch’s effectiveness, generalization, and interpretability.These are the three evaluation properties explicitly reported in the conclusion.
A. LLMConfig-Gym: Tasks and Dataset Construction · A.1. Unified Interface of LLMConfig-Gym · A.2. Task 1: Model Architecture Configuration
LLMConfig-Gym is a unified offline, lookup-table environment for four representative LLM configuration tasks, combining open-source datasets with approximately 4,000 GPU hours of in-house GRPO tuning runs. Its interface supports deterministic task and environment selection, configuration-space inspection, and metric queries, while Task 1 instantiates GPT-2-style architecture configuration from HW-GPT-Bench data.
- A. LLMConfig-Gym: Tasks and Dataset Construction: LLMConfig-Gym combines open-source experiment datasets with approximately 4,000 GPU hours of in-house GRPO tuning runs across model sizes and datasets.The resulting offline environment spans four representative LLM configuration tasks.
- A.1. Unified Interface of LLMConfig-Gym: The environment uses lookup tables to evaluate configuration policies quickly and deterministically.All four tasks are exposed through a unified API.
- A.1. Unified Interface of LLMConfig-Gym: The API supports task discovery, active-task selection, environment selection, and configuration-space inspection.Available tasks include architecture search, data mixture, pretraining hyperparameters, and RL hyperparameters; environments can specify datasets, models, and training sizes.
- A.1. Unified Interface of LLMConfig-Gym: The query function returns target metrics and additional textual information for configurations identified by ID or dictionary.Returned information can include perplexity, loss, aggregated scores, and training score arrays; predefined or custom datasets can also be initialized.
- A.2. Task 1: Model Architecture Configuration: Task 1 builds on 10k architecture evaluations and an MLP perplexity surrogate from HW-GPT-Bench across the GPT-S/M/L family.It defines a model architecture configuration task within LLMConfig-Gym.
- A.2. Task 1: Model Architecture Configuration: Task 1 lets agents choose GPT-2-style models by scale, embedding dimension, layer count, attention heads, MLP ratios, and a global bias flag.These parameters follow the HW-GPT-Bench configuration space.
A.3. Task 2: Pretraining Hyperparameter Configuration … B.2. Interactions between Agent and LLMConfig-Gym as Function Calling
The paper instantiates LLMConfig-Gym across pretraining, GRPO tuning, data-mixture selection, and cross-fidelity evaluation, then equips agents with structured prompts and function-calling execution. Its landscapes expose configuration-space and optimization shifts between fidelities.
- A.3. Task 2: Pretraining Hyperparameter Configuration: Task 2 tunes peak learning rate LR and global token batch size BS while model size N and dataset size D control run fidelity.The Gym evaluates configurations using final smooth training loss, validated as an unbiased proxy for validation loss.
- A.4. Task 3: RL GRPO Tuning Configuration: Task 3 uses offline GRPO runs spanning 15 and 30 epochs, three datasets, two Qwen2.5 backbones, and grid-searched critical hyperparameters.The collection uses 4 nodes × 4 NVIDIA A100 80G GPUs and totals ∼4,000 GPU hours.
- A.5. Task 4: Data Mixture Configuration: Task 4 selects among 256 precomputed data mixtures jointly with Qwen2.5-500M, Qwen2.5-3B, or Qwen2.5-7B model scales.Each configuration receives the average overall (ID + OOD) score across 17 Tülu 3-style benchmarks.
- A.6. Task Split on LLMConfig-Gym in Our Paper: The Low-Fidelity to High-Fidelity (L2H) setting trains agents on low-fidelity experiments and evaluates them on high-fidelity experiments.The detailed task splits are provided in Table 9.
- A.7. Multi-Fidelity Optimization Landscape Analysis: Tasks 1 and 4 exhibit configuration-space shifts, whereas Tasks 2 and 3 share configuration spaces but exhibit optimization-landscape shifts across fidelities.For Tasks 2 and 3, the optimal region visibly moves between training and testing heatmaps.
- A.7. Multi-Fidelity Optimization Landscape Analysis: Task 2 landscapes plot sampled (LR, BS) configurations under fixed (N, D), coloring points by smooth training loss to highlight optimal regions.Figure 15 presents separate training-set and test-set landscapes.
- B.1. Prompts and Meta-Features: Task prompts define optimization targets, configuration constraints, candidate generation, value estimation, selection, and mandatory final execution through the exec_config tool.Examples cover architecture optimization, pretraining hyperparameters, RL-GRPO tuning, and data-mixture maximization.
- B.2. Interactions between Agent and LLMConfig-Gym as Function Calling: The function-calling interface exposes ConfigcoderTool, which executes a configuration dict or array supplied as the only content between <config> and </config> tags.The schema describes the argument as the only generated configuration to be executed.
B.3. Hyperparameter Settings For Training · C. Additional Experimental Results
The appendix specifies full training configurations for Policy Distillation and End-to-End GRPO, including detailed optimization, rollout, and logging settings. Policy Distillation uses full-parameter fine-tuning with Qwen3 and an eight-epoch cosine-scheduled run.
- B.3. Hyperparameter Settings For Training: The appendix provides full hyperparameter dumps for Policy Distillation and End-to-End GRPO training.These configurations supplement the training setup summarized in the main text.
- B.3. Hyperparameter Settings For Training: Policy Distillation is configured as supervised fine-tuning with full parameter updates using the Qwen3 template.The configuration specifies finetuning_type: full and template: qwen3.
- B.3. Hyperparameter Settings For Training: 8.0 training epochs use a 5.0e-6 learning rate, cosine scheduling, and a 0.1 warmup ratio.The setup also enables bf16 training.
- B.3. Hyperparameter Settings For Training: Policy Distillation uses a 23000 cutoff length, per-device batch size 1, and four gradient-accumulation steps.These settings define the sequence length and effective update accumulation for training.
- B.3. Hyperparameter Settings For Training: End-to-End GRPO uses the configcoder_multiturn_grpo configuration with a custom reward function and GRPO advantage estimation.Training and validation data are loaded from train and test parquet files.
- B.3. Hyperparameter Settings For Training: GRPO rollout uses sglang with 0.8 GPU memory utilization, 8 samples per rollout, and tensor model parallel size 1.Rollout and reference log-probability micro-batches are both set to 32 per GPU.
- B.3. Hyperparameter Settings For Training: The GRPO setup disables KL reward usage, sets critic warmup to 0, and logs to both console and Weights & Biases.Validation runs before training, with experiments grouped under the verl_grpo_configcoder project.
C.1. RQ1: Performance for Different Tasks · C.2. RQ2-1: Case Study 1 Figure (Configuration Space Shift)
The paper reports per-task average regret across budgets 1–5 for all baselines on four LLMConfig-Gym tasks, with results shown in Figures 18–21. It also provides the full Case Study 1 figure on Configuration Space Shift as a complement to Case Study 2 in the main text.
- C.1. RQ1: Performance for Different Tasks: Per-task average regret is reported across budgets 1–5 for all baselines on the four LLMConfig-Gym tasks.The results are presented in Figures 18, 19, 20, and 21.
- C.1. RQ1: Performance for Different Tasks: Figure 18 presents performance on Task 1: Model Architecture Configuration.
- C.1. RQ1: Performance for Different Tasks: Figure 20 presents performance on Task 3: RL GRPO Tuning Configuration.
- C.1. RQ1: Performance for Different Tasks: Figure 19 presents performance on Task 2: Pretraining Hyperparameter Configuration.
- C.1. RQ1: Performance for Different Tasks: Figure 21 presents performance on Task 4: Data Mixture Configuration.
- C.2. RQ2-1: Case Study 1 Figure (Configuration Space Shift): The full Case Study 1 figure covers Configuration Space Shift.It is included as a complement to Case Study 2 shown in the main text.
C.3. RQ2-2: From Optimization Perspective: Text-Based Reasoning Prunes Search Space · C.4. RQ3: Training Dynamics — Metric Definitions
Text-based reasoning acts as a search prior that improves initialization and trend extrapolation, pruning exploration toward promising configurations. Training dynamics are tracked using four metrics covering test-set extrapolation, training quality, worst-case validity, and response length.
- C.3. RQ2-2: From Optimization Perspective: Text-Based Reasoning Prunes Search Space: The study compares three Task 2 agent variants to isolate Experiment Curation and RL Learning with the Gym.The variants are Qwen3-4B-Base without experiment curation, Qwen3-4B-Base, and Qwen3-4B (Ours, trained agent).
- C.3. RQ2-2: From Optimization Perspective: Text-Based Reasoning Prunes Search Space: Without experiment curation, the agent explores erratically across the largest search region, covering both optimal and suboptimal configurations.It jumps from lr=7.5e-4, bs=256 to lr=4e-3, bs=768 without analyzing R1’s feedback.
- C.3. RQ2-2: From Optimization Perspective: Text-Based Reasoning Prunes Search Space: The RL-trained agent learns a balanced-architecture principle that transfers from the training configuration space to the shifted test space, yielding ∼30% lower loss.The principle combines moderate embed_dim, balanced n_layer, and diverse n_head/mlp_ratio choices.
- C.3. RQ2-2: From Optimization Perspective: Text-Based Reasoning Prunes Search Space: The untrained base model reads low-fidelity trends but extrapolates incorrectly toward overly conservative lr=5e-4, bs=64, moving away from the optimum.It over-generalizes that lower learning rates are better for more parameters, while low-fidelity context alone is insufficient.
- C.3. RQ2-2: From Optimization Perspective: Text-Based Reasoning Prunes Search Space: Text-based reasoning learned from experience provides a strong initial configuration and correct trend extrapolation, pruning the search space and reducing budget waste.Incorrect extrapolation or lack of grounding instead produces poor initializations and exploration in suboptimal regions.
- C.4. RQ3: Training Dynamics — Metric Definitions: Regret Mean@3 measures average regret on the held-out test set, indicating whether learned principles extrapolate to unseen high-fidelity experiments.This metric is one of four used to partition training samples by task type and track training dynamics.
- C.4. RQ3: Training Dynamics — Metric Definitions: Critic Score Mean measures average reward on training samples, reflecting configuration quality on tasks the agent is trained on.It is tracked alongside the other training-dynamics metrics.
- C.4. RQ3: Training Dynamics — Metric Definitions: Critic Score Min measures minimum batch reward, capturing worst-case behavior and the rate of invalid configurations, while Response Length Mean measures average response tokens.Together, these metrics track validity-related behavior and response length during training.
D. Theoretical Analysis of the Cost-Effective Trade-Off
The theoretical analysis characterizes when meta-training reduces total computation relative to optimizing each target task from scratch. Cost-effectiveness depends on deployment scale, high-fidelity savings, exploration efficiency, and the relative costs of fidelity levels.
- D. Theoretical Analysis of the Cost-Effective Trade-Off: The framework is cost-effective when its one-time low-fidelity meta-training cost plus online adaptation costs less than baseline optimization across K target tasks.The analysis compares baseline optimization from scratch with offline exploration over M source tasks followed by per-task adaptation.
- D. Theoretical Analysis of the Cost-Effective Trade-Off: Three factors govern the trade-off: deployment scale K, per-task high-fidelity savings ΔS, and the environment cost ratio α.Larger deployment scale amplifies savings, while α converts saved high-fidelity evaluations into equivalent low-fidelity steps.
- D. Theoretical Analysis of the Cost-Effective Trade-Off: The task leverage ratio K/M measures how many target tasks each source task effectively subsidizes, with break-even determined by exploration effort, algorithmic savings, and physical cost structure.The amortization threshold depends on E_m, ΔS, and α.
- D. Theoretical Analysis of the Cost-Effective Trade-Off: When high-fidelity experiments are much more expensive, even modest ΔS can make meta-training worthwhile when K is comparable to or smaller than M.The analysis denotes this regime as α≫1.
- D. Theoretical Analysis of the Cost-Effective Trade-Off: Efficient meta-training exploration, such as RL-guided rather than exhaustive grid search, lowers the amortization threshold and broadens the framework’s advantageous regime.The stated mechanism is a reduction in E_m.
- D. Theoretical Analysis of the Cost-Effective Trade-Off: Deployments exceeding the critical target-task threshold guarantee lower total computational cost, and measured experiments reach break-even after only a small number of target tasks.The threshold is instantiated using measured S_base, S_meta, E_m, and α.