SneppX-ALG v0.9.2.094 is now released. This update adds comprehensive Python security bindings covering differential privacy, adversarial robustness, model watermarking, and AI safety sanitization — all wired into a FastAPI security middleware stack. The release also ships a complete autograd engine, inference server, CUDA and distributed training infrastructure, and a fully restructured CI/CD pipeline.
What's New
P0 Security Modules (Python Bindings)
Differential Privacy
Laplace and Gaussian mechanisms with privacy budget tracking
RDP accountant for tight composition analysis
DPSGD trainer integration with config-driven YAML support
13 passing tests
Adversarial Robustness
FGSM (Fast Gradient Sign Method) attack
PGD (Projected Gradient Descent) with random start and L∞ projection
`AdversarialTrainer` with per-step attack ratio and robustness evaluation
15 passing tests
Model Watermarking
`ModelHasher` — SHA-256 content hash with HMAC signature
`WeightWatermark` — key-derived correlation-based watermark detection
`BackdoorWatermark` — trigger-set training for ownership verification
12 passing tests
S5 AI Safety Bindings
`S5PromptFilter` — jailbreak/encoded-attack/policy violation detection
`S5OutputVerifier` — PII/secret leakage detection with sanitization
`S5RLHFSafety` — factuality, bias, semantic-injection, token-anomaly, membership-inference, model-inversion, watermark, and adversarial-smoothing defenses
Pure-Python fallback when native C library is unavailable
19 passing tests
Security Middleware
`SecurityMiddleware` for FastAPI with authenticator, rate limiter, prompt filter, and output verifier
Opt-in S5 integration on `PromptFilterConfig`/`OutputVerifierConfig`
Per-endpoint filtering with `set_security`/`get_security` API
CLI flags via `serve_cli.py`
28 passing tests (server + middleware)
Core Infrastructure
Autograd Engine
`autograd.py` + `autograd_ops.py` — full forward/backward graph with 40+ operation registry
Gradient tape with backward pass, gradient accumulation, and gradient clipping
Inference Server
FastAPI-based inference server with model lifecycle management
Security middleware binding for authenticated inference
Training Pipeline
`trainer_v3.py` — next-generation trainer with config-driven setup
`train_cli.py` — command-line training launcher
Generation Module
`generation.py` — text generation pipeline with configurable decoding strategies
`tokenizer.py` — pluggable tokenization with special token handling
Experiment Tracking & HPO
`experiment_tracker.py` + `experiment_cli.py` — metrics logging, artifact tracking, CLI dashboard
`hparams.py` — grid/random/bayesian hyperparameter optimization
Graph Compiler & Checkpoint Manager
`graph_compiler.py` — computational graph compilation and optimization passes
`checkpoint_manager.py` — versioned checkpoint storage with metadata
CUDA & Distributed
`cuda_device.py`, `cuda_kernels.py` — GPU device management and kernel launchers
`nccl.py` — NCCL collective communication bindings
`distributed_wrapper.py` — multi-device training orchestration
CI/CD & Build System (73 commits)
Restructured CI pipeline with CUDA Docker builds, non-blocking macOS/Windows jobs
Fixed CUDA extension compilation via `target_sources` and private linking
Added CMakeLists for `algorithms/*/cuda` extension libraries
Guarded CUDA-only sources for CPU-only builds
Removed submodules recursion (broken on Arix-Site dir)
Pinned CUDA builds to `ubuntu-22.04` for CUDA 12.4 repo compatibility
Fixed YAML syntax errors, duplicate keys, invalid `with` blocks
Added `workflow_dispatch` for manual trigger
Installed numpy for CMake Python dependency resolution
Testing
**P0 Security Tests**: 87 tests across all 5 security modules (all passing)
**Infrastructure Tests**: Suites for autograd, generation, checkpoint manager, experiment tracker, HPO, graph compiler, CUDA kernels, NCCL, distributed wrapper, ONNX export
**Full Suite**: 414 passing tests, 1 xfail, 16 pre-existing failures (documented)
By the Numbers
120,000+ core lines + Python security bindings
500+ source files
274 commits (226 prior + 48 new)
87 P0 security tests + 327 infrastructure tests = 414 total passing
21,809 lines of C security implementation (S0-S9)
92 files changed (+5,922 / -2,810 lines in refactored modules)
Quick Start
# pip
pip install sneppx-alg
# Docker (CPU)
docker pull ghcr.io/ammar49-cyber/sneppx-alg:cpu-latest
# Source
git clone https://github.com/ammar49-cyber/sneppx-alg.git
See the Packages page for full installation details.