Research map / Large language models / Agents, code and math
Trace is the Next AutoDiff: Generative Optimization with Rich Feedback, Execution Traces, and LLMs
Read the paperCheck your idea against 108,967 papers
AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.
Introduces Trace, a Python library that treats workflow execution traces as backprop-like signals, formalizes Optimization with Trace Oracle (OPTO), and proposes the LLM-based optimizer OptoPrime for end-to-end generative optimization of non-differentiable workflows.
Problem
Optimizing general computational workflows (prompts, code, hyperparameters) that are non-differentiable, use rich feedback (console output, natural language), and have heterogeneous parameters, where black-box scalar-feedback methods are inefficient.
Approach
Treat the workflow's execution trace (minimal subgraph connecting parameters to output) as the analogue of back-propagated gradients, and let an LLM optimizer (OptoPrime) use the trace plus textual feedback to update heterogeneous parameters in one LLM call per step.
Key results
- On BIG-Bench Hard with a DSPy program, Trace achieves 59.5% 0-shot vs 55.3% for DSPy's COPRO prompt optimizer (DSPy-PO) and 41.6% for unoptimized DSPy.
- On numerical optimization, OptoPrime matches Adam, while feedback-only optimization without the graph struggles.
- Compared with TextGrad on reasoning tasks, OptoPrime achieves similar or better success rates (e.g., MMLU-College Physics 94.1 vs 93.1) and is about 3x faster in wall-clock time.
Measured effects reported in the paper
| What was changed | Where | Measured | Effect |
|---|---|---|---|
| Optimize the DSPy program end-to-end with Trace instead of DSPy-PO | DSPy program · BBH all (23 tasks), 0-shot | accuracy: 55.3 -> 59.5 | Helped |
| Optimize the DSPy program end-to-end with Trace instead of DSPy-PO | DSPy program · NLP (12 tasks), 0-shot | accuracy: 69.0 -> 70.9 | Helped |
| Optimize the DSPy program end-to-end with Trace instead of DSPy-PO | DSPy program · Algorithmic (11 tasks), 0-shot | accuracy: 45.2 -> 51.1 | Helped |
| Optimize the DSPy program end-to-end with Trace instead of DSPy-PO, adding CoT to both | DSPy program · BBH all (23 tasks), 0-shot + CoT | accuracy: 71.6 -> 78.6 | Helped |
| Optimize the DSPy program end-to-end with Trace instead of DSPy-PO, adding CoT to both | DSPy program · NLP (12 tasks), 0-shot + CoT | accuracy: 73.9 -> 75.8 | Helped |
| Optimize the DSPy program end-to-end with Trace instead of DSPy-PO, adding CoT to both | DSPy program · Algorithmic (11 tasks), 0-shot + CoT | accuracy: 70.0 -> 80.6 | Helped |
| Use OptoPrime (Trace) instead of TextGrad (24-10-30) | GPT-35-turbo-1106 student workflow · MMLU-Machine Learning | success rate: 86.1 (0.5) -> 86.6 (0.2) | Mixed |
| Use OptoPrime (Trace) instead of TextGrad (24-10-30) | GPT-35-turbo-1106 student workflow · MMLU-College Physics | success rate: 93.1 (0.7) -> 94.1 (0.8) | Helped |
| Use OptoPrime (Trace) instead of TextGrad (24-10-30) | GPT-35-turbo-1106 student workflow · Google-proof QA | success rate: 53.2 (0.6) -> 59.6 (1.3) | Helped |
| Use OptoPrime (Trace) instead of TextGrad (24-10-30) | GPT-35-turbo-1106 student workflow · BBH Counting | success rate: 89.2 (1.2) -> 89.4 (0.1) | No clear effect |
| Use OptoPrime (Trace) instead of TextGrad (24-10-30) | GPT-35-turbo-1106 student workflow · BBH Word Sorting | success rate: 72.0 (0.4) -> 71.6 (3.1) | Hurt |
| Use OptoPrime (Trace) instead of TextGrad (24-10-30) | GPT-35-turbo-1106 student workflow · GSM8K | success rate: 82.4 (0.6) -> 82.5 (0.1) | No clear effect |
Surprising findings
- OPRO's performance degrades over iterations in robot control even with more tokens, and in traffic control OPRO is not competitive with SCATS.
- Memory of past parameter-feedback pairs is crucial for OptoPrime on traffic control.
Limitations
- Cannot trace stateful in-place mutations, recursive bundle operators, or distributed/parallel workflows in the current implementation.
- OptoPrime is preliminary, not provably optimal, and uses more tokens than OPRO; it struggles with large graphs and non-text parameters.
- Not scalable to large-scale numerical problems compared with classical AutoDiff; constraints are not enforced reliably by the LLM.
Experimental setup
Datasets: BIG-Bench Hard MMLU Google-proof QA GSM8K Meta-World (LLF-Bench) UXSim traffic simulator
Benchmarks: BIG-Bench Hard MMLU-Machine Learning MMLU-College Physics Google-proof QA GSM8K Meta-World Reach/Pick-place/Push UXSim traffic control
Metrics: accuracy success rate average delay wall-clock time
Baselines: OPRO Adam Gaussian Process Minimization Particle Swarm Optimization SCATS DSPy COPRO TextGrad
Builds on: OPRO PyTorch DSPy back-propagation ReAct
Closest papers by meaning
- Understanding the Challenges in Iterative Generative Optimization with LLMs (NeurIPS 2026 · similarity 0.90)
- From Reproduction to Replication: Evaluating Research Agents with Progressive Code Masking (ICLR 2026 · similarity 0.85)
- StepORLM: A Self-Evolving Framework With Generative Process Supervision For Operations Research Language Models (ICLR 2026 · similarity 0.85)
- Improving Parallel Program Performance with LLM Optimizers via Agent-System Interfaces (ICML 2025 · similarity 0.84)
- PEARL: Solver-in-the-Loop Interactive Optimization Modeling from Natural Language (NeurIPS 2026 · similarity 0.84)
- Revolve: Optimizing AI Systems by Tracking Response Evolution in Textual Optimization (ICML 2025 · similarity 0.84)
Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.
