Hippius
maincontainerPublic

cascade-plan/cascade-heat4

sha256:68d719d8dea2ea322118512b33204013cba71225afd85c113adbc3370bd31f96·Indexed Jul 27, 2026

Layers

4

Total size

53.1 KB

Files

4

Quantization

—

README.md

5.0 KB

cascade-heat4-heat3-stationary-ar-calibration

Heat4 is Heat3 plus two related stationary-variance corrections. Every Heat3 curriculum setting and final family weight is preserved, including its gradual curriculum; there is no schedule change. The behavioral changes calibrate the trend_seasonal_ar AR(1) and standalone AR(2) innovations so that configured sigma is the stationary residual standard deviation. All other families and configuration are untouched.

AR(1) correction

For

x_t = phi*x_{t-1} + eps_t,

the stationary variance is

Var(x) = sigma_eps^2 / (1 - phi^2).

Therefore, to target stationary standard deviation sigma_target, set

sigma_eps = sigma_target*sqrt(1 - phi^2).

Heat3 samples phi up to .85. Its prior implementation therefore had maximum stationary-SD inflation 1/sqrt(1 - .85^2) = 1.898 and average inflation of approximately 1.20. The correction removes that scale inflation while preserving the AR(1) autocorrelation function rho(k) = phi^k. This is the standard stationary-variance result described in the Berkeley AR notes.

Heat3 assigns trend_seasonal_ar 19% at curriculum start and 10% at final weights, so this correction directly targets a family that Heat3 emphasizes early.

AR(2) correction

For

x_t = a1*x_{t-1} + a2*x_{t-2} + eps_t,

Heat3 parameterizes stable coefficients with partial autocorrelations p1 and p2:

a1 = p1*(1-p2) and a2 = p2.

The Yule-Walker equations then simplify to

Var(x) = sigma_eps^2 / ((1-p1^2)*(1-p2^2)).

Heat4 therefore uses

sigma_eps = sigma_target*sqrt((1-p1^2)*(1-p2^2)).

This preserves the AR(2) coefficients and normalized ACF while removing the unintended coupling between persistence and scale. Under the configured p1 ~ U(0.3, 0.98) and p2 ~ U(-0.6, 0.6), the old stationary-SD inflation averaged about 1.68, had median 1.41, and reached 6.281; about 20.2% of rows exceeded 2x. A fixed-seed simulation measured 1.670 before calibration and 0.998 after it.

The AR(2) stationary variance follows this Yule-Walker derivation, with academic support for the innovation-variance recursion in the Purdue Durbin-Levinson notes. AR(2) receives 20% weight at curriculum start and 10.5% at final weights, so this correction applies directly to another family Heat3 emphasizes early.

Heat3 diagnosis and preserved strengths

The Heat3 all-snapshot evaluation covers 10 dates and 2663 windows. Its overall score is 0.372316, versus Heat8's 0.345791. Heat3 MASE is 1.66054 versus 1.40925 (17.8% worse), while MWSQL is 0.083478 versus 0.084847 (Heat3 is 1.6% better). Weak Heat3 slices include daily MASE 2.5445, sales MASE 3.3301, and nature MASE 1.2907. On 07-25, Heat3 MASE is 1.16785 versus Heat8's .99707, while Heat3 MWSQL remains slightly better.

Heat3 strengths are preserved because their families and configuration are untouched: energy score .38979 versus Heat8 .44756, transport .61159 versus .63199, 5-minute .07655 versus .08578, and hourly (H) .37151 versus .41448.

This fork deliberately does not apply the CR1 integrated-SV correction. Heat3's start integrated_sv_frac is 0, so CR1 would affect only the later curriculum. In addition, keyupdate.md documents a 5-minute regression from CR1, while 5-minute performance is a Heat3 strength. CR1 can be tested separately in a later fork.

These mathematical corrections do not guarantee an evaluation improvement. A paired Heat3/Heat4 heat A/B is required, with guardrails for MWSQL, energy, transport, 5-minute, and hourly (H) performance.

Validate

From /home/cascade, without starting training:

python3 - <<'PY'
import json
from pathlib import Path

root = Path("generators/07-26")
a = json.loads((root / "cascade-heat3/config.json").read_text())
b = json.loads((root / "cascade-heat4/config.json").read_text())
for key in ("name", "description"):
    a.pop(key)
    b.pop(key)
assert a == b
print("config metadata-only diff: OK")
PY

diff -u generators/07-26/cascade-heat3/generator.py \
  generators/07-26/cascade-heat4/generator.py
cmp generators/07-26/cascade-heat3/requirements.txt \
  generators/07-26/cascade-heat4/requirements.txt
python3 -m py_compile generators/07-26/cascade-heat4/generator.py
.venv/bin/python -m ruff check generators/07-26/cascade-heat4
docker run --rm \
  --entrypoint /root/cascade/.venv/bin/cascade \
  -v "$PWD/chain.toml:/workspace/chain.toml:ro" \
  -v "$PWD/generators/07-26/cascade-heat4:/workspace/candidate:ro" \
  ghcr.io/tensorlink-ai/cascade-worker@sha256:f73c77276b80942c61e7c5570bbbafbd69c8fd15e79cffbbcf75c8855715c9a0 \
  verify /workspace/candidate --chain-toml /workspace/chain.toml

The generator diff must contain only the AR(1) and AR(2) innovation scaling blocks and their comments. Requirements must remain byte-identical. Validation must not start training.

Files

4 items
  • generator.py

    9023ade44bad

    45.4 KB

  • README.md

    cefe86e33cdd

    5.0 KB

  • config.json

    6e123df97626

    2.5 KB

  • requirements.txt

    bce394a998f0

    186 B