MathBode / README.md
nielsr's picture
nielsr HF Staff
Add task category, paper/code links, and evaluation usage
975c85f verified
|
raw
history blame
3.64 kB
metadata
license: apache-2.0
size_categories:
  - 10K<n<100K
pretty_name: MathBode
tags:
  - math
  - reasoning
  - dynamic-analysis
  - bode-plot
  - llm-evaluation
  - scientific-question-answering
task_categories:
  - text-generation
configs:
  - config_name: linear_solve
    data_files: linear_solve.parquet
  - config_name: ratio_saturation
    data_files: ratio_saturation.parquet
  - config_name: exponential_interest
    data_files: exponential_interest.parquet
  - config_name: linear_system
    data_files: linear_system.parquet
  - config_name: similar_triangles
    data_files: similar_triangles.parquet

MathBode: A Dynamic Benchmark for Mathematical Reasoning

Paper | Code

MathBode is a benchmark designed to evaluate the dynamic reasoning capabilities of large language models (LLMs) by treating parametric math problems as dynamic systems. Instead of testing static accuracy on fixed problems, MathBode treats parametric math problems as dynamic systems. It sinusoidally varies a parameter and measures the model's response in terms of gain (amplitude tracking) and phase (reasoning lag), analogous to a Bode plot in control theory.

This dataset contains the complete set of prompts and ground truth values for the benchmark.

Dataset Structure

The dataset is provided in a single Parquet file and contains the following columns:

Column Description
family The mathematical problem family (e.g., linear_solve, ratio_saturation).
question_id An index (0-2) for the specific question variant within a family.
signal_type The type of parameter variation: sinusoid or chirp.
amplitude_scale The scaling factor for the input signal's amplitude (0.5, 1.0, or 2.5). Used for non-linearity testing.
frequency_cycles The frequency of the sinusoidal input in cycles per sweep. For chirp signals, this is the instantaneous frequency.
phase_deg The starting phase of the sinusoidal signal in degrees (0, 120, 240). null for chirp signals.
time_step The step index within a sweep (0-63 for sinusoids, 0-255 for chirps).
p_value The precise value of the dynamic parameter p for this time step.
prompt The full prompt text to be sent to the model.
ground_truth The correct numerical answer for the given prompt.
symbolic_baseline_answer The answer from a perfect symbolic solver (identical to ground_truth).

Sample Usage

Load the dataset

You can load the dataset easily using the datasets library:

from datasets import load_dataset

# Load the dataset
dataset = load_dataset("cognitive-metrology-lab/MathBode")

# Access the data
print(dataset['train'][0])

Run Evaluations

To run evaluations using the associated code, follow the instructions in the GitHub repository. A quick smoke test can be run as follows:

# First, clone the repository and install dependencies
# git clone https://github.com/charleslwang/MathBode-Eval.git
# cd MathBode-Eval
# pip install -r requirements.txt

# Then, run the smoke test
CONFIG=SMOKE ./run_matrix.sh

Citing

If you use this dataset, please cite our work.

@misc{wang2025mathbode,
  title        = {MathBode: Frequency-Domain Fingerprints of LLM Mathematical Reasoning},
  author       = {Charles L. Wang},
  year         = {2025},
  eprint       = {2509.23143},
  archivePrefix= {arXiv},
  primaryClass = {cs.AI},
  url          = {https://arxiv.org/abs/2509.23143}
}