TL;DR
Verbalized Machine Learning (VML) is a novel framework that replaces traditional numerical model weights with human-readable natural language prompts. By utilizing one Large Language Model (LLM) as a learner and another as an optimizer, VML allows models to iteratively refine their own "decision rules" in plain English. This approach makes machine learning inherently more interpretable and easier to guide using human prior knowledge.
The Problem with Black-Box Optimization
Traditional machine learning operates as a "black box." We optimize millions of numerical weights in a continuous space using gradient descent. While highly effective, these weights are meaningless to humans. This opacity makes it difficult to understand why a model fails or to inject specific "common sense" rules without undertaking complex architectural changes.
The authors address this lack of interpretability and the difficulty of encoding inductive bias (prior knowledge about a problem). They pose a fundamental question: instead of optimizing numbers, can we optimize the instructions given to an LLM? If a model’s "parameters" are simply a text prompt describing a pattern, we can read them, edit them, and understand exactly how the model is reasoning.
Methods: The Learner and the Optimizer
The authors conceptualize an LLM as a function $f(x; \theta)$, where $x$ is the data and $ heta$ is a text prompt acting as the model parameters. To "train" this model, they introduce a two-agent iterative system:
- The Learner LLM: This model takes an input (like a number or an image) and a "Pattern Description" (the parameters $\theta$) to produce a prediction.
- The Optimizer LLM: Acting as the "teacher," this agent looks at a batch of data, the learner’s current predictions, and the ground truth. It then performs verbalized optimization: it reasons about the errors (e.g., "The model is underestimating high values") and writes a new, improved Pattern Description for the next step.
This process mimics how a human might learn a task by trial and error, summarizing observations into rules. The authors tested two ways to parameterize the optimizer: direct (the LLM writes the new prompt in one go) and indirect (the LLM first calculates "textual gradients" or descriptions of errors before updating). They found that the direct approach is generally more effective and efficient.
Datasets and Evaluation
The researchers validated VML across a diverse range of tasks, focusing on whether the model could "discover" underlying rules and express them in text:
- Synthetic Regression: Linear, polynomial, and sinusoidal functions.
- Geometric Classification: Identifying patterns in "two blobs" and "two circles" data.
- Medical Imaging: A subset of PneumoniaMNIST, where the model classified X-ray images.
- Symbolic Reasoning: GSM8K (math word problems) and BIG-bench (text classification).
Key Insights and Results
- The "von Neumann" Architecture of ML: In VML, data and models are represented identically as tokens. This mirrors the von Neumann computer architecture, where programs (instructions) and data are stored in the same memory space.
- Natural Language as a Unified Portal: VML allows for easy injection of inductive bias. If you know your data is periodic, you simply add the sentence "The data looks like a sine wave" to the prompt, bypassing the need for specialized architectural layers.
- Automatic Model Selection: In polynomial regression tests, the optimizer LLM "realized" a linear model was too simple and automatically upgraded its own description to a quadratic one to better fit the data.
- VML vs. In-Context Learning (ICL): VML consistently outperformed standard ICL. On medical image classification, VML achieved 74% accuracy compared to ICL’s 48%, largely because VML summarizes patterns into durable rules rather than just relying on a few examples.
- Interpretability: The "parameters" produced by the model are strikingly human. In the medical task, the model moved from generic descriptions ("visible opacities") to specific medical terminology ("lobar consolidations," "bronchograms") as it processed more data.
Limitations and Future Work
The authors are transparent about several current hurdles:
- Stochasticity: Because LLMs are probabilistic, the "training" process can have high variance. One run might find a perfect rule, while another might get stuck in a "verbal local minimum."
- Context Window Limits: You cannot feed a million data points into an LLM optimizer at once. VML is currently limited to small-batch, low-dimensional data.
- Numerical Precision: LLMs still struggle with exact arithmetic. Even if the model "knows" the formula is $y = 3x + 4$, it might make a small calculation error during inference.
Future work will likely focus on making the optimizer more robust and exploring how VML can handle high-dimensional data by integrating better tool-calling (e.g., allowing the LLM to write Python code to assist in optimization).
Summary updated