v0.1 — Now with CUDA GPU Acceleration

The language that makes
AI think differently.

NEURON integrates automatic differentiation, temporal safety, causal do-calculus, and uncertainty tracking directly into the type system. No more silent bugs at 3 AM.

0
Tests Passing
0
Endurance Iterations
0
Stdlib Modules
0
Compiler Panics
model Transformer: w: Tensor[512, 512] = glorot(512, 512) fn forward(self, x): let q = x @ self.w let scores = softmax(q) return scores fn train(self, data): let loss = cross_entropy( self.forward(data.x), data.y) update self by adam(grad(loss), lr=3e-4)

Designed for ML Safety & Correctness

No more chasing silent numerical bugs, data leakage, or invalid causal claims through thousands of log lines.

Temporal Types

Prevents lookahead bias at compile time. Variables carry temporal direction properties, and future data access is rejected by the type checker.

Causal Inference

First-class do-calculus. Distinguishes observe() from intervene() to prevent correlation/causation errors at compile time.

First-Class Uncertainty

Uncertain[Tensor] types propagate confidence bounds through operations. The compiler warns if you forget to check confidence.

Native Autograd

Every function is differentiable. Tape-based reverse-mode AD with backward passes for MatMul, ReLU, Softmax, CrossEntropy, MSE, Sqrt, Sum, Mean.

CUDA GPU Acceleration

Fused element-wise CUDA kernels compiled at runtime via NVRTC. Persistent VRAM architecture with dedicated allocation, caching pool, and zero-copy host-device tracking.

Effect System

Side effects must be declared. [Effect[Mut[self], IO]] ensures pure forward passes are separated from training loops.

Provable Forgetting

Selective unlearning built into the runtime. forget() uses Fisher Information Noise Scrubbing to scramble targeted task representations and issues a signed ForgetCertificate.

Dynamic JIT Compiler

Compiles math kernels directly into native assembly or CUDA code at runtime. Sub-millisecond compilation scaling for deep networks, bypassing the interpreter.

Experience Type Safety in Action

Select an example, then click Compile & Run to see NEURON's compiler catch bugs.

terminal — neuronc
$ neuronc check examples/demo.nr
Ready. Click "Compile & Run" to execute.

How NEURON Works

A native compiler pipeline ensuring safety and extreme JIT execution performance.

01

Source Code

Write .nr files with models, causal graphs, and tensor math

02

Lexer & Parser

Indent-aware tokenization, recursive descent parsing

03

Type Checker

Shapes, temporal, causal, uncertainty, effect verification

04

IR Lowering

SSA-style CFG with basic blocks and tape nodes

05

Dual Backend

VM interpreter, JIT transpiler, and CUDA GPU kernels

NEURON vs. Traditional Frameworks

How compile-time guarantees replace tedious debugging loops.

Safety Check PyTorch JAX NEURON
Tensor Shape Verification Runtime Crash JIT Compile-time Static Compile-time
Temporal Leak Prevention None (Silent Bug) None (Silent Bug) Static Type Error
Causal Intervention Checking Manual tracking Manual tracking Static Type Error
Uncertainty Warnings None None Compiler Warning
Gradient Computation Library (Tape) JIT Transform Native Syntax
GPU Acceleration CUDA XLA CUDA JIT (NVRTC)

Performance Benchmarks

NEURON JIT delivers CPU execution speeds competitive with PyTorch, outperforming interpreted Python.

MLP Backpropagation Training

100 steps, batch size 64, Adam optimizer (lower is better)

NEURON VM (Interpreted) 307.5ms
NEURON Native JIT 228.5ms
PyTorch CPU (1 Thread) 195.5ms

Matrix Multiplication Speedup

Relative speedup vs. interpreted baseline (higher is better)

NEURON VM (Baseline) 1.0×
NEURON Native JIT 19.8×
PyTorch CPU (1 Thread) 40.5×

Key Math Engine Optimizations

IKJ Loop Reordering

Cache-friendly memory access patterns in MatMul enabling CPU auto-vectorization into AVX2 instructions.

Thread-Local Allocator

Caching allocator recycles intermediate vectors, eliminating dynamic allocation locks during backpropagation.

Bounds Check Elision

LLVM proves indexing limits, removing runtime safety check overhead in hot loops.

Powi Loop LICM

Moves exponentiation calculations outside element-wise optimization steps.

Frequently Asked Questions

A library wrapper cannot verify mathematical properties at the syntax level. Shape errors, temporal lookahead bias, and causal mode confusion only manifest as runtime exceptions or silent numerical discrepancies in Python. By writing a custom compiler in Rust, NEURON validates the structure of your computation graph before execution.

NEURON implements temporal direction analysis during type verification. When you construct a Temporal[T, past_to_future] reference, the compiler tracks data flow direction. Any operation like .after(k) that references future timestamps flips the direction to future_to_past, which is then rejected if passed to a function expecting past-only data.

The compiler (neuronc) is written in Rust and runs on Windows, macOS, and Linux. The JIT compiler uses rustc to compile generated Rust code. GPU execution is supported on CUDA-capable NVIDIA GPUs using runtime compilation via the NVRTC library. Native code generation targets standard x86_64 AVX2 instruction sets.

The BSL allows 100% free use for development, testing, research, and non-production deployments. For proprietary commercial workloads, it requires a commercial license. This ensures sustainable funding while guaranteeing the code becomes fully open-source (Apache 2.0) on January 1, 2030.

Start Building with NEURON

The compiler, runtime, and standard library are fully functional. Start building today or reach out for enterprise partnerships.

Available Now

Open Source SDK

The full compiler, JIT, interpreter, GPU backend, and standard library — free to use.

Free / Open Source
  • Core CLI & JIT Compiler
  • CPU Interpreter & CUDA GPU
  • Full Standard Libraries
  • PyTorch Transpiler
  • BSL 1.1 Source-Available
Download SDK

Business Source License 1.1

Developer freedom meets open-source sustainability

NEURON balances unrestricted access for developers with sustainable funding for long-term development.

Non-Production & Open Source

  • 100% Free: Full access to the compiler, JIT, interpreter, GPU backend, and stdlib.
  • Educational & Research: Completely unrestricted for academic papers, prototyping, and learning.
  • Eventual Open Source: On January 1, 2030, automatically converts to the permissive Apache License 2.0.

Enterprise Production

  • Commercial License Required: For proprietary trading engines, automated pipelines, or clinical deployments.
  • Protects the Moat: Prevents repackaging the JIT compiler into proprietary wrappers.
  • Direct Support: Includes developer support and custom GPU backend acceleration.
For licensing questions, contact [email protected].
Read the full terms in the LICENSE file.

Ready to build trustworthy AI?

Clone the repo, run your first program, and experience compile-time safety for machine learning.