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

License: MIT Python 3.10+

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:

  1. Kuramoto oscillators β€” coupled phase dynamics for sequence processing
  2. SIREN layers β€” sin(Ο‰β‚€(Wx+b)+Ο†) activations for universal function approximation
  3. HTP tokenizer β€” Harmonic Token Projection for vocabulary-free hashing
  4. 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

  1. No softmax needed β€” alignment replaces probability
  2. No vocabulary β€” HTP hashing enables infinite token space
  3. Energy landscape β€” grammar = attractor strength
  4. 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

  1. Fork the repo
  2. Create a feature branch
  3. Add tests
  4. 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:

  1. Clones repo to /mnt/training/kuramoto-siren/repo
  2. Installs torch, bitsandbytes, huggingface_hub
  3. Launches torchrun --nproc_per_node=6 train_rtx6.py in nohup
  4. Sets up hourly upload_hf.py cron job (pushes checkpoints + README to HF)
  5. 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)
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support