diff --git a/.claude/board/entries/2026-10-22-pal256-salience-mp3-probe.md b/.claude/board/entries/2026-10-22-pal256-salience-mp3-probe.md new file mode 100644 index 000000000..4d0850d7b --- /dev/null +++ b/.claude/board/entries/2026-10-22-pal256-salience-mp3-probe.md @@ -0,0 +1,9 @@ +# Palette256 loud-signal / MP3 analogy: measurable salience, not semantic proof + +Status: **test-only / no bake change**. Immutable codebook remains reference; salience is a cold candidate selection policy, not a learned mutation of indices or LUT values. + +Experiment: top-k magnitude keeps almost all squared energy on a heavy-head fixture. **Negative control:** low-energy rare coordinate is the *only* class discriminator. Thus preserved spectral energy != preserved reasoning truth. + +Acceptance for any future corpus bake: declare signal family, norm, salience threshold, protected rare-event strata, held-out top-k recall, calibrated error/abstention and versioned codebook digest. Do not claim psychoacoustic masking is directly transferable to cognition. + +Commands: `cargo test --manifest-path crates/bgz-tensor/Cargo.toml --test palette256_salience_probe`. diff --git a/.claude/board/entries/README.md b/.claude/board/entries/README.md index 0a47f23e5..15b0da6fe 100644 --- a/.claude/board/entries/README.md +++ b/.claude/board/entries/README.md @@ -25,10 +25,11 @@ index row, (3) no duplicate entry id. Checks 1 and 2 are deliberately opposite directions; the stranding this convention prevents shows up in exactly one of them, never both. -433 entries, 2026-08-06 .. 2026-10-22. +434 entries, 2026-08-06 .. 2026-10-22. | date | entry id | finding | file | |---|---|---|---| +| 2026-10-22 | `pal256-salience-mp3-probe` | | [2026-10-22-pal256-salience-mp3-probe.md](2026-10-22-pal256-salience-mp3-probe.md) | | 2026-10-22 | `pal256-immutable-needle-distribution-probe` | | [2026-10-22-pal256-immutable-needle-distribution-probe.md](2026-10-22-pal256-immutable-needle-distribution-probe.md) | | 2026-10-22 | `pal256-3sigma-statistical-gate` | | [2026-10-22-pal256-3sigma-statistical-gate.md](2026-10-22-pal256-3sigma-statistical-gate.md) | | 2026-10-22 | `math-compiler-stage-b-e1` | | [2026-10-22-math-compiler-stage-b-e1.md](2026-10-22-math-compiler-stage-b-e1.md) | diff --git a/crates/bgz-tensor/tests/palette256_salience_probe.rs b/crates/bgz-tensor/tests/palette256_salience_probe.rs new file mode 100644 index 000000000..f19a18257 --- /dev/null +++ b/crates/bgz-tensor/tests/palette256_salience_probe.rs @@ -0,0 +1,39 @@ +//! Lab-only salience/energy probe: MP3 is an analogy, not a perceptual codec. +//! Never change the immutable trained codebook during inference. +fn top_energy(input: &[f64], k: usize) -> Vec { + let mut rank: Vec = (0..input.len()).collect(); + rank.sort_by(|&a, &b| input[b].abs().total_cmp(&input[a].abs()).then(a.cmp(&b))); + rank.truncate(k.min(rank.len())); + rank +} +fn energy(input: &[f64], keep: &[usize]) -> (f64, f64) { + let total = input.iter().map(|x| x * x).sum::(); + let saved = keep.iter().map(|&i| input[i] * input[i]).sum::(); + (saved, total) +} +#[test] +fn dominant_signal_energy_is_retained_without_retraining_the_reference() { + let features = [8.0, -6.0, 0.10, 0.08, -0.04, 0.02, 0.01, 0.0]; + let before = features; + let selected = top_energy(&features, 2); + assert_eq!(selected, vec![0, 1]); + let (saved, total) = energy(&features, &selected); + assert!(saved / total > 0.999); + assert_eq!( + features, before, + "salience is a selection, not codebook motion" + ); +} +#[test] +fn rare_low_amplitude_causal_feature_is_a_counterexample_to_energy_only() { + // This is a deliberate negative control: a small coordinate may determine + // the label even when discarded energy is negligible. + let class_a = [12.0, 9.0, 0.01]; + let class_b = [12.0, 9.0, -0.01]; + let keep_a = top_energy(&class_a, 2); + let keep_b = top_energy(&class_b, 2); + assert_eq!(keep_a, keep_b); + assert!(keep_a.iter().all(|&idx| class_a[idx] == class_b[idx])); + assert_ne!(class_a[2].is_sign_positive(), class_b[2].is_sign_positive()); + // No global claim that loud-only preservation implies semantic correctness. +}