Skip to content

Latest commit

 

History

334 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Asymptotic Dictionary Correction Discovery (ADCD)

A deterministic, identifiability-aware framework for recovering algebraic corrections to known physical laws from noisy observational data.

Paper (NewInML @ NeurIPS 2026) · Quickstart Notebook

License: MIT Python 3.10+ JAX Float64 Byte-exact


What is ADCD?

Most physics equations are corrections to a known baseline: Einstein did not throw away Newton — he found the extra term that matters at high speeds. ADCD automates that same reasoning.

Given:

  • A classical baseline (e.g. Coulomb's law)
  • Noisy observations that deviate from it
  • A taxonomy key naming the physics domain

ADCD searches for the symbolic correction term Δ that:

  1. Vanishes exactly at the classical limit (algebraic guarantee — no floating-point collapse)
  2. Is dimensionally consistent (5D MLTΘQ Buckingham-π engine)
  3. Issues a formal WITHHELD verdict instead of a hallucinated answer when data cannot support a structural claim

Three mechanisms, one pipeline:

Noisy data → [Mode detection] → [Gate cascade] → [JAX optimizer] → IDENTIFIABLE / WITHHELD
                                      ↑
              Algebraically regularized primitives + Buckingham-π + Taxonomy prior

Results at a Glance

Scenario Window ΔBIC NMSE Verdict
Screened Coulomb r ≤ 4.0 m 30.65 2.77 × 10⁻⁴ IDENTIFIABLE (exact match)
Entropy Expansion dV/Vᵢ ≤ 1.0 14.70 1.59 × 10⁻² IDENTIFIABLE (class match)
Time Dilation v ≤ 0.3c 13.79 0.41 WITHHELD (signal too weak)

All numbers are byte-exact reproducible. Time Dilation being WITHHELD is intended behavior, not a failure — it means the 4.8% correction is indistinguishable from 1% noise at that observation window.


Quick Start (5 minutes)

1. Clone and install

git clone https://github.com/apiprdt/PhysicsPaper.git
cd PhysicsPaper

Create a virtual environment:

# Linux / macOS
python -m venv .venv
source .venv/bin/activate

# Windows PowerShell
python -m venv .venv
.\.venv\Scripts\Activate.ps1

Install dependencies:

pip install -r requirements.txt
# Or for an editable development install:
pip install -e ".[dev]"

2. Reproduce all three paper scenarios

# Linux / macOS
export PYTHONPATH=src
python src/adcd/run_adcd_v3_validation_blind.py --top-k 5

# Windows PowerShell
$env:PYTHONPATH = "src"
python src\adcd\run_adcd_v3_validation_blind.py --top-k 5

Expected output summary:

══════════════════════════════════════════════════════
 ADCD v3  —  Validation Summary
══════════════════════════════════════════════════════
 Scenario            NMSE       ΔBIC    Verdict
──────────────────────────────────────────────────────
 Screened Coulomb    2.77e-04   30.65   IDENTIFIABLE
 Entropy Expansion   1.59e-02   14.70   IDENTIFIABLE
 Time Dilation       4.12e-01   13.79   WITHHELD
══════════════════════════════════════════════════════

Full JSON results are saved to run_outputs/adcd_v3_taxonomy_validation_report.json.

3. Interactive notebook

For a step-by-step walkthrough of one experiment:

pip install jupyter
jupyter notebook notebooks/01_quickstart.ipynb

Repository Structure

PhysicsPaper/
├── src/adcd/                  # Core library
│   ├── anomaly_scenarios.py   # Three canonical experiment definitions
│   ├── pipeline.py            # Five-gate pre-fitting cascade
│   ├── jax_optimizer.py       # L-BFGS-B optimizer (JAX float64)
│   ├── quickfit.py            # Domain taxonomy (DOMAIN_TAXONOMY dict)
│   ├── dimensional_checker.py # 5D MLTΘQ Buckingham-π engine
│   ├── arc_scorer.py          # Asymptotic Regularity Check (ARC)
│   ├── metrics.py             # Extended BIC, NMSE, structure classification
│   ├── auto_scenario.py       # CSV → AnomalyScenario ingestion layer
│   └── run_adcd_v3_validation_blind.py  # Main validation entrypoint
├── notebooks/
│   └── 01_quickstart.ipynb    # End-to-end demo (Screened Coulomb)
├── paper/
│   ├── main.tex               # LaTeX source (NeurIPS 2026 template)
│   ├── main.pdf               # Compiled paper (camera-ready)
│   └── references.bib         # Bibliography
├── rebuttal/                  # 3×3 misspecification audit tables
├── run_outputs/               # Saved JSON validation reports
├── tests/                     # pytest test suite
├── requirements.txt           # Pinned dependency lockfile
├── pyproject.toml             # Package metadata
├── CONTRIBUTING.md            # How to add scenarios and extend the taxonomy
└── REPRODUCIBILITY.md         # Number-by-number provenance log

Running a Single Scenario

You can run ADCD on a single scenario programmatically:

import sys
sys.path.insert(0, 'src')

from adcd.anomaly_scenarios import get_all_scenarios

# Load the Screened Coulomb scenario
scenarios = {s.name: s for s in get_all_scenarios()}
scenario = scenarios["Screened Coulomb"]

# Generate synthetic data (ground truth hidden from ADCD)
X, y_classical, y_obs, delta_true = scenario.generate_data(
    n_points=200,
    noise_level=0.01,  # 1% Gaussian noise
    seed=42,
    domain_max=4.0,    # historical window: r ≤ 4.0 m
)

print(f"Scenario: {scenario.name}")
print(f"Domain:   {scenario.domain}")
print(f"N points: {len(X['r'])}")

See notebooks/01_quickstart.ipynb for the full pipeline including optimizer and verdict.


Adding a Custom Scenario

Option A — Python API (recommended for reproducibility):

  1. Add a new entry to DOMAIN_TAXONOMY in src/adcd/quickfit.py with peer-reviewed primitive justification.
  2. Create an AnomalyScenario instance in src/adcd/anomaly_scenarios.py.
  3. Run src/adcd/run_adcd_v3_validation_blind.py.

Option B — CSV ingestion (fastest for exploratory use):

from adcd.auto_scenario import load_scenario_from_csv

scenario = load_scenario_from_csv(
    path="my_data.csv",           # columns: variable names with [unit] headers
    classical_col="y_classical",
    observed_col="y_obs",
    domain="yukawa_debye_screening",  # must match a key in DOMAIN_TAXONOMY
    limit_variable="r",
    limit_direction="0",
)

CSV header format: variable_name [unit], e.g. radius [m], charge_1 [C].

See CONTRIBUTING.md for the full taxonomy extension protocol.


Reproducibility

All results in the paper are byte-exact deterministic. To verify:

# Linux / macOS
bash reproduce_all.sh

# Windows PowerShell
.\reproduce_all.ps1

The scripts run all three scenarios three times and assert that all runs are byte-identical. Number-by-number provenance is in REPRODUCIBILITY.md.


Citing

If you use ADCD in your research, please cite:

@inproceedings{erdita2026adcd,
  title     = {Asymptotic Dictionary Correction Discovery: A Deterministic,
               Identifiability-Aware Framework for Recovering Physical
               Corrections from Observational Data},
  author    = {Erdita, Muhammad Afif},
  booktitle = {NewInML Workshop at the 40th Conference on Neural Information
               Processing Systems (NeurIPS 2026)},
  year      = {2026},
  address   = {Paris, France},
  url       = {https://github.com/apiprdt/PhysicsPaper},
}

License

MIT License. See LICENSE for details.


Built independently by Muhammad Afif Erdita · Indonesia · 2026

Releases

Packages

Contributors

Languages