GlassMATH / README.md
reza2ei's picture
Duplicate from reza2ei/GlassMATH
7439445
|
Raw History Blame Contribute Delete
9.98 kB
---
license: mit
language:
- en
pretty_name: GlassMATH
size_categories:
- 100K<n<1M
task_categories:
- text-classification
tags:
- math
- robustness
- perturbation
- benchmark
- causal-inference
- math-reasoning
- competition-math
configs:
- config_name: glassmath
default: true
data_files:
- split: full
path: data/glassmath/twins.parquet
- config_name: glassmath_bases
data_files:
- split: full
path: data/glassmath/bases.parquet
- config_name: glassmath_pooled
data_files:
- split: full
path: data/glassmath/pooled_bases.parquet
---
# GlassMATH
Meaning-preserving "twins" of 4,999 problems from the Hendrycks MATH test set, each labeled with whether the solver
(`gpt-4o-mini`) that solved the original problem fails on the twin. The data supports the study of *conditional
causal difficulty* (how fragile a task a model can already solve is to a rewrite that leaves the answer unchanged)
and was released with the paper *Fragility Is Not Reducible to Hardness: Conditional Causal Difficulty for LLMs*.
It is the competition-math companion of [GlassGSM](../glassgsm/).
**Code:** <https://github.com/upwork-corp/Conditional_Causal_Difficulty_for_LLMs/tree/initial-release> (training and evaluation of Frail-π, and the scripts that build this release).
## What is in a row
A **base** is an original MATH problem. A **twin** is the same problem after one perturbation that must not change
the gold answer. Each twin was posed to the solver and compared against the solver's result on the base problem.
| `family` | what is done |
|---|---|
| `entity_rename` | person names are replaced with names from a neutral pool |
| `sentence_reorder` | the problem's sentences are reordered |
| `injection` | one or more setup sentences from a *different* problem (GSM8K) are injected; `injection_ops` is how many (1, 3, 5, 7, or 9) |
Fragility rises with perturbation dose: 36.5% of problems are fragile over the pooled doses, and 87.0% of the
problems the solver gets right are CCD-fragile (see the table below).
### Configs
| config | one row is | rows |
|---|---|---|
| `glassmath` | one twin × one run setting `m` | 122,847 |
| `glassmath_bases` | one base problem × `m`, with base-level aggregates | 24,985 |
| `glassmath_pooled` | one base problem, pooled over all doses (unique twin texts) | 4,999 |
Each config has a single split named `full`. No train/test split is shipped; the paper uses repeated random
problem-level splits, so **split by `base_id`, never by row**: all twins of a base share a label structure and a
base text.
### Twin fields (`glassmath`)
| field | type | meaning |
|---|---|---|
| `uid` | string | unique row key `solver/m{m}/twin_id` (`twin_id` alone is only unique within one `m`) |
| `base_id` | string | original problem id; `math_adv-N` is index N of the MATH test split (as ordered by the `EleutherAI/hendrycks_math` subject configs) |
| `twin_id` | string | twin id within a run |
| `m` | int | run setting (1, 3, 5, 7, 9), see below |
| `solver` | string | solver model whose outputs produced the labels (`gpt-4o-mini` for every row) |
| `family` / `injection_ops` / `operator` | | perturbation family, number of injected sentences (null for non-injection), and the raw operator tag |
| `subject` | string | MATH subject: algebra, counting_and_probability, geometry, intermediate_algebra, number_theory, prealgebra, precalculus |
| `level` | int | MATH difficulty level, 1 (easiest) to 5 |
| `complexity`, `complexity_score` | | declared complexity proxy derived from `level`: easy (levels 1-2), medium (3-4), hard (5); `complexity_score` runs from 0.05 (level 1) to 0.95 (level 5) in steps of 0.225. Set by the MATH authors, independent of any twin or model output |
| `base_text`, `twin_text` | string | original and perturbed problem |
| `gold_answer` | string | final answer, the last `\boxed{}` of the MATH reference solution |
| `base_solved` | bool | the solver answered the base correctly (modal answer of 5 samples at temperature 0.2) |
| `delta` | int | `Y(base) - Y(twin)` in {-1, 0, 1}; `1` means the twin is wrong where the base was right |
| `broke` | bool | `delta == 1`. It implies `base_solved`. Fragility is defined on rows where `base_solved` is true |
### Base fields (`glassmath_bases`)
`base_id, m, solver, subject, level, complexity, complexity_score, base_text, gold_answer, base_solved` plus
`n_twins`, `d_obs` (mean `delta` over the base's twins) and `d_wc` (max `delta`). They are exact aggregates of the
twin rows, shipped separately so they do not leak into twin-level modeling as if they were per-twin labels.
### Pooled fields (`glassmath_pooled`)
`base_id, solver, subject, level, complexity_score, base_text, gold_answer, base_solved` (majority over the five
doses), `n_unique_twins` (twins pooled over all doses, deduplicated on `(base_id, twin_text)`), `pi` (break rate over
those twins, the CCD; meaningful only where `base_solved`), `d_obs` (mean `delta`), `fragile` (`d_obs > 0.05`, the
paper's definition, over all problems) and `ccd_fragile` (`base_solved` and `pi > 0.05`).
### The run setting `m`
`m` is the dose: each file holds `m` twins per base problem (fewer for a small number of problems), split across
the three families; the injection family draws its twins from runs whose injection size is at most `m`. Rows carry
both the file-level `m` and the twin's own `injection_ops`. The twin sets at different `m` are resamples of the same
audited pool (no new LLM calls), not independent draws, so treat them as the same problems seen at different
perturbation budgets. **Do not treat the five dose files as independent samples**, and do not key on `twin_id`
across doses: the same id is reused with different text at different `m` (32,032 ids), so deduplicate on
`(base_id, twin_text)`. Pooled over doses there are 115,364 unique twins (23.1 per problem), not the 122,847 rows.
## Statistics
*Break rate* = share of twins on a solved base that the solver gets wrong. *Fragile problems* = share of all
problems whose mean effect `d_obs` exceeds 0.05 (the paper's definition). *CCD-fragile* = share of solved problems
whose break rate `pi` exceeds 0.05.
Solver: `gpt-4o-mini` (temperature 0.2, 5 samples per prompt, modal answer).
| m | twins | base problems | break rate on solved bases | fragile problems | zero-effect problems |
|---|---|---|---|---|---|
| 1 | 4,999 | 4,999 | 23.6% | 10.5% | 78.4% |
| 3 | 14,994 | 4,998 | 28.3% | 24.3% | 58.4% |
| 5 | 24,980 | 4,998 | 30.1% | 31.3% | 49.5% |
| 7 | 34,589 | 4,998 | 30.1% | 33.9% | 45.8% |
| 9 | 43,285 | 4,992 | 29.9% | 34.8% | 44.7% |
| pooled | 115,364 unique | 4,999 | n/a | 36.5% | 34.4% |
Pooled over doses, 87.0% of the 2,222 solved problems are CCD-fragile. The pooled row is the GlassMATH row of the
paper's Table 1. Per-dose figures come from the `glassmath` config and the pooled figures from `glassmath_pooled`.
## Construction and audit
Twins come from the three operator families above: entity renaming and sentence reordering are produced by
deterministic surface operators, and injection splices in setup sentences drawn from GSM8K problems. Before release
every (base, twin) pair is passed through a full-corpus filter: an LLM adjudicator checks that the twin does not
change or invalidate the gold answer, and deterministic checks drop pairs with entity-name collisions,
gold-answer-number collisions, or an extra question. This corpus is the audited, resampled mix of those surviving
pairs (no new LLM calls were made to build it). For the `m=9` generation file the audit saw 107,573 pairs and
dropped 12,823 (11.9%): 12,059 gold-answer collisions, 608 entity collisions, 166 LLM contradictions and 52 unparsed
responses (62 pairs hit two reasons); the released `m=9` file resamples at most nine of the 94,750 kept pairs per
problem. A heuristic unit-collision flag (about 10K pairs) was re-adjudicated by a second LLM judge and produced no
actual contradiction, so those pairs are kept. The audit is a best-effort filter, not a proof of zero contamination;
a 1,000-pair human spot-check (drawn from both GlassGSM and GlassMATH) agreed with the LLM verdicts on every audited
kept pair. Details are in the paper's appendix.
## Intended use and limitations
* Intended for research on robustness and per-instance difficulty prediction for LLMs.
* Labels are **solver-relative**. They describe fragility of `gpt-4o-mini` under the stated decoding setup, not an
intrinsic property of a problem, and transfer across solvers is only partial.
* The solver labels carry sampling noise: re-solving an unperturbed base breaks about 2.5% of the time.
* Twins are machine-generated and may contain residual answer-changing text despite the audit.
* 4,999 of the 5,000 MATH test problems are included (index 391 is not). Gold answers are compared as normalized
strings or numbers, so a few equivalent-but-differently-written answers may be marked wrong.
* The base problems come from the public MATH test set. Do not use this data to train models you intend to evaluate
on MATH.
## Provenance and licensing
Base problems, gold answers, subjects and levels originate from the MATH dataset (MIT); injected sentences come from
GSM8K (MIT). Perturbations and labels are new. The release is under the MIT license; the upstream notices are
reproduced in `NOTICE.md`.
## Loading
```python
import pandas as pd
twins = pd.read_parquet("data/glassmath/twins.parquet")
solved = twins[(twins["m"] == 9) & twins["base_solved"]]
```
## Citation
```bibtex
@misc{rezaei2026fragilityreduciblehardnessconditional,
title={Fragility Is Not Reducible to Hardness: Conditional Causal Difficulty for LLMs},
author={Mohammad Reza Rezaei and Dingxian Wang and Nikhil Verma and Sajjad Pakdamansavoji and Andrew Rabinovich and Zhao Chen},
year={2026},
eprint={2611.02065},
archivePrefix={arXiv},
primaryClass={cs.LG},
url={https://arxiv.org/abs/2611.02065},
}
```