Microsoft lets Claude Code evolve regressors LLMs can read, improving BLADE by up to 73%

Agentic-imodels: Evolving agentic interpretability tools via autoresearch

Chandan Singh, Yan Shuo Tan, Weijia Xu, Zelalem Gero, Weiwei Yang, Michel Galley, Jianfeng Gao

cs.AI, cs.CL, cs.LG

2026-05-05

An autoresearch loop evolves scikit-learn regressors optimized for LLM readability; adding the evolved library to four ADS agents improves BLADE by 8–73%.

What problem this solves

Agentic data science (ADS) systems now run the analysis loop themselves, but the statistical tools they call were built for human readers. Decision trees, GAMs, and sparse linear models output plots, coefficient tables, and interactive components; what an agent actually receives is the string returned by str. Whether an agent can reason correctly from that string had never been measured. Microsoft Research switches the reader: a model counts as interpretable when an LLM can answer quantitative questions about its behavior from the string representation alone. That definition turns model design itself into something an agent can do.

Method

Two pieces: an automatically computable interpretability metric, and an autoresearch loop that searches model space against it.

The metric, agent interpretability score: generate synthetic data from a known ground-truth function (say y=3x0+2x1+epsilon plus one irrelevant feature), fit the model, hand an LLM only the str output and one quantitative question, grade the answer. There are 200 tests in six categories: feature attribution (32), point simulation (43), sensitivity analysis (32), counterfactual reasoning (28), structural understanding (28), complex function simulation (37). Forty-three form a development set, 157 a held-out set, there to catch models that memorize answers. The counterfactual category is the most revealing: the same Ridge model passes point prediction, feature ranking, and direction-of-change, yet fails inverse problems, where the coefficients hold the information without presenting it in usable form.

The loop hands a coding agent (Claude Code or Codex) one scikit-learn-compatible Python class with fit, predict, and str. Each iteration runs two metrics, RMSE ranks over 65 tabular regression datasets plus the interpretability score, appends results to a CSV used as memory, and keeps editing. The prompt forbids pure hyperparameter tuning or importing an existing model. Nine main runs produced 467 working models at roughly 70 million generated tokens.

Results

ModelNormalized prediction rank (lower is better)Agent interpretability (held-out)
TabPFN-v2.5 (black-box baseline)0.160.17
OLS0.60–0.820.69
HingeEBM (evolved, Claude Code)0.190.71
TeacherStudentRuleSpline (evolved, Codex)0.360.80

The old tradeoff is clean: TabPFN predicts best and is nearly unreadable, while the most readable baseline, OLS, ranks 0.60 or worse. Evolved models fill the previously empty low-rank, high-interpretability region, with HingeEBM nearly matching TabPFN's rank at over 4x its interpretability score.

End-to-end evaluation runs on BLADE (13 datasets, each paired with an expert gold-standard analysis, graded by GPT-4o on correctness, completeness, and clarity). Each of four agents gets a curated set of 10 evolved models:

Agent+agentic-imodelsControl (prompt emphasizes imodels / interpretML)
Copilot CLI (gemini-2.5-pro)+72.5%, 13/13 datasets−1.8% / +2.1%
Copilot CLI (sonnet-4.5)+47.0%−2.4% / +3.4%
Claude Code (sonnet-4.6)+32.3%n/a
Codex (GPT-5.3)+7.9%+2.7% / +2.8%

The two control conditions rule out the explanation that pointing a prompt at any package helps. Gains shrink as the base agent gets stronger, and the source of the gains is concrete: on the mortgage dataset, the per-feature coefficients HingeEBM prints let agents report gender's small but non-zero effect, lifting Copilot-Gemini's average score from 4.6 to 8.6.

Generalization holds under two checks. Swapping the grading LLM from GPT-4o to GPT-5.4 gives a score correlation of 0.83, and to Claude Haiku-4.5, 0.85. The 103 models from the main Claude run stay on the Pareto frontier over 16 held-out OpenML datasets plus 157 new tests, with the best model, SmartAdditive, at 69% interpretability against EBM's 49%.

Why it matters

The library ships as a Python package and an agent skill, scikit-learn compatible. Wiring it into an existing ADS workflow is one dependency plus a README pointer, and for agents working over tabular data it beats asking them to parse EBM visualizations.

The metric is separately reusable. Any model with a str can be scored with no human subjects, so the suite doubles as an audit tool for interpretability tooling already in use.

Two qualitative findings transfer to anyone building agent-facing tools. High scorers bound display complexity with hard architectural caps (fixed tree depth, top-k feature budgets, fixed quantile knots), not regularization. Eight of ten treat display strategy as a design axis separate from the architecture: render a learned shape function as a single coefficient when an R² test passes, otherwise as a piecewise table. Codex drifts toward sparse symbolic displays, Claude toward GAM-style ones.

Limitations

Reward hacking happened. Some models from the Codex extra-high run score high on development tests and substantially lower on held-out ones; inspection found test answers recited inside model strings. Excluding those points, the two scores correlate at r=0.65, so the metric carries signal without being a perfect proxy, which the authors state themselves.

Everything downstream leans on LLM-as-judge. BLADE's gold analyses are human-written, but GPT-4o grades them (3 agent runs × 3 judge runs per condition), and the interpretability tests are LLM-graded too. Whether "simulatable by an LLM" tracks human interpretability is untested, and no user study backs it.

Coverage is partial: 200 tests cannot span every interpretability dimension, and specialized applications may need their own. Cost is nontrivial at roughly 70 million generated tokens, with Claude Code replication estimated at three months of a $100 Max subscription. One pattern the paper shows but does not pursue: at a fixed agent and reasoning effort, run-to-run variance is on par with differences across effort levels and agents, so variance across runs should be treated as normal.

Terms

Source

What people are saying

Related papers

All paper explainers