Cross-Linguistic Evidence from Word Association Data
This repository contains research on network geometry using Ollivier-Ricci curvature analysis across multiple implementations:
- Julia: Reference implementation (validated)
- Rust: Performance-focused implementation
- Sounio: Type-safe implementation with epistemic computing
Key result: Curvature sign change in random regular graphs at density η = ⟨k⟩²/N, with finite-size scaling η_c(N) = 3.75 − 14.62/√N (R² = 0.995). Semantic network geometry follows from two parameters: η (density) and C (clustering).
-
Density parameter: η = ⟨k⟩²/N determines the sign of mean ORC in random k-regular graphs
- η < η_c(N) → Negative curvature (hyperbolic regime)
- η > η_c(N) → Positive curvature (spherical regime)
- η_c(N) = 3.75 − 14.62/√N (fitted on N ∈ {50, 100, 200, 500, 1000}, R² = 0.995)
- η_c(100) ≈ 2.29, η_c(200) ≈ 2.72, η_c(500) ≈ 3.10, η_c^∞ ≈ 3.75
-
Validated on 11 real semantic networks (SWOW ES/EN/ZH/NL, ConceptNet EN/PT, WordNet, BabelNet, depression)
- Dutch SWOW (η = 7.56 >> η_c) is spherical (κ̄ = +0.10): confirms prediction
- Clustering coefficient C modulates curvature within sub-critical regime
- Two-parameter model (η + C) classifies all 11 networks (post-hoc; validation pending)
- 11 semantic networks analyzed across 7 languages (SWOW, ConceptNet, WordNet, BabelNet, depression)
- Three geometric regimes: Hyperbolic (C > 0.10, η < η_c), Euclidean (C < 0.02), Spherical (η > η_c)
- Metric dependence: All networks flip to spherical under sphere-embedded ORC (Cayley-Dickson tower)
- Cross-linguistic consistency across language families
hyperbolic-semantic-networks/
├── README.md # This file
├── CHANGELOG.md # Version history
│
├── julia/ # Julia implementation
│ ├── src/ # Core modules
│ ├── experiments/ # Phase transition experiments
│ └── phase_transition_pure_julia.jl # Validated experiment
│
├── rust/ # Rust implementation
│ ├── curvature/ # Curvature computation
│ └── null_models/ # Random graph generation
│
├── experiments/ # Sounio-powered experiments
│ ├── 01_epistemic_uncertainty/ # Phase transition sweep
│ ├── 02_null_model/ # Configuration null model ensemble
│ ├── 03_forman_ricci/ # Forman vs Ollivier comparison
│ ├── 04_uncertainty_scaling/ # Uncertainty at phase transition
│ ├── 05_hypercomplex/ # Hypercomplex curvature embedding
│ ├── 06_spectral_geometry/ # Spectral gap phase transition
│ └── 07_scale_n500/ # N=100 all methods + N=200 spectral
│
├── results/ # Computed results
│ ├── experiments/ # Phase transition data
│ ├── curvature/ # Curvature metrics
│ └── swow_clustering_coefficients.json
│
├── archive/ # Historical docs and session artifacts
│
├── manuscript/ # Main manuscript
│ ├── main.md # Complete manuscript
│ └── figures/ # Publication figures
│
├── code/ # Python analysis scripts
│ ├── analysis/ # Analysis pipeline
│ └── figures/ # Figure generation
│
└── data/ # Data
├── raw/ # Original SWOW data
└── processed/ # Processed networks
Julia:
julia --project -e 'using Pkg; Pkg.instantiate()'Rust:
cd rust && cargo build --releaseSounio (for new experiments):
cd path/to/sounio/compiler
cargo build --release
export PATH=$PATH:$(pwd)/target/release# Julia (validated reference)
julia phase_transition_pure_julia.jl
# Results in: results/experiments/phase_transition_pure_julia.json# Complete analysis pipeline
cd code/analysis
python run_analysis_pipeline.py
# Generate figures
cd ../figures
python generate_all_figures.pyThe repository now includes a dedicated CPC 2026 paper pipeline for:
Entropic Curvature in Hyperbolic Semantic Manifolds Indexes Psychopathology-Like Transitions
Artifacts and code live in:
code/cpc2026/results/cpc2026/figures/cpc2026/manuscript/cpc2026_paper.md
Run the full extension from the repository root with:
make cpc2026This CPC pipeline reuses the validated SWOW-EN exact-LP curvature artifact, adds node-level entropic curvature and valence annotations, simulates regime-specific semantic trajectories, computes trajectory statistics, and generates a CPC-specific figure set.
The CPC lane now also includes an octonionic state-space extension that bridges this repository to the canonical Sounio checkout at:
github.com/sounio-lang/sounio
What this extension adds:
code/cpc2026/ossm_bridge/- builds 8D SWOW node vectors and exports compact Sounio input bundles
code/cpc2026/ossm_reference_simulator.py- generates the full paper-scale O-SSM artifacts in Python
code/cpc2026/ossm_analysis.py- computes O-SSM-specific metrics and the Markov-vs-O-SSM comparison table
code/cpc2026/generate_ossm_figures.py- generates the O-SSM figure set
results/cpc2026/sounio_parity/- stores the bounded parity artifacts emitted by the canonical Sounio runner
Run the full cross-repo O-SSM lane with:
make cpc2026-ossmOperational note:
- The canonical Sounio repo provides the executable parity lane under
examples/cognitive_ossm/. - The full 10,000 x 500 O-SSM result artifacts are currently generated by the Python reference mirror in this repo, because that is the reproducible paper-scale path available today.
- The versioned snapshot stores
results/cpc2026/ossm_trajectories_{regime}.csv.gzanddata/cpc2026/trajectories_{regime}_input.npz; the raw.csvand.npycounterparts remain local-only because they exceed GitHub's file-size limits. results/cpc2026/ossm_release_manifest.jsonrecords the frozen archive inventory and SHA-256 checksums for the versioned O-SSM snapshot.
All experiments are self-contained .sio programs demonstrating the phase transition
with Sounio's effect system (with IO, Mut, Div, Panic) and type-safe fixed-size arrays.
Ollivier-Ricci curvature across k-regular graphs (N=20, k=2..18). Demonstrates the universal transition from hyperbolic to spherical geometry.
bash experiments/01_epistemic_uncertainty/run.sh
# → results/sounio/phase_transition_sounio.csv5 independent realizations per k-value from the configuration model C(N,k). Tests whether curvature is a structural invariant of the degree sequence.
bash experiments/02_null_model/run.sh
# → results/sounio/configuration_null.csvCompares two discrete Ricci curvature notions on the same graphs:
- Forman: combinatorial O(deg²) per edge, no optimal transport
- Ollivier: optimal transport O(n² × sinkhorn_iter) per edge
bash experiments/03_forman_ricci/run.sh
# → results/sounio/forman_comparison.csvMulti-seed ensemble analysis with Shannon entropy of geometry classification. Shows that epistemic uncertainty peaks at the phase transition (k²/N ≈ 2.5).
bash experiments/04_uncertainty_scaling/run.sh
# → results/sounio/uncertainty_scaling.csvEmbeds graph nodes into hypercomplex hyperspheres — S³ (quaternion), S⁷ (octonion), S¹⁵ (sedenion) — via landmark BFS distances, then computes Ollivier-Ricci curvature using geodesic distances instead of integer hop-counts. Showcases Hamilton product (associative) and Cayley-Dickson product (non-associative).
- Phase A (N=20): Validates embeddings reproduce the known phase transition
- Phase B (N=50): Breaks the N=20 barrier using landmark-based embedding
bash experiments/05_hypercomplex/run.sh
# → results/sounio/hypercomplex_curvature.csvIndependent validation via eigenvalues of the adjacency matrix. Computes the second eigenvalue λ₂ using power iteration on the shifted matrix (A+kI) with deflation against the known trivial eigenvector. Derives spectral gap, algebraic connectivity, Cheeger constant lower bound, and Friedman ratio.
- Phase A (N=20): Spectral + Ollivier-Ricci curvature for direct comparison
- Phase B (N=50): Spectral only (cross-reference with experiment 05)
bash experiments/06_spectral_geometry/run.sh
# → results/sounio/spectral_phase_transition.csvScales beyond the N=50 barrier. N=500 BFS all-pairs ([i64; 250000]) proved
infeasible in the bytecode VM (~6 hours per k-value). Practical design:
- Phase A (N=100): curvature + Q4 embedding + spectral for k ≤ 18, spectral-only for k > 18
- k_crit = √(2.5 × 100) ≈ 15.8 — curvature spans the full transition
- Phase B (N=200): spectral + BFS metrics only — matches Julia reference
bash experiments/07_scale_n500/run.sh
# → results/sounio/scale_n500.csv| Network | N | ⟨k⟩ | ⟨k⟩²/N | κ_mean | Geometry |
|---|---|---|---|---|---|
| Sparse | 200 | 3 | 0.05 | -0.287 | Hyperbolic |
| Medium | 200 | 22 | 2.42 | -0.013 | Transition |
| Dense | 200 | 30 | 4.50 | +0.073 | Spherical |
Full data: results/experiments/phase_transition_pure_julia.json
| Language | N | ⟨k⟩ | ⟨k⟩²/N | κ | Prediction |
|---|---|---|---|---|---|
| Spanish | 9,246 | 3.0 | 0.001 | -0.155 | Hyperbolic ✓ |
| English | 10,571 | 3.1 | 0.001 | -0.258 | Hyperbolic ✓ |
| Chinese | 8,857 | 3.2 | 0.001 | -0.214 | Hyperbolic ✓ |
| Dutch | 2,962 | 61.6 | 1.280 | +0.125 | Spherical ✓ |
Key Insight: All semantic networks have ⟨k⟩²/N << 1, explaining universal hyperbolicity!
- CHANGELOG.md - Version history
- DEVELOPMENT.md - Development guide
- lean/FORMALIZATION_STATUS.md - Lean 4 formalization status
- lean/HyperbolicSemanticNetworks/PREPRINT.md - Formalization preprint
- manuscript/main.md - Main manuscript
- experiments/ - Sounio experiment lanes 01-07
- Julia reference implementation (N=200, 11 networks)
- Rust performance implementation (Sinkhorn + null models)
- Sounio graph module (in Sounio repo)
- Phase transition discovery and validation
- Sounio Experiments 01-07 (phase transition, null model, Forman, uncertainty, hypercomplex, spectral, N=100/200 scale)
- Scientific documentation
- Cross-language benchmarking (Julia vs Sounio numerical agreement)
- Publication: "Network Geometry in Sounio"
@software{hyperbolic_semantic_networks_julia_rust,
title = {Hyperbolic Semantic Networks: Julia/Rust/Sounio Implementation},
author = {Agourakis, Demetrios C.},
year = {2025},
doi = {10.5281/zenodo.17655231},
url = {https://zenodo.org/records/17655231},
version = {2.0.0}
}@article{agourakis2024phase,
title = {Universal Phase Transition in Network Geometry},
author = {Agourakis, Demetrios C.},
journal = {In preparation},
year = {2024},
note = {Transition at $\langle k \rangle^2 / N \approx 2.5$}
}@article{de2019small,
title={The Small World of Words English word association norms for over 12,000 cue words},
author={De Deyne, Simon and Navarro, Danielle J and Perfors, Amy and Brysbaert, Marc and Storms, Gert},
journal={Behavior Research Methods},
volume={51},
pages={987--1006},
year={2019}
}The network geometry module has been implemented in the Sounio programming language at stdlib/graph/, showcasing:
- ✅ Effect system: Explicit tracking of Alloc, Random, Confidence
- ✅ Epistemic computing: Automatic uncertainty propagation
- ✅ Units of measure: Dimensional type safety
- 🔜 Refinement types: SMT-verified network properties
- 🔜 GPU acceleration: First-class GPU effects
- 🔜 Parallel computing: Effect-tracked parallelism
See GitHub Issue #13 for implementation details.
- Code: MIT License
- Data: CC BY 4.0
- Manuscript: CC BY 4.0
See LICENSE for details.
Demetrios Chiuratto Agourakis Email: demetrios@agourakis.med.br ORCID: 0000-0002-8596-5097 GitHub: @agourakis82
- Small World of Words project team
- Sounio programming language development
- Julia and Rust communities
See CHANGELOG.md for detailed version history.
Current Version: v2.0.0 (see CHANGELOG.md)
Previous: v0.2.0 (Phase Transition + Sounio Implementation), v0.1.0 (Initial Julia/Rust implementation)