TPNN + Quilt: Topological Constraints on Computation
Spatial manifolds and cellular governance — making attacks physically impossible
TPNN + Quilt: Topological Constraints on Computation
TPNN: Topological Prime Neural Network
The Problem
Prompt injection attacks like "IGNORE INSTRUCTIONS" work by hijacking the attention mechanism of standard language models. The injected text creates a new context that overrides the original instructions. The model has no way to distinguish legitimate context from injected context because both are just tokens in the same sequence.
The Defense
TPNN enforces topological constraints on information flow. Instead of trying to detect injected text, it constrains the output space to a topological manifold. If an injected prompt attempts to redirect the computation, the resulting state vector does not satisfy the topological boundary conditions — and the action is physically incapable of forming.
How It Works
The network's topology is defined by a graph structure where:
- Nodes represent computation states
- Edges represent valid transitions
- Ricci curvature on edges identifies bottlenecks in information flow
- PIR balance gap monitors the structural health of the network in real-time
The key insight: prompt injection creates states that violate the manifold structure of the legitimate computation space. By enforcing that all outputs must lie within this manifold, we get adversarial resistance as a mathematical property, not a heuristic.
Mathematical Proof
For any input that does not satisfy the topological boundary conditions, the output vector is guaranteed to be outside the valid output manifold. This is not a probabilistic defense — it is a mathematical guarantee.
Neo4j Integration
The same graph geometry that governs TPNN's own topology can be pointed at your data. The graph engine (a Rust core with a Python package, currently alpha) loads a graph from Neo4j with a parameterized Cypher query, computes Ricci curvature on every edge, ranks bottleneck edges, detects communities, and writes the findings back to Neo4j as relationships you can query and visualize with the tools you already use. Each run produces a manifest and a replay hash, so the same input graph gives the same result, bit for bit.
Fraud and Financial Crime Detection
Fraud rings, mule networks and layering structures show up as unusual shape in a transaction graph: tightly connected clusters joined to the rest of the network by a few bridging accounts. Curvature ranking points at those bridging accounts, and community detection groups the candidates around them. For investigators this offers three things that rule engines and black-box graph neural networks struggle to give: a ranked list of structurally interesting accounts, a reason for each (which community, which bridge edge, what curvature), and a deterministic run an auditor can replay.
What the evidence supports today: on a synthetic benchmark of 860 accounts with five planted fraud rings (60 fraud accounts among 800 background accounts), every planted fraud account ended up inside a flagged component (recall 1.0). The components over-merge, though. The engine found 33 where 6 were planted, so it narrows the search but does not yet isolate rings cleanly. It has not been tested on real partner data, and the finance module is a draft specification. We are looking for design partners to measure it against their own labeled cases. It supports analysts. It does not file reports or replace scoring models.
Quilt: Governed Cellular Automata
The Substrate
Quilt is a cellular automata substrate — a grid of cells that evolve according to local rules. Complex global behavior emerges from simple local rules. But without governance, emergent behavior can be destructive.
Five New Cell Kinds
The Quilt-AGI Bridge adds five cell kinds that enforce mathematical governance:
- Equilibrium Cells — Monitor PIR balance gap across their neighborhood. When balance breaks, they emit stabilizing signals. The immune system of the grid.
- Concept Cells — Store knowledge graph nodes. Concepts literally live in the grid, forming edges to other concept cells. The knowledge graph is part of the computational substrate.
- Gate Cells — Sit between regions. Any state transition crossing a gate must satisfy the gate's safety predicate. Cellular-level governance, not central authority.
- Heal Cells — When a cell's state becomes corrupted, heal cells reconstruct the damaged state from neighboring cells' history. Self-repair at the cellular level.
- Topology Cells — Monitor Ricci curvature across the grid. When negative curvature (a bottleneck) is detected, they trigger new connections to relieve pressure. The grid restructures itself.
Four Integration Modules
- evolve_gate: Every evolution step passes through a gate checking equilibrium, safety, and topology. The step only commits if all checks pass.
- zk_bridge: Zero-knowledge proofs that a cell's evolution was correct — without revealing the cell's state.
- mesh_bridge: Run Quilt grids across multiple machines. Horizontal scaling for cellular automata.
- embedded_bridge: Deploy Quilt on microcontrollers and FPGAs. Safe AGI on bare metal.
Why Topology Matters
Both TPNN and Quilt share the same insight: safety is spatial, not procedural.
- TPNN constrains the output space to a manifold — attacks outside the manifold cannot form
- Quilt constrains evolution to safe trajectories — cells cannot evolve into dangerous states
- Both use PIR balance gap as the real-time health metric
- Both use Ricci curvature to identify structural bottlenecks
This is the topological pillar: computation that is structurally constrained to safe regions of the state space. Not by rules, but by mathematics.
Published by Only Institute