File size: 7,049 Bytes
b9132f3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4ad9391
 
b9132f3
4ad9391
b9132f3
 
 
4ad9391
 
b9132f3
 
 
 
 
 
 
 
 
 
4ad9391
 
 
 
 
 
 
 
 
 
b9132f3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4edf63f
b9132f3
4edf63f
 
 
b9132f3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
---
license: mit
task_categories:
  - question-answering
  - text-generation
language:
  - en
tags:
  - benchmark
  - reasoning
  - multi-step
  - evaluation
  - llm-evaluation
  - goodhart
  - execution-vs-understanding
size_categories:
  - n<1K
---

# Goodhart Gap Benchmark

**Detecting the gap between understanding and execution in language models**

## Overview

The Goodhart Gap Benchmark tests whether language models can correctly *execute* multi-step reasoning tasks that they can correctly *explain*. Named after Goodhart's Law ("When a measure becomes a target, it ceases to be a good measure"), this benchmark reveals a critical failure mode: models that understand procedures but fail to execute them.

## Key Finding

In our testing of 15+ models:
- **gpt-4o**: 57% pass rate (fails on financial, scheduling, units)
- **gpt-4o-mini**: 36% pass rate
- **Claude 3.5 Haiku**: 93% pass rate
- **Llama 3.1 70B**: Fails the canonical discount calculation despite correct explanation

## The Canonical Example

**Problem**: "If a shirt costs $25 and is on 20% sale, and you have a $5 coupon, what do you pay?"

**Correct answer**: $15 (apply 20% discount first: $25 × 0.8 = $20, then subtract coupon: $20 - $5 = $15)

When we first ask models to *explain* the procedure, they all correctly state: "First apply the discount, then subtract the coupon."

When we then ask for the answer, many models fail—giving answers like $16, $17, $22.50, or even $175.

## Dataset Statistics

| Metric | Value |
|--------|-------|
| Total problems | 101 |
| Domains | 12 |
| Difficulty levels | 3 (easy, medium, hard) |
| Steps per problem | 2-6 |

### Problems by Domain

**Numerical Domains (67 problems)**

| Domain | Count | Description |
|--------|-------|-------------|
| math_discount | 15 | Discounts, coupons, taxes, markups |
| time | 13 | Duration arithmetic, travel times |
| financial | 10 | Interest, taxes, commissions |
| logic | 8 | Ordering, deduction, set operations |
| recipe | 7 | Scaling, unit conversion |
| scheduling | 7 | Task dependencies, work rates |
| units | 7 | Unit conversion with operations |

**Non-Numerical Domains (34 problems)**

| Domain | Count | Description |
|--------|-------|-------------|
| spatial | 7 | Direction tracking, grid navigation, relative positions |
| procedural | 6 | State machines, undo/redo, procedure following |
| text | 7 | String manipulation, encoding, word operations |
| sequence | 7 | Pattern recognition (letters, symbols, words) |
| causal | 7 | Cause-effect chains, counterfactuals, necessary/sufficient |

### Difficulty Distribution

| Difficulty | Count | Description |
|------------|-------|-------------|
| Easy | 28 | 2 steps, straightforward |
| Medium | 32 | 2-3 steps, some complexity |
| Hard | 7 | 3-4 steps, multiple operations |

## Data Format

Each problem is a JSON object with the following fields:

```json
{
  "id": "math_discount_01",
  "domain": "math_discount",
  "problem": "A product costs $25 and is on 20% sale. You also have a $5 coupon. What do you pay? Answer with just the number.",
  "correct_answer": "15",
  "explanation": "25 × 0.8 = 20.0, then 20.0 - 5 = 15.0",
  "understanding_check": "To solve this, first apply the 20% discount, then subtract the coupon. What are the two steps?",
  "difficulty": "easy",
  "steps": 2
}
```

### Field Descriptions

| Field | Description |
|-------|-------------|
| `id` | Unique identifier (domain_type_number) |
| `domain` | Category of reasoning required |
| `problem` | The question posed to the model |
| `correct_answer` | Expected answer (numeric or text) |
| `explanation` | Step-by-step solution |
| `understanding_check` | Prompt to verify model understands the procedure |
| `difficulty` | easy, medium, or hard |
| `steps` | Number of sequential operations required |

## Usage

### Quick Evaluation

```bash
# Install requirements
pip install requests

# Evaluate OpenAI model
python evaluate.py --provider openai --model gpt-4o -v

# Evaluate Claude model
python evaluate.py --provider anthropic --model claude-3-5-haiku-latest -v

# Evaluate local Ollama model
python evaluate.py --provider ollama --model llama3.1:8b -v
```

### Python API

```python
import json

# Load dataset
problems = []
with open('data/test.jsonl') as f:
    for line in f:
        problems.append(json.loads(line))

# Test your model
for problem in problems:
    response = your_model.generate(problem['problem'])
    expected = problem['correct_answer']
    # Validate response against expected
```

### With HuggingFace Datasets

```python
from datasets import load_dataset

dataset = load_dataset("your-username/goodhart-gap-benchmark")

for example in dataset['test']:
    print(example['problem'])
    print(f"Expected: {example['correct_answer']}")
```

## Evaluation Criteria

A response is considered correct if:
1. **Numeric answers**: The expected number appears in the response (with tolerance for rounding)
2. **Time answers**: The expected time appears in any reasonable format (e.g., "4:45 PM", "4:45pm", "16:45")
3. **Yes/no answers**: The response clearly indicates yes, no, or "cannot determine"
4. **Ordering answers**: Items appear in the correct sequence

## Leaderboard

| Model | Provider | Pass Rate | Weakest Domain |
|-------|----------|-----------|----------------|
| Claude 3.5 Haiku | Anthropic | 93% | logic |
| Claude Sonnet 4 | Anthropic | 79% | financial, scheduling |
| gpt-4o | OpenAI | 57% | scheduling |
| gpt-4o-mini | OpenAI | 36% | most domains |
| Qwen 2.5 72B | Alibaba | TBD | - |
| Llama 3.1 70B | Meta | TBD | - |

*Submit your results via PR to add to the leaderboard*

## Why This Matters

### For AI Safety
Models that can explain correct procedures but execute them incorrectly are:
- Harder to detect through explanation-based evaluation
- More dangerous in agentic settings
- A gap between capability benchmarks and deployment readiness

### For Model Selection
Not all models are equal for multi-step reasoning:
- Model family matters more than size
- Distilled models often lose this capability
- Test execution, not just explanation

### For Training
The gap appears to be a training problem:
- Well-trained models (Claude Haiku) outperform larger models
- Suggests targeted fine-tuning could help

## Citation

```bibtex
@dataset{goodhart_gap_benchmark_2026,
  title={Goodhart Gap Benchmark: Detecting the Gap Between Understanding and Execution in LLMs},
  author={Adam Kruger},
  year={2026},
  url={https://huggingface.co/datasets/Adam1010/goodhart-gap-benchmark}
}
```

## License

MIT License - free for research and commercial use.

## Contributing

We welcome contributions:
- New test cases in underrepresented domains
- Results from additional models
- Improved validators
- Translations to other languages

Submit issues and PRs at: [GitHub Repository URL]

## Acknowledgments

Research inspired by:
- Goodhart's Law and its application to AI evaluation
- Work on multi-step reasoning in LLMs
- The distinction between System 1 and System 2 thinking