Abstract
Language-Guided Tuning (LGT) introduces a multi-agent framework that utilizes Large Language Models (LLMs) to bridge the "semantic gap" in machine learning optimization. By treating natural language feedback as "textual gradients," LGT coordinates model architecture, feature engineering, and training strategies. Experimental results across six diverse datasets show up to 23.3% accuracy improvements and 49.3% error reduction, demonstrating that semantic reasoning can significantly enhance traditional numeric optimization.
Introduction
Optimizing machine learning models is a multi-dimensional challenge requiring the simultaneous coordination of model architecture, feature engineering, training strategies, and hyperparameters. Traditional methods, such as grid search or Bayesian optimization, often struggle with the "curse of dimensionality" or operate as black boxes, offering no insight into why certain configurations fail. This creates a "semantic gap": numerical losses indicate performance issues but do not explain their underlying causes, such as class imbalance or improper learning rates.
Methodology
LGT addresses this gap through a dual-loop system. While the inner loop handles standard numerical training, the outer Textual Gradient Loop employs three specialized LLM agents to provide qualitative reasoning:
- The Advisor: Proposes specific configuration changes (e.g., "Increase dropout to 0.4") based on current metrics.
- The Evaluator: Assesses performance against baselines, providing binary success signals and qualitative analysis.
- The Optimizer (Prompt Optimizer): Acts as a meta-learner, refining the instructions given to the Advisor based on optimization history.
This framework optimizes across four dimensions simultaneously: Model Architecture, Feature Engineering, Training Strategy, and Hyperparameters. By treating natural language feedback as a "textual gradient," LGT allows agents to reason about the interdependencies between these dimensions, turning the optimization process into a transparent "glass box."
Experimental Results
The researchers evaluated LGT on six datasets, including large-scale vision tasks (MNIST, CIFAR-10), small-scale classification (Iris, Water Potability), and regression tasks (House Price, Wine Quality).
LGT consistently outperformed traditional baselines like Random Search, NAS, and Bayesian Optimization. On MNIST, accuracy improved from 78.41% to 98.99%. On CIFAR-10, LGT achieved 69.64% accuracy, significantly higher than Bayesian Optimization's 62.45%. In regression tasks, LGT reduced the Mean Squared Error (MSE) for House Price prediction to 25.30, a nearly 50% reduction compared to the next best method (NAS at 38.67). Furthermore, qualitative loss curves indicate that LGT converges faster and more smoothly than traditional search methods.
Discussion and Limitations
LGT provides a human-readable trajectory of the optimization process, offering unprecedented transparency. However, the framework involves certain trade-offs. The reliance on LLM API calls (such as DeepSeek) introduces computational overhead and inference costs per iteration. Additionally, because LLM suggestions are discrete, there may be an "approximation gap" compared to mathematically precise continuous optimization.
Future work may involve tighter integration between numerical and textual loops, potentially using models specifically fine-tuned on optimization trajectories to further close the semantic gap.
Summary updated