Research · May 2026

Grammar
is Computation.

Every structured problem — handwriting, prime numbers, language, speech, software — has a grammar underneath it. The same five mathematical operations describe them all. NeuroNet builds AI that computes through named, readable operations instead of black-box weights — and works at every level of intelligence.

98.77%
MNIST accuracy
929/930
Primes found
0
Black-box weights
3
Levels of grammar

AI weights should be code, not mystery numbers.

Standard neural networks are trained black boxes. Billions of floating-point numbers that somehow produce correct answers — with no explanation of why, no way to add knowledge without full retraining, no readable structure. We believe this is the wrong foundation for general intelligence.

"Models expressed as programs. Programs expressed as grammar. Grammar expressed as calculus."

— NeuroNet framework thesis
📦

Standard AI

Billions of unnamed weights. Black-box computation. Post-hoc explanation (LIME, SHAP). Full retraining for every knowledge update. No readable reasoning path.

Opaque Static Large
✦

NeuroNet

Named mathematical operations. Readable reasoning paths. Intrinsic explainability. Grammar edits add new knowledge in one line. Zero black-box weights in the operations.

Auditable Updatable Efficient

The key discovery: grammar is not just about language. The same structural rules that describe how Sanskrit words combine, how prime numbers are sieved, how agents compose actions — all reduce to the same five mathematical operations. Build AI on those five operations, and you get a system that is interpretable by construction.


The same grammar, three different levels of intelligence.

Grammar is not unique to any one domain. The same structural symmetry — typed operations, composition rules, growing vocabulary, named roles — appears at every level of intelligence. We are building frameworks at each level.

Same mathematical core · Different application domain

LEVEL 1
NeuroNet
Computation / AI Models
⟷
LEVEL 2
NeuroLang
Agentic Programming
⟷
LEVEL 3
NeuroScript
General Software

↑ Five operations (Panchatattva) · Composition rules (Sandhi) · Growing grammar (Āgama) · Named roles (Kāraka) ↑

Level 1 · Computation

NeuroNet — AI Model Grammar

Grammar-typed neural operations for building and training AI models. Every weight is a named mathematical operation. Every decision has a readable reasoning path. Works for vision, mathematics, speech, language — any problem with structural grammar underneath. This is what we are building now.

MNIST 98.77% Primes 929/930 Zero black-box ops Live grammar edits
↕
Level 2 · Agency

NeuroLang — Agentic Programming Language

Grammar-typed primitives for composing intelligent agents. Neuro, Flow, Plan, Memory, Effect, Budget — all typed, all composable, all following the same Sandhi composition rules. An agent program is a sentence in a formal grammar. Actively developed.

295+ Built-in Neuros Typed composition Multi-agent rooms Voice + mobile
↕
Level 3 · Software

NeuroScript — General Programming Grammar

Grammar-typed rules for writing any software. The same five operations that describe neural computation and agent behaviour also describe general program structure — selection, flow, transformation, policy, and spatial context. This level is at the hypothesis stage — the mathematical foundation is there, the implementation is ahead. Research direction.

Hypothesis stage Formal foundation ready Same 5 operations
Property NeuroNet (L1) NeuroLang (L2) NeuroScript (L3)
DomainAI model weightsAgent programsAny software
Grammar unitAkshara (math op)Neuro (typed primitive)Expression (typed rule)
Composition ruleSandhi (layer ordering)Flow / PlanSyntactic grammar
Growth mechanismĀgama (new op/proto)New Neuro typesNew grammar rules
StatusActive experimentsDeployed (Neos)Research direction

Five operations. Every computation.

Every transformation in the universe — selection, flow, rate of change, optimal policy, spatial structure — belongs to one of five mathematical families. These map to the five classical elements (Panchatattva) found in multiple ancient traditions: Indian, Greek, Chinese, Japanese. The correspondence is not coincidental — it reflects a deep structure in how nature organises transformation.

🪨
Prithvi
Earth · 0D · Scalar
logsumexp(Wx)
Tropical calculus — soft minimum and maximum. Selects the dominant option. In AI: classification decisions, winner-take-all routing, the final "which class?" judgment. In language: choosing the most fitting word root (dhātu).
💧
Jal
Water · 1D · Flow
x @ (I − roll(I, s))
Discrete calculus — finite differences. Detects how things change across positions. In AI: prime gaps, sequence boundaries, residual connections. In language: the flow of phonemes from one to the next (sandhi).
🔥
Agni
Fire · 2D · Frequency
QFT bandpass
Differential calculus — rates of change, gradients, spectral structure. In AI: the Riemann spectral structure of primes, edge detection, frequency analysis in images and audio. In language: intonation, stress patterns, prosody.
💨
Vayu
Air · 3D · Attention
x · σ(xQ · xK)
Variational calculus — optimal policy, attention, autonomous gating. In AI: self-attention (Transformers are Vayu-dominant), contextual gating, reinforcement learning. In language: the agent's autonomous selection of what to attend to.
🌌
Aakash
Space · ≥4D · Structure
x @ (AB − BA)
Exterior calculus — Lie brackets, symmetry groups, all-containing structure. In AI: Galois groups of prime fields, geometric deep learning, the high-dimensional structure of meaning. In language: the containing context (locus) in which all operations occur.

The same five appear everywhere

This is not specific to Indian philosophy. Greek: Fire/Water/Earth/Air/Aether. Chinese: Wood/Fire/Earth/Metal/Water. Japanese: 五大 (godai): Chi/Sui/Ka/Fū/Kū. All five-element systems reflect the same underlying taxonomy of transformation types. The Panchatattva is the version we use because its mathematical mapping is most precise.

Prithvi Selection Jal Difference Agni Frequency Vayu Attention Aakash Structure 0D scalar 1D vector 2D matrix 3D tensor ≥4D exterior

Classical regime (0D–2D) · Quantum boundary (3D) · Quantum regime (≥4D)


How grammar becomes a neural network.

NeuroNet translates grammatical structure directly into model architecture. Every component has a Sanskrit name because every component maps precisely to a Sanskrit grammatical concept — not metaphorically, but structurally.

Input pixels / n Vaikharī Stage 1 PhalaDecoder threshold avg_pool sobel → 147d Madhyamā AksharaBank: 32 fixed operations, 0 learned params Layer 1 Jal · Agni · Vayu · Aakash Router → weights Σ wₖ · opₖ(x) LayerNorm + residual Sandhi: no Prithvi in first layer Pratyāhāra Layer 2 Prithvi · Jal · Agni · Vayu Router → weights Σ wₖ · opₖ(x) LayerNorm + residual Sandhi: no Aakash at middle layer Pratyāhāra Layer 3 All 32 ops Router + LayerNorm + residual Paśyantī Head Linear Parā Sandhi constraints govern which operations are permitted in each layer position

AksharaBank

32 fixed mathematical operations — 6 Prithvi, 6 Jal (strides 1/2/4/8/16/32), 8 Agni (frequency bands), 6 Vayu, 6 Aakash. All matrices are frozen at initialization. Zero learned parameters in the operations themselves. Every operation has a name and a type.

Router

A small learned selector that picks which operation to use for each input. Two variants: BornRouter (Linear projection, learned) and GrammarRouter (distance-to-prototype, zero weights). The model learns which operation, not what to compute.

Sandhi Constraints

Sanskrit Sandhi rules govern which sounds can combine. Our Sandhi constrains which operations are allowed in each layer. Layer 1 cannot use Prithvi (no selection before analysis). Layer 2 cannot use Aakash. Layer 3 allows everything. This forces coarse-to-fine processing.

Four Levels of Compression

Input (Vaikharī, raw pixels) → features (Madhyamā, 147-dim) → prototype space (Paśyantī) → class identity (Parā, argmax). This four-level compression maps exactly to Bhartṛhari's four levels of speech. Classification is compression running backward — from noise to essence.


Two experiments. Two domains. Same framework.

We tested the framework on two completely different problems — visual pattern recognition and pure mathematics — to check if the grammar truly generalises. Both succeeded. Different operations dominated in each, confirming the framework adapts its grammar to the problem's true structure.

Experiment 1 · Vision

Handwritten Digit Recognition (MNIST)

70,000 handwritten digits, 10 classes. The model learns to classify 0–9 using only named mathematical operations.

98.77%
Peak accuracy (v19)
33K
Params (v22)
0
Black-box ops

What the model discovered without being told:

vayu
35%
jal
28%
agni
20%
prithvi
10%
aakash
7%

Vayu (attention/gating) dominates — image recognition needs to gate which edge features to attend to. The model discovered this independently.

Version history:

v19

DualHOG + BornRouter  98.77%

Best accuracy. 117K params. HOG features (+2.83%) are the decisive ingredient.

v22

PhalaDecoder + BornRouter  95.21%

Stage 1 = three pure math ops (threshold → pool → sobel). 33K params. No learned feature extraction.

v23

GrammarRouter · Zero routing weights  91.43%

26K params. Router replaced by distance-to-prototype — no learned routing weights at all. Dynamic prototype growth (āgama): 1→3 prototypes per class.

Experiment 2 · Mathematics

Prime Number Classification

Given any integer, predict: prime or composite? No formula given. The model must discover the structure of primality from data — and the grammar grows as new primes are found.

929/930
Primes found
67K
Params
1 line
Grammar edit

What the model discovered — without being told:

jal
83.7%
agni
8.9%
prithvi
2.9%
aakash
2.6%
vayu
2.0%

Jal (finite differences) dominates at 83.7%. Prime number theory is fundamentally about how divisibility changes — gaps between primes, difference in residue patterns. The model found this structure independently.

How numbers are encoded (CRT fingerprint):

# For n=47, with 10 prime grammar rules: n%2/2 = 0.500 ← not even n%3/3 = 0.667 ← not divisible by 3 n%5/5 = 0.400 ← not divisible by 5 n%7/7 = 0.714 ← not divisible by 7 # ... (10 mod slots + 20 binary bits + 3 scale) # A prime: non-zero in ALL slots # A composite: near-zero at its smallest prime factor

The key finding: different problems route to different Tattvas

MNIST routes through Vayu (attention gating). Primes route through Jal (differences). Nobody told the model which to use — it discovered the mathematical nature of each problem independently. This is what "grammar as computation" means: the model finds the right calculus for the task, not just the right numerical weights.


Add new knowledge with one line of code. No retraining.

Standard AI requires full retraining to incorporate new knowledge. NeuroNet does it the way a living grammar works — by adding one new rule. When the grammar grows, the model immediately starts using the new rule on the next input.

# STANDARD AI: adding new knowledge # ───────────────────────────────────────────────────────── # 1. Collect new training data # 2. Augment dataset # 3. Re-run training for N epochs (hours/days/dollars) # 4. Hope nothing was forgotten (catastrophic forgetting) # 5. Re-evaluate entire benchmark # AKSHARANET: adding new knowledge # ───────────────────────────────────────────────────────── grammar.add_prime(31) # [āgama] rule #11: block all multiples of 31 grammar.add_prime(37) # [āgama] rule #12 grammar.add_prime(41) # [āgama] rule #13 # Done. Model uses new rules from next call onward.

Āgama — Sanskrit for "insertion"

In Sanskrit grammar, āgama is the insertion of a new phoneme rule into the existing grammar to handle a new case. In NeuroNet, āgama is adding a new prime modulus, a new prototype slot, or a new operation variant. One insertion = one new rule. The grammar is always live.

Growing Grammar = Infinite Potential

Primes have infinitely many grammar rules — the sieve never ends. The NeuroNet grammar bank has 60 slots for prime mods; we've filled 15 so far. More rules → higher precision. The grammar grows as the world grows. This is how a living mind works, not a frozen model.

"Prime numbers have a fixed sort of operation with a growing grammar. If we solve this problem, we will know that we can do this for any problem."

— Gopal Kumar, May 2026

Any structured problem. One framework.

The framework works wherever there is grammar — and every sufficiently structured domain has grammar. Language, mathematics, code, music, physics, logistics — all have typed primitives, composition rules, and hierarchical structure. NeuroNet can be applied to any of them.

🗣️ Speech Recognition (ASR)

Audio is waves. Agni (QFT) for frequency bands — the spectral structure of vowels and consonants. Jal (differences) for formant transitions between phonemes. Sandhi rules for which phoneme combinations are permitted. Grammar = phonological rules of the language.

🔊 Text-to-Speech (TTS)

The inverse of ASR. Parā (text class identity) → Paśyantī (phoneme sequence) → Madhyamā (acoustic features) → Vaikharī (audio waveform). Running the Vāk hierarchy forward. Grammar converts abstract text into physical sound.

📝 Language Models (LLM)

Language has grammar at every level. Agni for token frequency patterns, Vayu for contextual attention (Transformers are Vayu-dominant), Aakash for syntactic tree structure. A grammar-typed LLM would be dramatically more sample-efficient — structure replaces scale.

➗ Algorithmic Problems

Prime numbers are proof that algorithmic and mathematical problems have grammar. Sorting, scheduling, graph problems, cryptography — all have structural rules that map to the five Tattvas. Any algorithm with a rule-based structure can be expressed as a grammar and solved by NeuroNet.

🤖 Robotics & Control

Physical action is governed by Vayu (variational calculus — optimal policy) and Jal (discrete transitions between states). A robot's motion grammar is as structured as a language grammar. The Sandhi constraints = physical constraints on which movements can follow which.

💊 Science & Discovery

Physics, chemistry, biology — all operate under structured rules. The grammar of physics is the symmetry group (Aakash). The grammar of chemistry is the periodic table (Prithvi selection + Jal differences). Grammar-typed AI for science could discover structure the way it discovered prime gaps.

The Universal Grammar Hypothesis

Every structured domain — language, mathematics, code, physics, biology — has grammar underneath it. That grammar is always composed of the same five types of transformation: selection, flow, frequency, policy, and structure. A model that is built to match this grammar will learn more efficiently, remain interpretable, and generalise more broadly than one built without it.

Sanskrit
4th c. BCE
≡
Primes
∞
≡
Digits
MNIST
≡
Language
LLM
≡
Software
Code

All share the same five-operation grammar. NeuroNet is the first framework that makes this explicit in a neural architecture.


Towards general intelligence with grammar.

The goal is not AGI in the narrow sense of "passes every benchmark." The goal is Artificial Generative Intelligence — a system that can generate structured behaviour in any domain, because it has learned the grammar of structure itself.

Property Standard Deep Learning NeuroNet Framework
ArchitectureFixed (CNN, Transformer...)Grammar-typed, evolves with problem
RoutingImplicit (all weights learn everything)Explicit named operations per input
ExplanationPost-hoc (LIME, SHAP, attention maps)Intrinsic — readable reasoning path
Knowledge updateFull retraining requiredOne-line grammar edit, no retraining
Domain transferDomain-specific architecturesSame framework, different dominant Tattvas
Scale neededBillions of parameters67K–117K for competitive accuracy
Trust / auditBlack boxEvery decision traceable to named op

What's working now

  • MNIST: 98.77% accuracy, 33K params
  • Primes: 929/930 recall, live grammar growth
  • Zero black-box weights in any operation
  • Dynamic prototype growth (āgama)
  • Framework deployed in Neos (agentic layer)

What's next

  • Grow prime grammar to 30+ mods → check Agni (Riemann) emerges
  • ASR phoneme classification with Agni-dominant routing
  • Grammar-typed LLM layer — test sample efficiency
  • NeuroScript: general software grammar (Level 3)
  • Published benchmark comparison vs. standard architectures

"Grammar is not about Sanskrit specifically. Sanskrit is just where the grammar happened to be found. The same grammar governs all structured phenomena."

— Framework thesis, paraphrasing Pāṇini

Research in progress · Gopal Kumar · May 2026

← Research foundations NeuroLang (Level 2) →