Skip to content

Commit 3373d3e

Browse files
committed
perturbation-sim: HHTL-OGAR orthogonality correction + CLAM/CHAODA framing
1. columns.rs correction (operator): orthogonality to topology is STRUCTURAL, not earned. In the HHTL-OGAR GUID model topology lives in the KEY (HEEL/HIP/TWIG cascade tiers); magnitude axes are helix value members hung off it, so any helix value member is orthogonal to topology by the key/value split. The resilience study's Spearman(λ₂,buffer)≈0 CONFIRMS what the GUID addressing already enforces; it does not establish a new axis. inertia_buffer is reframed as one more helix-residue value slot (Encoding::HelixResidue added), not a novel orthogonal column. Field/doc semantics of `additive` updated accordingly. 2. CLAM_CHAODA_FRAMING.md: the resilience study framed as CLAM (cluster tree) + CHAODA (anomaly ensemble) on the electrical-distance manifold — grounded against real ndarray::hpc::clam APIs: Cluster{radius,cardinality,lfd} (clam.rs:106), Lfd (clam.rs:81), ClamTree::anomaly_scores (clam.rs:1517). The compartment hierarchy = CLAM tree; the fail-first exposure ranking = CHAODA anomaly score; the three orthogonal axes = CHAODA's diverse-detector ensemble, and the study's low Cronbach α IS CHAODA's non-redundancy design goal. Honest scope: structural correspondence onto real APIs [G]; perturbation-sim NOT wired to clam [H]; the falsifiable bridge (build ClamTree over the factor rows, correlate anomaly_scores vs exposure) named as the [H]→[G] probe. 71 lib tests; clippy -D warnings clean; fmt clean.
1 parent bb76568 commit 3373d3e

2 files changed

Lines changed: 104 additions & 10 deletions

File tree

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# Framing the resilience study as CLAM (hierarchy) + CHAODA (anomaly ensemble)
2+
3+
*The resilience study is not a bespoke method — it is a CLAM cluster tree with a
4+
CHAODA-style anomaly ensemble, on the electrical-distance manifold. Both already
5+
exist in `ndarray::hpc::clam` (cited below); this doc maps the correspondence and
6+
states honestly what is grounded vs what is a conceptual mapping not yet wired.*
7+
8+
> Operator prompt (2026-06-16): "you could even try to frame it — CLAM
9+
> (resilience) / CHAODA". Companion to `PAPER.md`, `COUNTRY_STUDY.md`,
10+
> `src/columns.rs`.
11+
12+
## The correspondence
13+
14+
| resilience-study object | CLAM / CHAODA construct | ndarray reference |
15+
|---|---|---|
16+
| recursive Cheeger/HHTL bisection into basins | **CLAM cluster tree** (`ClamTree::build`) | `hpc/clam.rs` `ClamTree` |
17+
| a basin (compartment) | a **`Cluster`** | `hpc/clam.rs:106` `Cluster { radius, cardinality, lfd }` |
18+
| basin algebraic connectivity λ₂ / mean R | cluster **radius** / spread | `Cluster::radius` |
19+
| basin node count | cluster **cardinality** | `Cluster::cardinality` |
20+
| how fragmented/space-filling a basin is | **local fractal dimension** `Lfd` | `hpc/clam.rs:81` `Lfd::compute(count_r, count_half_r)` |
21+
| fail-first / exposure ranking | **CHAODA anomaly score** | `hpc/clam.rs:1517` `ClamTree::anomaly_scores() -> Vec<AnomalyScore>` |
22+
| "this compartment can't wait" flag | CHAODA **flag threshold** (≥ 0.75) | `hpc/clam.rs` anomaly-flag test |
23+
24+
So the study's machinery is CLAM's machinery on a different metric: instead of a
25+
Hamming/embedding distance, the manifold is the **electrical distance** (effective
26+
resistance `R_ij = (e_i−e_j)ᵀ L⁺ (e_i−e_j)`, the self-inverse `L⁺` reference). The
27+
HHTL tiers ARE the CLAM tree depth; the weakest compartment IS the cluster CHAODA
28+
would score as the outlier.
29+
30+
## Why the three axes ARE a CHAODA ensemble (the load-bearing match)
31+
32+
CHAODA's thesis: **no single graph-anomaly method wins; ensemble several *diverse*
33+
detectors** (relative cardinality, parent/child cardinality ratio, graph
34+
neighbourhood, stationary distribution, …) and the gain comes from their
35+
*non-redundancy*. The resilience study's three axes are exactly such an ensemble:
36+
37+
- **topology** (λ₂ / Kirchhoff) — the connectivity detector,
38+
- **buffer** (inertia storage) — the transient detector,
39+
- **policy** (feed-in / dispatch) — the operational detector,
40+
41+
ensembled into the **exposure** score. And the study's measured **low / negative
42+
Cronbach α** (the axes are distinct facets, `Spearman ≈ 0` between them) is not a
43+
defect — it is *precisely CHAODA's design goal*: low inter-detector correlation is
44+
what makes the ensemble add information rather than restate it. The discriminant
45+
finding and the CHAODA non-redundancy principle are the same statement.
46+
47+
This also re-frames the §4.11 confound cleanly: the modifier `Weyl × (1/Fiedler)`
48+
failed as an independent axis because `1/λ₂` is the dominant Kirchhoff term — i.e.
49+
it was a **redundant detector**, the CHAODA anti-pattern. The buffer axis is the
50+
*orthogonal* detector the ensemble actually needed.
51+
52+
## Honest scope
53+
54+
- **Grounded [G]:** `CLAM`, `Cluster{radius,cardinality,lfd}`, `Lfd`, and
55+
`ClamTree::anomaly_scores` all exist in `ndarray::hpc::clam` (cited). The
56+
structural correspondence is exact, not metaphor.
57+
- **Conceptual [H]:** `perturbation-sim` is zero-dep and is **NOT wired** to
58+
`ndarray::hpc::clam`. The mapping above is read off the APIs, not run. No code
59+
here calls `ClamTree` or `anomaly_scores`.
60+
- **The falsifiable probe** that would promote [H][G]: build a `ClamTree` over the
61+
contingency factor vectors (or the per-basin `(λ₂, Kf, buffer)` rows), run
62+
`anomaly_scores`, and correlate the CHAODA ranking against the study's exposure
63+
ranking (ICC/Spearman, Jirak rate). If they agree, the study *is* CHAODA on the
64+
electrical manifold; if not, the framing is rhyme and gets retracted. This is the
65+
gated bridge (crosses perturbation-sim's zero-dep boundary into `ndarray`,
66+
behind a feature flag) — analogous to the calibration harness, not yet built.
67+
68+
## Tie-in to the calibrated columns (`src/columns.rs`)
69+
70+
CLAM gives two more value members for free, hung off the same HHTL-OGAR key:
71+
`radius` (basin spread) and `lfd` (local fractal dimension). They are helix-residue
72+
value members like the rest — orthogonal to topology by the key/value split — and
73+
the CHAODA `anomaly_score` is the *read* over the column set, the same way
74+
`exposure` is. The substrate that carries the study is therefore literally a CLAM
75+
tree of HHTL-keyed helix value members with a CHAODA read.

crates/perturbation-sim/src/columns.rs

Lines changed: 29 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,31 @@
88
//! truth). It is the bridge artifact a contract-side change would consume; nothing
99
//! here serializes or touches the operator-locked `canonical_node` spine.
1010
//!
11+
//! **Orthogonality to topology is structural, not earned (operator, 2026-06-16).**
12+
//! In the HHTL-OGAR GUID model, **topology lives in the KEY** — the HEEL/HIP/TWIG
13+
//! cascade tiers of the `canonical_node` GUID — and the magnitude axes are **helix
14+
//! value members hung off that key**. So any helix-residue value member is
15+
//! orthogonal to topology *by the key/value split itself*; the resilience study's
16+
//! measured `Spearman(λ₂, buffer) ≈ 0` only **confirms** what the GUID addressing
17+
//! already enforces, it does not establish a new axis. Consequence: `inertia_buffer`
18+
//! is NOT a novel "orthogonal column" — it is just **another helix value slot on
19+
//! the HHTL key**, additive in the trivial sense (one more value member), with its
20+
//! topology-orthogonality free.
21+
//!
1122
//! Two findings shape it:
1223
//! 1. **The existing value tenants suffice.** All five contingency factors certify
1324
//! by value at **2-bit linear, stored normalized** (ICC ≥ 0.96) — a 2-bit
1425
//! turbovec/palette slot per factor preserves the study's per-axis values. The
1526
//! cross-axis structure (α / discriminant) wants ≥6-bit, so the *read budget*
1627
//! where orthogonality is judged is wider than the *store budget* per value.
17-
//! 2. **One genuinely additive column.** The resilience study measured the
18-
//! inertia/buffer axis ORTHOGONAL to topology (`Spearman(λ₂, buffer) ≈ 0`), so
19-
//! no existing connectivity member can carry it — it requires its own member
20-
//! ([`INERTIA`], flagged [`additive`](SoaMemberSpec::additive)).
28+
//! 2. **The "new" member is just a helix value slot.** `inertia_buffer`
29+
//! ([`INERTIA`]) is added as one more helix-residue value member on the HHTL-OGAR
30+
//! key; its orthogonality to the topology (which the key carries) is structural,
31+
//! confirmed by the study, not introduced by it.
2132
22-
/// How a member quantizes its normalized value.
33+
/// How a member quantizes its normalized value. Every variant is a **value tenant
34+
/// hung off the HHTL-OGAR GUID key** — topology is the key, so all of these are
35+
/// orthogonal to topology by construction.
2336
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
2437
pub enum Encoding {
2538
/// Min-max linear bins (palette / Signed360 rim) — sufficient when the
@@ -28,6 +41,9 @@ pub enum Encoding {
2841
/// Equal-population / codebook bins (turbovec, CAM-PQ) — resolution follows the
2942
/// data; preferred when the raw distribution is heavy-tailed.
3043
DataAdaptive,
44+
/// Helix `Signed360` residue value member — the canonical magnitude tenant on
45+
/// the HHTL-OGAR key.
46+
HelixResidue,
3147
}
3248

3349
/// One calibrated SoA member: the width + encoding the study certifies for an axis.
@@ -44,8 +60,9 @@ pub struct SoaMemberSpec {
4460
/// Members store normalized `[0,1]` values, not raw physical units (also lifts
4561
/// tiny-magnitude axes out of the ICC variance-underflow guard).
4662
pub normalized: bool,
47-
/// `true` if this member does NOT exist in the current substrate and must be
48-
/// added (it is statistically orthogonal to every existing column).
63+
/// `true` if this is a NEW value slot to add to the substrate. Orthogonality to
64+
/// topology is NOT a property of the member — it is structural, given by the
65+
/// HHTL-OGAR key/value split (topology in the key, this in the value).
4966
pub additive: bool,
5067
}
5168

@@ -59,13 +76,15 @@ pub const CONTINGENCY_FACTORS: [SoaMemberSpec; 5] = [
5976
spec("raumgewinn", false),
6077
];
6178

62-
/// The one genuinely additive member: the inertia/buffer axis (resilience study),
63-
/// orthogonal to topology — no existing connectivity column carries it.
79+
/// The one additive member: the inertia/buffer axis (resilience study), added as a
80+
/// helix-residue value slot on the HHTL-OGAR key. Its orthogonality to topology is
81+
/// STRUCTURAL (topology is the key; this is a value) — the study's `Spearman ≈ 0`
82+
/// confirms it. `additive` here means "one more value slot", not "a new axis type".
6483
pub const INERTIA: SoaMemberSpec = SoaMemberSpec {
6584
name: "inertia_buffer",
6685
store_bits: 2,
6786
read_bits: 6,
68-
encoding: Encoding::Linear,
87+
encoding: Encoding::HelixResidue,
6988
normalized: true,
7089
additive: true,
7190
};

0 commit comments

Comments
 (0)