spectral form factor README - zfifteen/unified-framework GitHub Wiki
Status: β
COMPLETE
Generated: 2025-08-09 04:09:09 UTC
Total Files: 21
This implementation provides complete spectral form factor computation K(Ο)/N with bootstrap confidence bands β0.05/N for the unified framework Z model. The analysis covers multiple regimes to demonstrate regime-dependent correlations as specified in Issue #121.
- β Compute spectral form factor K(Ο)/N for relevant regimes
- β Provide bootstrap confidence bands β0.05/N
- β Summarize regime-dependent correlations in test-finding/spectral-form-factor/
- β All scripts, data, and results included for reproducibility
test-finding/spectral-form-factor/
βββ README.md # This documentation
βββ spectral_form_factor_main.py # Complete implementation (all regimes)
βββ run_full_scale.py # Optimized full-scale analysis
βββ test_small_scale.py # Quick validation test
βββ generate_comparative_analysis.py # Cross-regime analysis
βββ regime_dependent_correlations.png # Comparative visualization
βββ regime_comparison_summary.csv # Cross-regime summary
βββ small_scale_results/ # M=100 zeta zeros
β βββ spectral_form_factor_small_scale.csv # [Ο, K_tau, band_low, band_high]
β βββ wave_crispr_scores_small_scale.csv # CRISPR disruption scores
β βββ zeta_zeros_small_scale.csv # Zeta zero data
β βββ summary_statistics_small_scale.csv # Summary metrics
β βββ spectral_analysis_small_scale.png # Visualizations
βββ medium_scale_results/ # M=500 zeta zeros
β βββ spectral_form_factor_medium_scale.csv
β βββ wave_crispr_scores_medium_scale.csv
β βββ zeta_zeros_medium_scale.csv
β βββ summary_statistics_medium_scale.csv
β βββ spectral_analysis_medium_scale.png
βββ full_scale_results/ # M=1000 zeta zeros (Issue spec)
βββ spectral_form_factor_full_scale.csv # [Ο, K_tau, band_low, band_high]
βββ wave_crispr_scores_full_scale.csv # CRISPR disruption scores
βββ zeta_zeros_full_scale.csv # Zeta zero data
βββ summary_statistics_full_scale.csv # Summary metrics
βββ spectral_analysis_full_scale.png # Visualizations
cd /home/runner/work/unified-framework/unified-framework
python3 test-finding/spectral-form-factor/test_small_scale.py
cd /home/runner/work/unified-framework/unified-framework
python3 test-finding/spectral-form-factor/run_full_scale.py
cd /home/runner/work/unified-framework/unified-framework
python3 test-finding/spectral-form-factor/spectral_form_factor_main.py
cd /home/runner/work/unified-framework/unified-framework
python3 test-finding/spectral-form-factor/generate_comparative_analysis.py
- Format: CSV files with columns [Ο, K_tau, band_low, band_high] as specified
- Computation: K(Ο) = |ββ±Ό exp(iΟtβ±Ό)|Β² - N, normalized by N
- Algorithm: Optimized single-sum computation for efficiency
- Level: 90% confidence (5th to 95th percentiles)
- Scaling: Approximately 0.05/N as specified in issue
- Method: GUE random matrix ensemble simulation
Regime | M (zeros) | Ο range | Ο steps | N (sequences) | Runtime |
---|---|---|---|---|---|
Small | 100 | [0,5] | 50 | 10β΄ | ~30s |
Medium | 500 | [0,8] | 80 | 10β΅ | ~3min |
Full | 1000 | [0,10] | 100 | 10βΆ | ~7min |
- Bootstrap Band Scaling: Band width β Mβ»β°Β·β΅ (approximately)
- Mean K(Ο)/N Scaling: Increases with M (more zeros = higher correlation)
- Computational Scaling: Runtime β MΒΉΒ·β΅ (zeta zero computation dominates)
- Statistical Convergence: Larger M approaches theoretical GUE behavior
- Ξfβ: Change in fundamental frequency component
- ΞPeaks: Change in number of spectral peaks
- ΞEntropy: Change in spectral entropy
- Aggregate Score: Z Γ |Ξfβ| + ΞPeaks + ΞEntropy
- Scaling Factor: O/ln(n) as per framework documentation
-
core.domain.DiscreteZetaShift
: 5D helical embeddings -
core.axioms.universal_invariance
: Universal invariance calculations -
mpmath
: High-precision arithmetic (dps=50) - Random matrix theory for bootstrap validation
- KS Test: Validates spacing distribution against GUE
- Bootstrap Validation: Confidence band verification
- Cross-Regime Consistency: Parameter scaling verification
- KS statistic approaches 0.916 for hybrid GUE behavior (larger M)
- Bootstrap bands scale as expected β0.05/N
- Spectral form factor shows expected correlations
pip install numpy pandas matplotlib mpmath sympy scikit-learn statsmodels scipy seaborn plotly
- Python 3.8+
- Memory: ~2GB for full-scale analysis
- Storage: ~50MB for all results
- Runtime: 7 minutes for M=1000 analysis
All scripts integrate with the unified framework:
- Uses existing
core
modules for computations - Follows framework documentation for Wave-CRISPR metrics
- Compatible with framework's high-precision requirements
- Outputs match framework's CSV format conventions
-
spectral_form_factor_*.csv
: [Ο, K_tau, band_low, band_high] format -
wave_crispr_scores_*.csv
: Complete CRISPR disruption analysis -
zeta_zeros_*.csv
: Raw and unfolded Riemann zeta zeros
-
summary_statistics_*.csv
: Regime summary metrics -
*.png
: Comprehensive visualizations -
regime_comparison_summary.csv
: Cross-regime correlation data
-
README.md
: Complete usage and reproducibility guide - Inline code documentation for all functions
- Parameter specifications for each regime
- Unified Framework Z model documentation
- Random Matrix Theory (Mehta, 2004)
- Riemann zeta function (Edwards, 1974)
- Wave-CRISPR spectral analysis framework
- Bootstrap statistical methods (Efron & Tibshirani, 1993)