Domain-agnostic coherence control compiler built on SCPN's Kuramoto/UPDE framework
Project description
SCPN Phase Orchestrator
Domain-agnostic coherence control compiler built on Kuramoto/UPDE phase dynamics.
Active Development — SCPN Phase Orchestrator is under intensive development. The core UPDE engine, 3-channel oscillator extraction (P/I/S), supervisor with regime management, and Rust FFI acceleration are functional and guarded by local and CI verification gates. Public capability counts are generated from the manifest below rather than maintained by hand. APIs may evolve as this work progresses.
Version: 0.5.11 Status: active development; public inventory is generated below.
SCPN Phase Orchestrator Capability Inventory
| Surface | Current inventory |
|---|---|
| Package version | 0.6.0 |
| Public API exports | 22 |
| Python package modules | 417 |
| Core Engine modules | 224 |
| Runtime/Serving modules | 46 |
| Integration modules | 24 |
| Research/Experimental modules | 121 |
| Domainpack files | 36 |
| Rust kernel files | 91 |
| Optional extras | 14 |
| Python test files | 481 |
| Public documentation pages | 162 |
| GitHub Actions workflows | 10 |
Evidence boundary: this snapshot is a static inventory. Performance, coverage, hardware, and scientific-fidelity claims require their own committed evidence artifacts.
What It Does
Treats Kuramoto phase dynamics as a universal synchrony state-space. Any hierarchical coupled-cycle system — plasma, cloud infrastructure, traffic, power grids, factories, biology — maps onto the same engine.
Core Pipeline
Domain Binder → Oscillator Extractors (P/I/S) → UPDE Engine → Supervisor → Actuation Mapper
3-Channel Oscillator Model
| Channel | Source | Phase Extraction |
|---|---|---|
| Physical (P) | Continuous waveforms | Hilbert transform, zero-crossing |
| Informational (I) | Event/decision streams | Event-phase from message timing |
| Symbolic (S) | Discrete state sequences | Ring-phase θ=2πs/N, graph-walk |
4 Universal Control Knobs
| Knob | Meaning |
|---|---|
| K | Coupling strength (Knm matrix) |
| α | Phase lag (transport/actuator delays) |
| ζ | Driver strength (external forcing) |
| Ψ | Reference phase (control target) |
Dual Objective
- R_good: Coherence to maintain (actuator ↔ target phase-lock)
- R_bad: Coherence to suppress (harmful mode-locking)
Capabilities
GPU-First Differentiable Phase Dynamics (nn/ module, JAX)
nn/ is the primary API for ML users. It exposes JAX/equinox layers and
runtime checks directly from scpn_phase_orchestrator.nn so production
training jobs fail fast when no GPU/TPU backend is visible.
from scpn_phase_orchestrator.nn import (
KuramotoLayer,
jax_runtime_info,
require_accelerator,
)
print(jax_runtime_info())
device = require_accelerator() # raises on CPU-only JAX runtimes
| Module | What it does |
|---|---|
| KuramotoLayer | Phase-only oscillator layer (equinox), learnable K and ω |
| StuartLandauLayer | Phase + amplitude layer, bifurcation parameter μ |
| Simplicial Kuramoto | 3-body higher-order coupling (Gambuzza 2023) |
| BOLD Generator | Balloon-Windkessel hemodynamic model for fMRI |
| Reservoir Computing | Kuramoto network as nonlinear reservoir + ridge readout |
| SAF Spectral Loss | Topology optimization via Laplacian eigenstructure |
| UDE-Kuramoto | Physics backbone sin(Δθ) + learned neural residual |
| Inverse Pipeline | Infer coupling K and frequencies ω from observed data |
| OIM Graph Coloring | Oscillator Ising machine for combinatorial optimization |
| Differentiable Supervisor | Equinox policy for closed-loop K/zeta proposals with ControlAction adapter |
All functions are JIT-compilable, vmap-compatible, and differentiable.
Install: pip install scpn-phase-orchestrator[nn]
For CI and smoke tests on CPU-only hosts, use
require_accelerator(allow_cpu=True) explicitly.
Advanced Dynamics (upde/ module, NumPy)
| Module | What it does |
|---|---|
| Inertial Kuramoto | Second-order swing equation for power grid stability |
| Market Kuramoto | Financial regime detection via Hilbert phase + order parameter |
| Swarmalator | Coupled spatial + phase dynamics (O'Keeffe 2017) |
| Simplicial Engine | 3-body coupling with explosive transitions |
| Stuart-Landau Engine | Amplitude dynamics with Hopf bifurcation |
| Stochastic Engine | Euler-Maruyama with optimal noise (D* auto-tuning) |
| Geometric Engine | Torus-preserving symplectic integrator |
| Delay Engine | Time-delayed coupling with circular buffer |
| Ott-Antonsen | Exact mean-field reduction (O(1) prediction) |
Closed-Loop Control (unique — no other oscillator library has this)
| Module | What it does |
|---|---|
| MPC Supervisor | Predicts R trajectory 10 steps ahead via OA reduction |
| Regime Manager | FSM with hysteresis (NOMINAL/DEGRADED/CRITICAL) |
| Petri Net FSM | Formal state machine with guard conditions |
| Plasticity | Three-factor Hebbian coupling adaptation |
| TE Adaptive | Transfer entropy-based causal coupling updates |
| Audit Trail | SHA256-chained JSONL for deterministic replay |
Analysis Toolkit (15 monitors)
Order parameter, PLV, PAC (cross-frequency coupling), chimera detection, EVS (entrainment verification), PID (redundancy/synergy), Lyapunov exponent, entropy production, winding number, ITPC, coupling estimation (including non-sinusoidal harmonics), HCP connectome generation.
Hardware Deployment
| Target | Status |
|---|---|
| Rust FFI | 12 PyO3 bindings for native-speed core modules |
| FPGA | 16-oscillator Zynq-7020 kernel, sub-15μs latency |
| WebAssembly | Browser-based Kuramoto visualization, no server needed |
| JAX GPU | Transparent GPU acceleration via XLA |
See Documentation Coverage for the current repo-wide documentation inventory and the enforced API-reference policy.
Unique Analysis Capabilities
| Module | What it does |
|---|---|
| Hodge Decomposition | Splits coupling K into gradient / curl / harmonic components |
| Transfer Entropy | Directed causal information flow between oscillators |
| Coupling Estimation | Infer K from data (least-squares + higher harmonics) |
Quickstart
# Install from PyPI
pip install scpn-phase-orchestrator
# Or with optional extras
pip install scpn-phase-orchestrator[queuewaves] # FastAPI cascade detector
pip install scpn-phase-orchestrator[plot] # matplotlib visualisation
pip install scpn-phase-orchestrator[otel] # OpenTelemetry export
# Scaffold a new domainpack
spo scaffold my_domain
# Scaffold from natural-language intent with a configured LLM provider
spo scaffold traffic_grid --llm \
--description "I am modelling traffic lights in a 4-intersection grid"
# Validate a domain binding spec
spo validate domainpacks/minimal_domain/binding_spec.yaml
# Run a domain simulation
spo run domainpacks/queuewaves/binding_spec.yaml --steps 1000
# Replay from audit log
spo replay audit.jsonl --output report.json
For development, clone the repo and install in editable mode:
git clone https://github.com/anulum/scpn-phase-orchestrator.git
cd scpn-phase-orchestrator
pip install -e ".[dev]"
For a role-based first-hour path, see the Onboarding Handbook. For the full notebook, example, and interactive demo inventory, see Notebooks & Demos.
Platform Support
| Platform | Python engine | Rust FFI (optional) |
|---|---|---|
| Linux | Full | Full |
| macOS | Full | Full |
| Windows | Full | Experimental (requires MSVC toolchain) |
The PyPI package is pure Python. Rust FFI provides optional acceleration
and is built from source via maturin develop.
Domainpacks
| Pack | Domain | Purpose |
|---|---|---|
autonomous_vehicles |
Vehicles | Platoon phase-locking, leader-follower sync (3 layers, 8 oscillators) |
bio_stub |
Biology | Multi-scale biological oscillators (4 layers, 16 oscillators) |
cardiac_rhythm |
Cardiology | Gap-junction coupling, arrhythmia (4 layers, 10 oscillators) |
chemical_reactor |
Process control | Hopf bifurcation, Semenov limit (4 layers, 10 oscillators) |
circadian_biology |
Chronobiology | SCN clock-gene coupled oscillators (4 layers, 10 oscillators) |
digital_twin_nchannel |
Digital twins | Six-channel plant/twin residual profile with derived TwinResidual |
edge_consensus_nchannel |
Edge orchestration | Six-channel gossip consensus with load/trust coupling |
epidemic_sir |
Epidemiology | Epidemic wave synchronisation (3 layers, 8 oscillators) |
firefly_swarm |
Ecology | Flash synchronisation, Mirollo-Strogatz (2 layers, 8 oscillators) |
fusion_equilibrium |
Fusion equilibrium | Grad-Shafranov + FusionCoreBridge (6 layers, 12 oscillators) |
geometry_walk |
Graph systems | Random-walk phase coupling (2 layers, 8 oscillators) |
laser_array |
Photonics | Semiconductor laser phase-locking (3 layers, 8 oscillators) |
manufacturing_spc |
Manufacturing | Statistical process control (3 layers, 9 oscillators) |
metaphysics_demo |
P/I/S showcase | Imprint + geometry ablation (3 layers, 7 oscillators) |
minimal_domain |
Synthetic | Minimal-but-complete pipeline example (2 layers, 4 oscillators) |
network_security |
Cybersecurity | Traffic anomaly detection, DDoS suppression (3 layers, 8 oscillators) |
neuroscience_eeg |
Neuroscience | EEG band->phase, seizure detection (6 layers, 14 oscillators) |
plasma_control |
Tokamak plasma | MHD/transport multi-scale control (8 layers, 16 oscillators) |
pll_clock |
Telecommunications | PLL network clock synchronisation (3 layers, 8 oscillators) |
power_safety_nchannel |
Power systems | Six-channel grid safety profile with derived Risk |
power_grid |
Power systems | Swing equation = Kuramoto (5 layers, 12 oscillators) |
quantum_simulation |
Quantum computing | Qubit register phase coupling (3 layers, 8 oscillators) |
queuewaves |
Cloud/queues | Retry storm desynchronisation (3 layers, 6 oscillators) |
rotating_machinery |
Vibration | Harmonics, ISO 10816 boundaries (4 layers, 10 oscillators) |
satellite_constellation |
Aerospace | Orbital slot synchronisation, beam handover (3 layers, 8 oscillators) |
swarm_robotics |
Robotics | Vicsek collective motion (3 layers, 8 oscillators) |
traffic_flow |
Transportation | Signal coordination = phase sync (4 layers, 10 oscillators) |
financial_markets |
Finance | Stock synchronization, crash detection |
gene_oscillator |
Synthetic biology | Repressilator quorum coupling |
vortex_shedding |
Fluid dynamics | Wake station Stuart-Landau |
robotic_cpg |
Robotics | Joint CPG locomotion |
sleep_architecture |
Sleep medicine | AASM sleep staging from R |
musical_acoustics |
Acoustics | Consonance = R, groove = alpha |
brain_connectome |
Neuroscience | HCP-inspired coupling |
agent_coordination |
Multi-agent coordination | Heartbeat, task, and topic synchronisation |
digital_twin_nchannel |
Digital twins | Six-channel plant/twin residual profile |
edge_consensus_nchannel |
Edge orchestration | Six-channel gossip consensus |
power_safety_nchannel |
Power systems | Six-channel grid safety profile |
identity_coherence |
Consciousness | SSGF identity model (6 layers, 30 oscillators) |
Adding a Domain
- Create
domainpacks/<name>/binding_spec.yamldeclaring layers, oscillator families, coupling, drivers, objectives, and boundaries. - Optionally add
policy.yamlfor declarative supervisor rules. - Validate:
spo validate domainpacks/<name>/binding_spec.yaml - Run:
spo run domainpacks/<name>/binding_spec.yaml --steps 1000
See metaphysics_demo for a full
example exercising all three channels, imprint modulation, geometry
projection, and policy-driven control. Spec format reference:
binding_spec.schema.json.
Development
pip install -e ".[dev]"
ruff check src/ tests/
ruff format --check src/ tests/
pytest tests/ -v --tb=short
mkdocs build
License
AGPL-3.0-or-later. Commercial licensing available — contact protoscience@anulum.li.
Citation
See CITATION.cff.
Developed by ANULUM / Fortis Studio
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file scpn_phase_orchestrator-0.6.0.tar.gz.
File metadata
- Download URL: scpn_phase_orchestrator-0.6.0.tar.gz
- Upload date:
- Size: 1.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7c9064711bf9d416b1a00bcb57643dbcd9fafcc7d01e16b76a3528942ee0259e
|
|
| MD5 |
7d028f3865bca94b835cb88fbfd6e55b
|
|
| BLAKE2b-256 |
685bc7cf0fc559fadda5df0db5a10564fa569f72d74807475a49e1f9a21b2862
|
Provenance
The following attestation bundles were made for scpn_phase_orchestrator-0.6.0.tar.gz:
Publisher:
publish.yml on anulum/scpn-phase-orchestrator
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
scpn_phase_orchestrator-0.6.0.tar.gz -
Subject digest:
7c9064711bf9d416b1a00bcb57643dbcd9fafcc7d01e16b76a3528942ee0259e - Sigstore transparency entry: 1583328845
- Sigstore integration time:
-
Permalink:
anulum/scpn-phase-orchestrator@6db48402e14dd6c6631ba7137c16d30fb11626bd -
Branch / Tag:
refs/tags/v0.6.0 - Owner: https://github.com/anulum
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@6db48402e14dd6c6631ba7137c16d30fb11626bd -
Trigger Event:
push
-
Statement type:
File details
Details for the file scpn_phase_orchestrator-0.6.0-py3-none-any.whl.
File metadata
- Download URL: scpn_phase_orchestrator-0.6.0-py3-none-any.whl
- Upload date:
- Size: 921.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9b0ab6757c8fb7670cff7ae876ba2db4205547cc4e52522e79e243f52e535635
|
|
| MD5 |
b1ddf2d327e596b22eeb2a65c89d5873
|
|
| BLAKE2b-256 |
3ca141ec223a54ced90cfe3cfeb1eae25bc26b4b2cc6222a4c018950b9003307
|
Provenance
The following attestation bundles were made for scpn_phase_orchestrator-0.6.0-py3-none-any.whl:
Publisher:
publish.yml on anulum/scpn-phase-orchestrator
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
scpn_phase_orchestrator-0.6.0-py3-none-any.whl -
Subject digest:
9b0ab6757c8fb7670cff7ae876ba2db4205547cc4e52522e79e243f52e535635 - Sigstore transparency entry: 1583329048
- Sigstore integration time:
-
Permalink:
anulum/scpn-phase-orchestrator@6db48402e14dd6c6631ba7137c16d30fb11626bd -
Branch / Tag:
refs/tags/v0.6.0 - Owner: https://github.com/anulum
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@6db48402e14dd6c6631ba7137c16d30fb11626bd -
Trigger Event:
push
-
Statement type: