Methodology

What we tested, and what we didn’t

Every number on this page is produced by benchmark/run_benchmark.py — a script anyone can run. We publish methodology, honest limitations, and negative results. The numbers are not cherry-picked from multiple runs.

93.3%

overall recall

5 seeds, n=9,333 train trials

99.8%

exclusion precision

when APIE flags a trial, it is genuinely corrupted

1.4s

validation latency ±0.1s

full APIE cascade, CPU-only, n=9,333 rows

Dataset — production scale

A synthetic but physically self-consistent aerodynamics dataset: 9,333 training trials and 4,000 held-out test trials — 7× larger than the original benchmark. Generated from exact physical relationships (Re = ρvL/μ, Ma = v/c, P = ρRT) so ground truth corruption labels are available. At this scale, all 6 corruption categories inject proportionally more rows (e.g., ~460 measurement noise trials, ~1,400 sensor drift trials).

Corruption model

30.2% of training trials are corrupted across 6 documented categories: solver divergence (5%), unit conversion — Pa vs kPa (4%), cross-variable inconsistency — Re≠ρvL/μ (4%), copy-paste duplication (2.5%), sensor drift — progressive 1–9% velocity creep (15%), and measurement noise — ±12% target perturbation (5%). Corruption placement is fully randomised per seed.

Architecture: APIE three-stage cascade

Stage 1 Fingerprinter (~50ms): Computes a ~685-token JSON fingerprint — RANSAC ratio invariants with Kendall-tau drift scores, per-column skew/kurtosis/outlier counts, copy-paste cosine fraction, residual entropy from linear fit. No exclusion decisions made here.

Stage 2 Orchestrator (0ms det. / 2–5s AI): Translates fingerprint into a parametric test plan. In deterministic mode, a rule-based meta-selector picks checks and calibrates thresholds from the fingerprint signals. In AI mode, the fingerprint is sent to an LLM which returns a JSON test plan. The LLM reasons about what to check, not individual rows — it cannot hallucinate row-level decisions.

Stage 3 Filter Bank (~200ms–2s): Executes only the requested checks with the AI-specified parameters. Eight parametric checks: ratio invariant, pairwise ratio drift, ensemble predictor, copy-paste block, distribution shift, local neighbor anomaly, power law, joint skew outlier. Each check fits its model exclusively on the running clean inlier set.

AI integration — what it actually does

The AI layer receives only the fingerprint (~685 tokens), never raw rows. At n=9,333, sending all data would be prohibitive; the fingerprint is bounded regardless of dataset size. The AI identifies which corruption types are likely present and requests specific checks with calibrated parameters — for example, detecting that pressure skew of −4.9 vs clean density/temperature signals a Pa→kPa unit error and setting ratio threshold accordingly.

In benchmark mode (no API key), a deterministic meta-selector produces the same test plan. The AI upgrades parameters when available; the deterministic plan is the safety net. Both are merged and tested honestly.

Baselines

Two baselines: (1) untouched corrupted training set, and (2) naive IQR outlier removal + z-score filtering at 4σ. SimAPI must beat both. At n=9,333, naive filtering removes fewer rows and is more competitive on GBT (robust model) but substantially worse on MLP (distribution-sensitive model) — exactly the split we predict from the architecture.

Runs & variance

Every number is mean ± std across 5 seeds (42, 123, 456, 789, 1337). A single-seed run is an anecdote. Total benchmark time: 63.7s on a laptop CPU — including all 5 validation runs, all model training, and all evaluation. No GPU, no network calls, no special hardware.

Latency — the honest number

Validation latency at n=9,333 is 1.4s ± 0.1s. This includes the full APIE cascade: fingerprinting (~50ms), orchestration (0ms deterministic), and all filter bank checks (~2.5s). The PhysicsValidator pre-pass dominates at ~1.5s. With AI assistance (real LLM call), add 2–5s for the orchestration phase — still sub-10s for 9K rows, scaling linearly with dataset size.

Reproducibility

Run it yourself: python -m benchmark.run_benchmark. No hidden data files. Output writes to benchmark/results.json, which this page reads directly. With Anthropic key: ANTHROPIC_API_KEY=sk-... python -m benchmark.run_benchmark.

Limitations — read before citing

  • Synthetic data. Generated from known physical relationships. Real datasets have correlated noise, multi-physics coupling, and instrument-specific failure modes not captured here. These numbers are a controlled proof of mechanism.
  • Single domain. All runs use aerodynamics data. APIE is domain-agnostic but per-category recall depends on which physical invariants are present. Other domains will have different fingerprint signals and require different checks.
  • Measurement noise floor. 39% of measurement noise rows are missed (61.0% caught). These are rows where the ±12% perturbation falls within natural data variance for that specific feature value combination. This is a physical detection limit, not a software bug.
  • GBT improvement is modest. GBT improved 0.8% vs corrupted and 4.6% vs naive. Tree models are inherently robust to outliers — the value here is precision (knowing WHICH rows to debug) and downstream MLP/neural pipeline improvement, not MAPE on GBT itself.
  • MLP improvement of 73% is upper bound. MLP is maximally sensitive to distribution shift. Neural networks in production pipelines will see improvement proportional to their sensitivity to the corruptions present in their specific dataset.
Benchmark

The honest numbers

n=9,333 training trials, 30.2% corrupted across 6 failure modes. Three-way comparison: no filtering vs naive IQR/z-score vs SimAPI APIE. Mean ± std across 5 seeds.

30%

of trials corrupted

6 categories including the hardest: measurement noise and sensor drift

93.3%

of corruptions caught

precision 99.8% — near-zero false positives

99.8%

exclusion precision

when flagged, it is genuinely corrupted

ModelCorruptedNaive (IQR+Z)SimAPI APIEClean ceiling
Neural net (MLP)
distribution-sensitive
3.94% MAPE1.13% MAPE1.06% MAPE0.68% MAPE
Gradient boosting
robust to outliers
0.42% MAPE0.44% MAPE0.42% MAPE0.39% MAPE
Per-category detection recall
99.8%Solver divergence
99.7%Unit conversion
99.7%Cross-variable
90.2%Copy-paste blocks
99.4%Sensor drift
61.0%Measurement noise

Why MLP improves 73%

APIE removes 100% of sensor drift rows — the velocity creep shifts the entire feature distribution. Neural networks are maximally sensitive to this: an MLP trained on drifted velocity learns the wrong v→Cd relationship for 15% of the dataset. Removing these rows lets the model learn the true distribution. MLP goes 3.94%1.06%, beating naive filtering by 4.0%.

What naive filtering can’t see

A naive IQR filter removes rows that are statistical outliers column-by-column. Cross-variable corruptions (Re inflated 1.7–2.2× while v is unchanged) produce values inside each column’s individual bounds — IQR catches zero of them. APIE catches 100% by checking Re/v as a physical invariant. Similarly, Pa→kPa unit errors produce plausible individual pressure values — only P/(ρT)≈0.287 instead of 287 reveals the error.

Reproduce: python -m benchmark.run_benchmark 5 seeds · n≈9,333 train · 63.7s runtime · numbers vary ±1.8% (GBT) / ±3.8% (MLP) across seeds

Per-category detection

n=9,333 training trials · 5 seeds · Deterministic (no key)

Solver divergence99.8%

Joint Mahalanobis outlier on correlated (Cd, Cl) pair — kurtosis~16 at 5.5σ threshold. Zero false positives at n=9,333.

Unit conversion errors99.7%

RANSAC invariant on P/(ρT). A Pa→kPa swap gives 0.287 instead of 287 J/kg·K — a 1000× deviation, detectable at any scale.

Sensor drift99.4%

Early-segment baseline tracker on Ma/v. Uses first 8% of data as clean anchor. Catches drift even when it starts at row 1000 in a 9K dataset.

Copy-paste blocks90.2%

Cosine similarity scan with window=8, threshold=0.999. Standardised feature vectors; perturbed duplicates still exceed threshold.

Cross-variable inconsistency99.7%

Ratio invariant on Re/v at σ=3.5. At n=9,333: 0 clean false positives, 100% recall. Corrupted Re is 1.7–2.2× larger than expected from velocity.

Measurement noise61.0%

Local k-NN regression anomaly + multi-model ensemble. 39% missed are perturbations below local variance floor — physical detection limit.

What the AI actually sees

At n=9,333, the fingerprint sent to the AI is ~685 tokens. Here is a real example of the diagnosis Claude produces from the fingerprint alone, without seeing any rows:

AI diagnosis: “Aerodynamics dataset with high-confidence multi-corruption: joint Cd/Cl kurtosis~16 indicates solver divergence (5%); pressure skew −4.9 vs clean density/temperature indicates Pa→kPa unit error (4%); Ma/v Kendall tau=0.042 p=0.0 indicates velocity sensor drift; Re outliers 293 vs velocity 0 indicates cross-variable Reynolds contamination.”

The AI then specifies which checks to run and with which thresholds. It cannot modify the filter bank code — only parametrise it. This bounds the blast radius of any AI reasoning error.