Few-shot transfer in physics ML usually means: same equation, more parameters. We transfer across laws: a generalist that has seen five laws adapts to a held-out sixth with a quarter of the data at 2.9× lower error than a from-scratch specialist. Then we decompose why, with ablations that overturned the intended narrative: the quantity vocabulary is the dominant carrier (removing it is 10× worse), and the physics residual — helpful in general — constrains trajectory specialization at tiny budgets (removing it improves trajectory error 7× while answers stay flat). Both findings are per-seed, committed, and re-runnable.
The token stream of quantities and operators is the cross-law memory: ablation is catastrophic (10×). The physics residual is a constraint: at 24 samples it pins trajectories to equation-consistent shapes before the data can specialize them — removing it frees the curve 7× while answers are unaffected.

lower answer error than a from-scratch specialist at the 25% budget, on the held-out law.

removing the vocabulary token stream is catastrophic — it is the main carrier of cross-law knowledge.
removing the physics residual frees trajectory specialization at tiny budgets while answers stay flat — the residual constrains curves before data can.
Median answer rel-MAE at the 25% budget, and the ablation decomposition.
| Condition | answer rel-MAE (25% budget) | note |
|---|---|---|
| Generalist (real signature) | 0.197 | 2.9× better than specialist |
| Dummy control | 0.239 | same data, no law identity |
| From-scratch specialist | 0.580 | the baseline transfer beats |
| Ablation | answer rel-MAE | vs. frozen |
|---|---|---|
| no vocabulary | 2.022 | 10.2× |
| no physics residual | 0.214 | answers flat; curve freed 7× |
| frozen body | 0.198 | reference |
git clone https://github.com/sehajr-singhs/fewshot-law-acquisition cd fewshot-law-acquisition python -m unittest tests.test_physx # 49 physics tests python figs/make_figures.py # figures from committed fewshot_data.json python src/physx/train_fewshot.py # re-run the few-shot protocol python src/physx/run_transfer_ablations.py # re-run the ablations
Simulation-only, CPU-scale, deterministic seeds. No GPU required.
Seven manuscripts, one codebase, one guarantee: every number traces to a committed JSON and regenerates from a committed script.
the system and its project root
the PhysFormer architecture; the falsified regime theory
the 12-domain verifiable benchmark
the gate as the missing control in agent evaluation
when physics in the loss helps — and when it only enforces consistency
the cost of consistency on 2D fields