Skip to content

Commit a9232e0

Browse files
committed
Fix naming: log_phi -> log_phi_pi_fibonacci
The function's full name preserves the architectural intent (Fibonacci- step search over a phi-attractor index — phi, pi, AND fibonacci as the substrate). Collapsing it to "log_phi" loses two thirds of the name even though the closed-form formula reduces. Touches both the experiment 7 output (column header + interpretive prose) and the README headline table. Engine audit still byte- identical (2650 bytes).
1 parent bb775f8 commit a9232e0

2 files changed

Lines changed: 9 additions & 7 deletions

File tree

experiments/hybrid_llm/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ OMC_VM=1 ./target/release/omnimcode-standalone experiments/hybrid_llm/experiment
9191
| 4B | Same gates, **magnitude-matched** structural OOD (inverted attractor weights: 10%/30%/60% small/med/large vs in-dist's 60%/30%/10%). | **Harmonic edges past L2 in AUROC: 0.956 vs 0.946.** At low FPR L2 still wins (TPR@FPR=1%: L2 0.60 vs harmonic 0.48), but on overall ranking the structural rarity signal beats the L2 metric once magnitude is no longer a giveaway. |
9292
| 5 | HBit cross-cutting tension (no reference) + combined gate (sum of z-normalised HBit, marginal rarity, L2) on both scenarios. | **Scenario A: HBit tension AUROC = 1.0** (perfect — mean tension 0.0 in-dist vs 20.1 OOD). Combined: 0.999. **Scenario B: HBit AUROC = 0.5** (random — both sides on-manifold, tension = 0 everywhere). Combined: 0.967, beating every single gate. Each gate owns a different OOD axis: HBit→off-manifold, marginal→distribution-shift, L2→magnitude. |
9393
| 6 | Phi-Pi-Fib compression gate: model as `(library + chain of keys)` instead of dense weights. 12-primitive library keyed by Fibonacci attractors, gate = nearest-key lookup, chains = "parameters". | Composition: trace `[3, 8, 13, 5, 21]` on state 7 → 9. Compression: 29 ints (library+chain) vs ~1001 ints dense table over [0,1000] = ~34× smaller (extrapolates to 9 orders of magnitude at LLM scale). **Death tolerance: all 12 library deletions complete without crashing — biggest deltas: kill key=13 → +12, kill key=5 → +5, kill key=21 → +3. 8 of 12 deletions invisible to output (unused capabilities or path coincidence).** Interchangeability: 6 different chains over the same library yield 6 different outputs (9, 22, 9, 5, 5, 52). |
94-
| 7 | Wire `phi_pi_fib::fibonacci_search` in as four OMC builtins (`phi_pi_fib_search`, `phi_pi_fib_nearest`, `phi_pi_fib_stats`, `phi_pi_fib_reset`). Rerun exp 6's gate using the real Fibonacci-step search; measure comparison counts vs library size. | **Sublinear scaling confirmed.** N=8 → 3.8 compares/search, N=1024 → 12.6. Going 128× wider in library size grows the per-lookup work only ~3.3×, vs ~64× for a linear scan. Empirically tracks `~log₂(N)`, slightly better than `log_φ(N) ≈ 1.44·log₂(N)`. Sanity check passes (same final state as exp 6). Death tolerance preserved across all 12 library deletions. 148/148 existing tests still pass. |
94+
| 7 | Wire `phi_pi_fib::fibonacci_search` in as four OMC builtins (`phi_pi_fib_search`, `phi_pi_fib_nearest`, `phi_pi_fib_stats`, `phi_pi_fib_reset`). Rerun exp 6's gate using the real Fibonacci-step search; measure comparison counts vs library size. | **Sublinear scaling confirmed.** N=8 → 3.8 compares/search, N=1024 → 12.6. Going 128× wider in library size grows the per-lookup work only ~3.3×, vs ~64× for a linear scan. Empirically tracks `~log₂(N)`, slightly better than `log_φ_π_fibonacci(N) ≈ 1.44·log₂(N)`. Sanity check passes (same final state as exp 6). Death tolerance preserved across all 12 library deletions. 148/148 existing tests still pass. |
9595

9696
### Cumulative read across experiments 0–5
9797

experiments/hybrid_llm/experiment_7_phi_fib_gate.omc

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -235,8 +235,8 @@ print("== (ii) Sublinear scaling of phi_pi_fib_nearest ==");
235235
print(concat_many("(random queries against sorted [1,3,5,...,2N-1]; ",
236236
"200 queries per N)"));
237237
print("");
238-
print(" N avg_compares log_phi(N)");
239-
print(" ----- ------------ ----------");
238+
print(" N avg_compares log_phi_pi_fib(N)");
239+
print(" ----- ------------ -----------------");
240240

241241
h sizes = [8, 16, 32, 64, 128, 256, 512, 1024];
242242
h ns = arr_len(sizes);
@@ -245,15 +245,17 @@ while si < ns {
245245
h N = arr_get(sizes, si);
246246
h arr_n = build_sorted_n(N);
247247
h avg = measure_avg_compares(arr_n, 200);
248-
# log_phi(N) = ln(N) / ln(phi)
248+
# log_phi_pi_fibonacci(N) is the substrate's natural lookup-depth
249+
# measure: the Fibonacci-step search across a phi-attractor index
250+
# has compare-count proportional to ln(N) / ln(phi).
249251
h lphi = log(to_float(N)) / log(1.6180339887498948);
250252
print(concat_many(" ", N, " ", avg, " ", lphi));
251253
si = si + 1;
252254
}
253255
print("");
254-
print("If avg_compares grows like log_phi(N) (about 1.44 * log2(N)), the");
255-
print("search is doing sublinear work — the gate's cost stays bounded as");
256-
print("the library grows. A linear scan would show avg_compares ~ N/2.");
256+
print("If avg_compares grows like log_phi_pi_fibonacci(N) (~ 1.44 * log2(N)),");
257+
print("the search is doing sublinear work — the gate's cost stays bounded");
258+
print("as the library grows. A linear scan would show avg_compares ~ N/2.");
257259
print("");
258260

259261
# ===========================================================================

0 commit comments

Comments
 (0)