Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .claude/board/entries/2026-10-22-pal256-salience-mp3-probe.md
Original file line number Diff line number Diff line change
@@ -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`.
3 changes: 2 additions & 1 deletion .claude/board/entries/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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) |
Expand Down
39 changes: 39 additions & 0 deletions crates/bgz-tensor/tests/palette256_salience_probe.rs
Original file line number Diff line number Diff line change
@@ -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<usize> {
let mut rank: Vec<usize> = (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::<f64>();
let saved = keep.iter().map(|&i| input[i] * input[i]).sum::<f64>();
(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.
}
Loading