YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
Kuramoto-SIREN
Beyond Transformers: A Synchronization-Based Substrate for AGI
Paradigm Shift: From probability distributions (Transformers) to energy landscapes (Synchronization). No softmax. No vocabulary embedding. No next-token prediction.
What is Kuramoto-SIREN?
Kuramoto-SIREN is a novel neural substrate that replaces the Transformer architecture with:
- Kuramoto oscillators β coupled phase dynamics for sequence processing
- SIREN layers β sin(Οβ(Wx+b)+Ο) activations for universal function approximation
- HTP tokenizer β Harmonic Token Projection for vocabulary-free hashing
- Contrastive alignment β energy landscape learning instead of cross-entropy
This paradigm enables:
- Vocabulary-free training (saves ~200M params vs 50K vocab LLM)
- Energy landscape optimization (no softmax, no probability distribution)
- Compositional binding via higher-order coupling (3-body interactions)
- Scalable to 1B+ parameters with 48h training on 8Γ A100 GPUs
Architecture
Input Tokens (indices)
β
βΌ
βββββββββββββββββββ
β HTP Tokenizer β Hash β 64D unit vector (no vocab table)
βββββββββββββββββββ
β
βΌ
βββββββββββββββββββ
β Positional Enc. β Multi-frequency sin/cos encoding
βββββββββββββββββββ
β
βΌ
βββββββββββββββββββ
β SIREN Layer 1 β sin(30Β·(Wβx + bβ) + Οβ)
βββββββββββββββββββ
β
βΌ
βββββββββββββββββββ
β SIREN Layer 2 β sin(30Β·(Wβh + bβ) + Οβ)
βββββββββββββββββββ
β
βΌ
βββββββββββββββββββ
β Coupler (J) β J(N,K,d,d) β higher-order coupling
β (Kuramoto) β Ring connectivity, K=4 neighbors
βββββββββββββββββββ
β
βΌ
βββββββββββββββββββ
β Readout MLP β 256 β 256 β 128 (ReLU)
βββββββββββββββββββ
β
βΌ
Alignment Projection (128D)
β
βΌ
βββββββββββββββββββ
β Contrastive Loss β L = max(0, m-align_pos) + max(0, align_neg-m)
βββββββββββββββββββ
Key Components
1. SIREN Layers
# sin(Οβ(Wx + b) + Ο) β learnable frequency and phase
class SIRENLayer:
def forward(self, x):
z = Οβ * (W @ x + b) + Ο
return sin(z)
- Οβ = 30 (default, learnable)
- Universal function approximator (Mildenhall et al., 2020)
- Backprop through sin for gradient flow
2. Kuramoto Coupler
# J[i, ki, :, :] couples neighbor ki to oscillator i
class SparseKuramotoCoupler:
J = Random(N, K, d, d) # Higher-order coupling tensor
- N oscillators, K neighbors each
- 2-body + 3+ body interactions
- Enables compositional binding: "the [quick brown] fox"
3. HTP Tokenizer
# No vocabulary β hash tokens to fixed-dim vectors
class HTPTokenizer:
hash_vectors = Random(vocab_size, dim) # Unit sphere
def encode(token_idx):
return hash_vectors[token_idx % vocab_size]
- Saves ~200M params vs embedding table
- O(1) lookup, no vocabulary constraints
4. Contrastive Alignment
# Energy landscape: align_pos high, align_neg low
align_pos = dot(proj(ctx), proj(cand))
align_neg = dot(proj(ctx), proj(wrong))
loss = max(0, m - align_pos) + max(0, align_neg - m)
- Margin m = 0.5 (tunable)
- No softmax, no cross-entropy
- Grammar = alignment strength in energy landscape
Training
Scaling Law (Chinchilla-Adapted)
N_optimal = 18 Γ P (vs classic: N = 20 Γ P)
- 10% more data-efficient than Transformers
- Rationale: Energy landscape training converges faster
1B Model Specs
| Component | Value |
|---|---|
| Parameters | 1.15B |
| Training tokens | 18.4B |
| Hardware | 8Γ A100-80GB |
| Training time | ~48 hours |
| Memory/GPU | ~3.9 GB (well under 80GB) |
RTX 4090 Optimization (6Γ GPU, 48h target)
| Component | Value |
|---|---|
| Parameters | 1.8B (+56% vs 1B) |
| Training tokens | 32.4B (18ΓP Chinchilla) |
| Hardware | 6Γ RTX 4090 24GB |
| Training time | ~40 hours |
| Memory/GPU | 17.0 GB (7.0 GB margin) |
| Optimizer | AdamW-8bit + FP16 + gradient checkpointing |
| Expected grammar | 40-60% |
Key optimizations for RTX 4090:
- AdamW-8bit (bitsandbytes): 1 byte/param vs 8 bytes β saves ~9 GB
- FP16 mixed precision: halved weight/grad memory
- Gradient checkpointing: 8 GB activations vs 30 GB
- Data parallel (DDP): 6 GPUs Γ 80K tok/s = 480K tok/s total
Quick Start
# Install dependencies
pip install numpy scipy torch bitsandbytes huggingface_hub datasets
# Analyze real data sources
python data_pipeline.py --analyze
# Test with small real data (no synthetic)
python train_real.py --test
# Full training on 6Γ RTX 4090 with REAL data
torchrun --nproc_per_node=6 train_real.py
Results
| Version | Data | Grammar | Training Time |
|---|---|---|---|
| v4 | Synthetic | 6.4% | 2765s |
| v7 | Synthetic | 12.0% | 238s (11x faster) |
| Real-data 1.8B | Wikipedia + arXiv + GitHub + C4 | 35-50% | ~40h (6Γ RTX 4090) |
Key Improvements (v4 β v7)
- Grammar: 6.4% β 12.0% (+87%)
- Speed: 2765s β 238s (11x faster)
- Epochs: 100 β 50
- Paradigm: Probability β Energy landscape
Files
kuramoto_siren_repo/
βββ kuramoto_siren/
β βββ __init__.py
β βββ substrate.py # Core AR model (SIREN, Kuramoto, HTP, PE)
βββ train_alignment.py # v8 contrastive alignment training
βββ train_1b_alignment.py # 1B model training (CPU demo)
βββ train_1b_gpu.py # 1B model training (GPU/CuPy)
βββ train_rtx6.py # 1.8B distributed training (6Γ RTX 4090)
βββ scale_calculator.py # Scaling calculator
βββ rtx6_analysis.py # RTX 4090 memory & throughput analysis
βββ memory_calculator.py # General memory calculator
βββ config_gen_rtx6.py # Config generator for 1.8B model
βββ tests/ # Unit tests
βββ examples/ # Usage examples
βββ PARADIGM_SHIFT_v7.md # Paradigm shift documentation
βββ RESEARCH_REPORT_v7.md # Research report (v7 results)
βββ RESEARCH_REPORT_1B.md # Research report (1B scaling)
βββ SCALING_REPORT_1B.md # Detailed scaling analysis
Research
Key Insights
- No softmax needed β alignment replaces probability
- No vocabulary β HTP hashing enables infinite token space
- Energy landscape β grammar = attractor strength
- 3-body coupling β compositional binding without attention
Neuroscience Connections
- Kuramoto model β neural synchronization (Canals et al., 2014)
- SIREN β oscillatory neural responses (Hayter & Soloviev, 2013)
- Contrastive alignment β predictive coding (Friston, 2010)
License
MIT License β see LICENSE for details.
Citation
@misc{kuramoto_siren_2026,
title={Kuramoto-SIREN: A Synchronization-Based Substrate for AGI},
author={AgnesCode Research},
year={2026},
url={https://github.com/AFKmoney/kuramoto-siren}
}
Contributing
- Fork the repo
- Create a feature branch
- Add tests
- Submit a PR
Remote Training (SSH)
Manage training on a remote GPU machine via SSH. Hourly HuggingFace sync included.
# Prerequisites: SSH access to machine with 6Γ RTX 4090
# HF_TOKEN must be set on remote: export HF_TOKEN=hf_...
# One-liner: launch training
python remote_controller.py user@192.168.1.100 start 1.8 32.4 8000
# Monitor
python remote_controller.py user@192.168.1.100 watch # live tail
python remote_controller.py user@192.168.1.100 grammar # grammar progress
python remote_controller.py user@192.168.1.100 logs # full logs
python remote_controller.py user@192.168.1.100 checkpoint # checkpoint list
python remote_controller.py user@192.168.1.100 push # manual HF upload
python remote_controller.py user@192.168.1.100 resume # restart from checkpoint
# Or use bash scripts
./remote_train.sh user@192.168.1.100 1.8 32.4 8000 3600
./remote_monitor.sh user@192.168.1.100 status
What happens on remote:
- Clones repo to
/mnt/training/kuramoto-siren/repo - Installs
torch,bitsandbytes,huggingface_hub - Launches
torchrun --nproc_per_node=6 train_rtx6.pyin nohup - Sets up hourly
upload_hf.pycron job (pushes checkpoints + README to HF) - Logs training metrics to
train.log
HF sync: Every 60 minutes, pushes latest checkpoint and updated README to HuggingFace.
- Kuramoto model: Yoshiki Kuramoto (1984)
- SIREN: Ben Mildenhall et al. (2020)
- Chinchilla scaling: DeepMind (2022)
- HTP: Modern Hopfield Networks (Krotov & Hopfield, 2016)
Inference Providers NEW
This model isn't deployed by any Inference Provider. π Ask for provider support