Skip to content

feat: H_φγ invariant — energy ratio convergence analysis at γ≈1#35

Closed
Copilot wants to merge 2 commits intomainfrom
copilot/featurephi-gamma-invariant
Closed

feat: H_φγ invariant — energy ratio convergence analysis at γ≈1#35
Copilot wants to merge 2 commits intomainfrom
copilot/featurephi-gamma-invariant

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 7, 2026

Tests whether attention_ratio(t) = energy_core(t) / energy_periphery(t) converges to φ≈1.618 or φ⁻¹≈0.618 when γ(t)→1.0 across neosynaptex substrates, using three independent ratio definitions and three null models.

Core analysis (analysis/phi_gamma_invariant.py)

  • R1 — topology-energy: core/periphery partition by weighted-degree centrality (top 38.2%)
  • R2 — spectral-core: dominant PSD modes covering top 38.2% spectral energy
  • R3 — predictive-allocation: features with top 38.2% AR(1) prediction weight
  • Gamma windows via Welch PSD + Theil-Sen slope in log-log space
  • Bootstrap CI on median ratio, permutation p-value against null distribution
  • Verdict logic: support | reject | insufficient with explicit gates (n≥30, CI width, p<0.05)

Null models (analysis/phi_gamma_nulls.py)

  • Temporal shuffle — destroys temporal order, preserves amplitudes
  • Topology shuffle — random core/periphery reassignment, preserves group sizes
  • Phase randomization — preserves power spectrum, destroys phase correlations

Report (analysis/phi_gamma_report.py)

  • JSON schema with per-substrate entries (all 3 ratio methods) + cross-substrate aggregation
  • Output: evidence/phi_gamma/phi_gamma_report.json

CLI

python -m analysis.phi_gamma_invariant \
  --config experiments/phi_gamma_config.yaml \
  --out evidence/phi_gamma/phi_gamma_report.json

Tests — 24 cases covering:

  • φ constant precision, φ·φ⁻¹=1 identity
  • R(t) finiteness, delta guard (periphery energy = 0)
  • Unity window selection with IEEE 754 boundary behavior
  • All three verdict states constructed explicitly
  • Null model invariants (size preservation, power spectrum preservation)
  • Bootstrap CI ordering and coverage
  • Full pipeline end-to-end

Copilot AI and others added 2 commits April 7, 2026 18:06
…LI, report

Implements the full phi-gamma invariant analysis pipeline:
- analysis/phi_gamma_invariant.py: Core functions (R1/R2/R3 ratios, gamma
  windows, bootstrap CI, verdict logic, full pipeline, CLI)
- analysis/phi_gamma_nulls.py: 3 null models (temporal shuffle, topology
  shuffle, phase randomization)
- analysis/phi_gamma_report.py: JSON report generation matching schema
- tests/test_phi_gamma_invariant.py: 24 tests covering all acceptance criteria
- experiments/phi_gamma_config.yaml: Fixed definitions
- docs/H_PHI_GAMMA_PROTOCOL.md: Protocol documentation
- evidence/phi_gamma/: Output directory with .gitkeep

Agent-Logs-Url: https://github.com/neuron7xLab/neosynaptex/sessions/b9d2d44e-dbfd-4bb2-96fa-71bf61db4828

Co-authored-by: neuron7xLab <226363063+neuron7xLab@users.noreply.github.com>
…nts, extract magic number

Agent-Logs-Url: https://github.com/neuron7xLab/neosynaptex/sessions/b9d2d44e-dbfd-4bb2-96fa-71bf61db4828

Co-authored-by: neuron7xLab <226363063+neuron7xLab@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants