Terminal-style Mathematical Modeling Bench: The First Agentic and Verifiable Benchmark for Mathematical Modeling

Xiaojun Wu, Cehao Yang, Xuhui Jiang, Chengjin Xu, Jia Li, Jian GuoarXiv 2026

Mathematical modeling is the art of turning a messy, real-world problem into a structured set of equations and assumptions. For years, evaluating how well AI agents perform this task has been equally messy. We’ve relied on "LLM-as-a-judge" to grade reports—a method that rewards fluent prose but often ignores whether the underlying numbers actually make sense or obey the laws of physics.

A new paper introduces TB-MathModel (the Terminal-style Mathematical Modeling Bench), the first benchmark designed to put AI agents in a "terminal" environment where they must produce results that are not just plausible, but verifiable and physically feasible.

TL;DR

TB-MathModel is a new benchmark that evaluates AI agents on complex, contest-style mathematical modeling problems using a containerized terminal environment. It moves beyond subjective grading by using programmatic gates and Lean 4 formal proofs to ensure that model answers are physically possible and mathematically sound.

What Problem Does This Paper Address?

The current state of AI evaluation for math modeling is broken. Existing benchmarks usually fall into two camps:

  1. Solver fragments: They test tiny, well-posed math problems that don't capture the "long-horizon" complexity of real modeling.
  2. Report grading: They use an LLM to grade a final PDF report. This is problematic because an agent can write a beautiful, well-organized report that contains numbers that are physically impossible (e.g., a probability of 1.2 or a speed that exceeds a known constraint).

As the authors point out, in mathematical modeling, "answers matter only if they are both close to a credible reference and physically feasible." TB-MathModel closes this loop by requiring agents to interact with a terminal, handle real data attachments (CSVs, spreadsheets), and output a structured JSON artifact that can be rigorously checked.

Figure 1: Why modeling is hard to evaluate, and what TB-MathModel changes. (a) In the status quo an LLM judge grades a report on organisation while the numbers are never checked. (b) TB-MathModel runs the problem, attachments, and figures in a terminal container, requires one structured artifact, scores it one-sidedly against an O-award reproduction, and verifies feasibility with a gate and Lean certificates—so a plausible-but-infeasible answer is caught.

Methods

The researchers built a sophisticated pipeline to move from "vibes-based" grading to "artifact-verified" evaluation:

  • Agentic Terminal: The agent is dropped into a network-isolated Docker container with the problem statement, figures, and data attachments. It must write and run its own code to find the solution.
  • Multi-Reference Panel: Instead of comparing an agent to a single "ground truth" (which might be biased or even wrong), the benchmark scores agents against a panel of multiple "Outstanding-award" human papers from prestigious modeling contests.
  • Direction-Aware Scoring: The benchmark uses "one-sided" scoring. If a model finds a solution that is actually better than the human reference (e.g., a more optimal production schedule), it isn't penalized for the deviation.
  • Two-Layer Feasibility Verification: This is the benchmark's "hard gate."
    • Layer 1: A programmatic check for basic invariants (e.g., non-negative counts, percentages summing to 100).
  • Layer 2: A Lean 4 certificate layer. The benchmark uses formal theorem proving to verify 624 different obligations across the tasks, ensuring the logic of the feasibility check itself is machine-checkable.
Figure 2: The TB-MathModel construction and evaluation pipeline. Build: official statements, attachments, and PDF figures are compiled into a task directory. Run: the agent works inside a network-isolated terminal container and writes one JSON artifact. Evaluate: the artifact is scored by a direction-aware, one-sided panel against an O-award reproduction, and independently checked by a programmatic feasibility gate plus a Lean 4 certificate layer; a failed gate zeroes the task.

Datasets

The benchmark consists of 18 tasks drawn from the 2023–2025 editions of two major competitions:

  • CUMCM: The Chinese Undergraduate Mathematical Contest in Modeling (typically engineering and optimization-heavy).
  • MCM: The Mathematical Contest in Modeling (more open-ended and "modeling-flavored").

The tasks are multimodal, including 21 "load-bearing" figures cropped from the original PDFs that the agent must "see" and understand to solve the problem.

Key Insights and Ideas

  • Models can be "more right" than humans: In a fascinating case study involving a "dragon dance" kinematics problem, the authors found that the human "Outstanding" paper was actually physically infeasible. Twelve of the AI models tested actually found the correct, feasible value, but would have been penalized by traditional benchmarks for not matching the "ground truth."
  • The CUMCM-MCM Gap: Models perform significantly better on CUMCM tasks (averaging ~80%) than on MCM tasks (averaging ~40%). This suggests that while AI is getting good at well-defined engineering optimization, it still struggles with the open-ended ambiguity and assumption-making required for social-science-style modeling.
  • Harness Invariance: The researchers tested different "harnesses" (the code that wraps the model and lets it use tools). They found that the choice of harness barely moved the needle on the score, meaning the benchmark is truly measuring the model's modeling competence, not just how well its tool-use wrapper is written.

Key Results

The benchmark evaluated seven major multimodal models. The "flagship" models currently lead the pack, but the cost-to-performance ratio is eye-opening:

  • Top Performers: GPT-6 Astra (64.58% O-EVAL) and Fable 5.1 (63.11%) are the current leaders.
  • The Efficiency King: DeepSeek-Flash achieved a score of 59.81%—nearly matching the top-tier models—at just 1/100th of the cost ($2.54 vs. $246+ for a full 18-task run).
  • Compute isn't everything: Interestingly, running models at their maximum "reasoning" or "deliberative" tiers didn't always improve scores, suggesting that simply throwing more inference compute at these problems isn't a silver bullet.
Figure 3: The cost-accuracy frontier showing DeepSeek-Flash's massive efficiency advantage.

Limitations and Future Work

The authors acknowledge a few key limitations:

  • Task Volume: With only 18 tasks, the benchmark is high-quality but relatively small.
  • Physical Truth: While the benchmark checks for feasibility (is this answer possible?), it cannot always check for physical truth (is this exactly what would happen in the real world?) without a full physics simulator for every task.
  • Human Anchors: The benchmark still relies on human papers as a baseline, which can introduce their own biases or errors (though the multi-reference panel helps mitigate this).

The authors suggest that the trajectories collected during these runs could be used to train future models to be better at self-checking and physical reasoning.

Summary updated

Abstract

Mathematical modeling turns an open-ended real-world problem into assumptions, a model, a solution, and a defended recommendation, and its answers matter only if they are both close to a credible reference and physically feasible; existing benchmarks either score solver fragments or grade reports with an LLM judge, leaving those numbers unchecked. We introduce TB-MathModel (the Terminal-style Mathematical Modeling Bench), the first benchmark to make complete contest-style modeling problems agentic, verifiable, and terminal at once, over 18 real CUMCM and MCM problems (2023--2025). Each task ships the verbatim statement, official attachments, and figures in a containerized terminal; the agent returns one JSON artifact, scored on the numeric core of the final question against a reproduction of the Outstanding-award paper. Two design choices distinguish it: direction-aware, one-sided scoring, which never penalises beating the anchor, and two-layer feasibility verification---a programmatic gate over six decidable invariant forms plus 624 Lean~4 obligations---with a hard gate that zeroes infeasible answers. Each task is scored against a panel of human outstanding papers rather than one, so a model must be close to many accepted answers; across seven multimodal entries (three seeds each) the strongest reach a multi-reference O-Eval of 64.58\%, while the \$2.54 open model holds 59.81\% at $1/100$ the cost. TB-MathModel turns the numeric core of modeling into a reproducible, machine-checkable signal for measuring long-horizon modeling competence and for collecting agent trajectories. The source code is available at https://github.com/wxj630/terminal-bench-math-modeling.
BibTeX
@misc{wu2026terminal,
  author = {Xiaojun Wu and Cehao Yang and Xuhui Jiang and Chengjin Xu and Jia Li and Jian Guo},
  title = {{Terminal-style Mathematical Modeling Bench: The First Agentic and Verifiable Benchmark for Mathematical Modeling}},
  year = {2026},
  eprint = {2611.08237},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.08237},
}
Figure