SneppX-ALG
← Back to Blog

"algo0.5 — Trainable Differentiable Pipeline Across All Modules"

SneppX-ALG reaches a major milestone: every module in the cognitive architecture now exposes a differentiable training graph, wired into a unified end-to-end pipeline.

What Changed

Before: v0.1 was a structural seed. Automatic differentiation was a stub. Layer 1 components existed as forward-pass skeletons with no backward pass. The system could not learn.

After: Reverse-mode autodiff with 40+ backward passes. A full training loop (train_step, evaluate, checkpoint). All six modules — Attention, HSS, SER, ARC, NPE, FM — wired into a single differentiable graph that runs forward, backward, and optimizer steps on CPU.

The Training Graphs

  • **ARC** (Adversarial Robustness Core): Differentiable projection input guard + MLP output verifier with ReLU activations
  • **NPE** (Neural Programming Engine): Differentiable MLP recompiled from the VM bytecode. Weight tensors are zero-copy strided views into the flat program memory — no duplication, shared storage
  • **FM** (Fractal Memory): Pass-through. The associative memory cache is inference-only with no learnable parameters
  • These join the existing Attention, HSS, and SER training graphs from the previous release.

    Pipeline Architecture

    input → Attention → HSS → SER → ARC → NPE → FM → output

    All modules chain together through SNEPPX_model_build_train_graph() in kernel/arch.c. The pipeline handles 3D→2D reshaping between attention and downstream modules, automatic weight offset tracking, and end-to-end gradient flow.

    By the Numbers

  • **~180 tests** passing across 60+ test binaries
  • **410+ lines** of new training graph code across ARC, NPE, and FM
  • **All training tests pass**: multi-module stack, SER convergence, NPE convergence, full integration
  • **Fixed critical bug**: trainer was reading loss value from struct pointer instead of data buffer
  • What's Next

    v0.7 will focus on CUDA kernel acceleration, the Python API, HSS parallel scan, and pushing test coverage toward 300+. v1.0 targets a 7B parameter distributed model with GPT-2 class performance.