Modeling one's own residuals helps only when the residuals contain real predictive structure — a controlled demonstration
Claim-status banner
CLAIM STATUS PRELIMINARY SUPPORT
EVIDENCE TYPE COMPUTATIONAL SIMULATION
PHYSICAL VALIDATION NONE
INDEPENDENT REPLICATION NONE
CONFIRMATORY VS EXPLORATORY CONFIRMATORY — thresholds set BEFORE
the run.
SUPPORTED
- When the signal is AR(2) with (phi_1, phi_2) = (0.6, 0.3),
adding a second predictor that models residual autocorrelation
reduces held-out MSE by a mean 6.29% (n = 25 seeds), which
exceeds the preregistered 5% threshold.
- When the signal is white Gaussian noise, the same two-level
predictor reduces MSE by a mean 0.00% (within the preregistered
±2% band around zero).
- The between-condition Cohen's d is 4.16, easily above the
preregistered 1.0 threshold.
NOT ESTABLISHED
- Anything about biological predictive coding in cortex.
- Anything about the existence of a "self-model" in humans or
machines.
- That deeper hierarchies scale beyond two levels (not tested).
- That the same result holds under non-Gaussian residuals or
under nonlinear predictive baselines.
MOST LIKELY ALTERNATIVE
There is no adversarial alternative. The result is analytically
predictable: an AR(2) process has autocorrelation at lag > 1
that a lag-1 predictor cannot capture, so residuals from a
lag-1 predictor contain lag-1 autocorrelation that a second
predictor can exploit. For white noise, residuals are white by
construction, so a second predictor cannot help.
The study's value is that it validates the workspace's
predictive-coding pipeline — code, seeds, splits, evaluation —
as a reusable building block for subsequent studies where the
answer is not analytically predictable.
NEXT DISCRIMINATING TEST
Same protocol on data with LONG-RANGE structure that a
standard AR(1) residual predictor cannot capture (e.g., 1/f
noise, or a mixture of periodic components). Does the
two-level hierarchy still help, or does it require additional
levels? This will begin to characterize when hierarchical
predictive models are informative and when they are not.
Abstract
We test a narrow operationalization of the predictive-coding
hypothesis that modeling one's own residuals is useful when
predictions have systematic error and not useful when they don't.
**Setup.** For each of 25 seeds and each of two conditions:
- AR(2) condition: x(t) = 0.6 x(t-1) + 0.3 x(t-2) + N(0, 1)
- White-noise condition: x(t) = N(0, 1)
For each series of length T = 2000, we fit two predictors on the
first 50% of the data:
1. **Level-1-only predictor.** OLS regression predicting x(t) from
x(t-1). Its held-out MSE on the last 50% is the baseline.
2. **Two-level predictor.** Level 1 same as above. Level 2 fits a
second OLS regression predicting the level-1 residual at time
t from the level-1 residual at time t-1. The combined
prediction is (level-1 prediction) + (level-2 residual
prediction). Held-out MSE on the last 50%.
Relative MSE reduction = (MSE_level1 - MSE_level2) / MSE_level1.
**Results.**
- AR(2) : mean gain = +6.29% (well above the +5% threshold)
- Noise : mean gain = -0.00% (well within the ±2% zero band)
- Between-condition Cohen's d = 4.16 (well above 1.0)
All three preregistered conditions hold. See figure
`01_predictive_coding_gain.png`.
Files
- `src/run_study.py` — everything
- `results/summary.json` — full numeric table + verdict
- `figures/01_predictive_coding_gain.png` — per-seed strip plot,
AR(2) vs white noise, with condition means and thresholds
