knowwhen-phys-bench / README.md
kungfupanda12's picture
KnowWhen-Phys release
5463d1c verified
|
Raw History Blame Contribute Delete
7.22 kB
---
license: cc-by-4.0
task_categories:
- question-answering
language:
- en
tags:
- physics
- calibration
- abstention
- benchmark
size_categories:
- 1K<n<10K
dataset_info:
features:
- name: id
dtype: string
- name: split
dtype: string
- name: system
dtype: string
- name: qtype
dtype: string
- name: prompt
dtype: string
- name: gold
dtype: string
- name: kind
dtype: string
- name: units
dtype: string
- name: tol
dtype: float64
- name: periodic
dtype: float64
- name: predictable
dtype: bool
- name: reference_value
dtype: string
- name: ens_min
dtype: float64
- name: ens_max
dtype: float64
- name: ftle
dtype: float64
- name: sensitivity
dtype: float64
- name: char_time
dtype: float64
- name: horizon
dtype: float64
- name: params
dtype: string
- name: method
dtype: string
- name: predictability_note
dtype: string
- name: generator_version
dtype: string
- name: ood_keys
sequence: string
configs:
- config_name: default
data_files:
- split: test_id
path: test_id.jsonl
- split: test_ood_params
path: test_ood_params.jsonl
- split: test_ood_systems
path: test_ood_systems.jsonl
---
# KnowWhen-Phys-Bench
A benchmark of 3,000 mechanics, dynamics and control questions with exact ground truth from simulators. It tests two things at once: can a model get the number right, and does it know when the number cannot be known.
Every question gives exact starting values and says they are known to within 0.1%. Some questions can be answered from that. Others cannot, because the system is chaotic or the horizon is too long, and the correct answer is then "unpredictable". The label comes from the physics, by rerunning the simulation, not from the name of the system.
## Splits
| split | systems | parameters | items | unpredictable | yes/no items |
|---|---|---|---|---|---|
| test_id | 7 train systems | inside the training ranges | 1,000 | 51 | 280 |
| test_ood_params | 7 train systems | at least one parameter outside the training ranges | 1,000 | 52 | 280 |
| test_ood_systems | 5 held out systems | their own ranges | 1,000 | 75 | 248 |
Train systems: simple pendulum, damped and driven pendulum, mass spring damper, projectile with quadratic drag, cart pole, two body orbit, 1D rocket with drag and gravity falloff. Held out systems: double pendulum, acrobot, planar circular restricted three body problem (Earth and Moon), coupled oscillators, two stage rocket.
## How the gold answer is made
Each scenario is simulated with scipy `solve_ivp` (RK45, rtol 1e-10, atol 1e-12), or with a closed form where one exists (elliptic pendulum period, Kepler's equation, the spring solution, the rocket equation). The gold answer uses the numbers exactly as they appear in the prompt.
## How "unpredictable" is decided
Each question is rerun from 8 starting states, each nudged at random by up to 0.1% of each initial value. If any rerun lands outside the scoring tolerance (5%, or a small absolute floor per question type), or flips a yes/no answer, the gold answer is "unpredictable". So a double pendulum's energy is predictable while its angle after a while is not, and a near circular orbit stays predictable for far longer than an eccentric one.
## Fields
Each line is one JSON item. `params`, `gold` and `reference_value` change type from item to item, so they are stored as JSON strings: call `json.loads` on them. The main fields:
* `id`, `split`, `system`, `qtype`: identifiers.
* `prompt`: the full question, including the precision statement and the answer format.
* `gold`: the answer, a number, true or false, or "unpredictable".
* `kind`: "num" or "bool". `tol`: the scoring tolerance. `units`.
* `predictable`: false when the gold answer is "unpredictable".
* `reference_value`: the simulated value from the nominal start, kept even for unpredictable items.
* `ens_min`, `ens_max`: range of the 8 nudged reruns. `ftle`: a finite time Lyapunov estimate (analysis only, not used for the label).
* `params`, `horizon`, `ood_keys`: the scenario and which parameters are out of range.
* `periodic`: 360 for answers in degrees, so that angles are compared modulo a full turn, otherwise null.
* `method`: how the gold value was computed: `closed_form`, `formula`, `numeric` (integration) or `inverse` (a search for the smallest value that meets a condition).
* `sensitivity`, `char_time`: how strongly the answer reacts to the starting values, and the system's characteristic time.
* `predictability_note`: one sentence on why the item is or is not predictable.
* `generator_version`: version of the generator that built the item.
The generator also writes a worked answer for every item. Those are left out of the public files, because they are in the style the model was trained on and nobody should train on test answers by accident.
## Scoring
A model answers with a short reasoning paragraph and then one JSON line, `{"answer": ..., "units": ..., "confidence": 0 to 100}`. The scorer in the GitHub repo (`src/eval/score.py`) reads the last JSON line. A number is correct within the tolerance, yes/no must match, and "unpredictable" is correct only on unpredictable items. Reported metrics: accuracy, accuracy on predictable items, abstain recall, false abstain rate, ECE, Brier score and AURC.
## Baselines
Zero shot, greedy, first 300 items of each split pooled. Full tables with confidence intervals are in docs/BASELINES_TABLE.md.
| run | n | accuracy | acc. predictable | abstain recall | false abstain | ECE | Brier | AURC | valid JSON |
|---|---|---|---|---|---|---|---|---|---|
| Qwen3.5-0.8B zero shot | 900 | 0.13 | 0.14 | 0.00 | 0.01 | 0.80 | 0.78 | 0.86 | 0.62 |
| Qwen3.5-0.8B few shot | 900 | 0.17 | 0.18 | 0.16 | 0.05 | 0.55 | 0.47 | 0.84 | 0.79 |
| Qwen3.5-4B zero shot | 900 | 0.31 | 0.28 | 0.81 | 0.34 | 0.64 | 0.62 | 0.65 | 0.95 |
| Qwen3.5-4B few shot | 900 | 0.29 | 0.26 | 0.70 | 0.32 | 0.63 | 0.60 | 0.68 | 0.98 |
| Qwen3.5-9B zero shot | 900 | 0.38 | 0.37 | 0.51 | 0.12 | 0.57 | 0.56 | 0.56 | 0.90 |
| 4B + SFT run 5, zero shot | 900 | 0.30 | 0.29 | 0.46 | 0.08 | 0.21 | 0.22 | 0.53 | 1.00 |
The last row is the released KnowWhen-Phys model, [kungfupanda12/knowwhen-phys](https://huggingface.co/kungfupanda12/knowwhen-phys). Code, scorer and full tables: https://github.com/Optimus2007/knowwhen-phys.
## Freezing and leakage
The test splits were built before any training data. Their SHA256 hashes are in `manifest.json`. Training data was checked against them for exact copies, rephrased copies, near duplicate scenarios (same system, every parameter within 2%) and any held out system.
## Limits
* Questions are templated English with several phrasings per question type.
* Unpredictable items are a minority (5 to 8% per split), as in the natural distribution of the generator. Report abstain recall and false abstain separately, not only accuracy.
* The precision convention (0.1%) is fixed. A different convention would change which items are unpredictable.