Synapse-Graph Architecture

Click on any component to see implementation details below

OPERATOR Dashboard Next.js + React @xyflow/react Recharts REST + SSE NEURAL PROXY FastAPI Runtime Generation + Tracing Governance + SSE HeadMaskStore Topology + Lineage GENERATION Ollama Local LLM TRACING HF Tracer PyTorch hooks GOVERNANCE OpenMetadata Topology + Tags DEFECTIVE → Runtime Mask UI/Data Generation OpenMetadata
🎨
Operator Dashboard
Next.js 15 + React 19 dashboard for visualizing neural activity. Uses @xyflow/react for synapse graph visualization and Recharts for activation charts.
frontend/components/synapse-dashboard.tsx
frontend/components/synapse-graph.tsx
Neural Proxy (FastAPI)
FastAPI runtime orchestrating generation, hook-based tracing, and OpenMetadata governance. Handles SSE streaming for real-time updates.
backend/app/main.py
backend/app/inference.py
🔥
Ollama (Generation)
Local LLM via HTTP API. Used as primary generator when available. Falls back to HuggingFace if Ollama is not running.
SYNAPSE_OLLAMA_MODEL=qwen2.5:3b-instruct
🔍
HuggingFace Tracer
Hook-based attention tracer using register_forward_hook. Captures per-layer, per-head activations including max_attention_score, l2_norm, top source positions.
backend/app/inference.py
_register_attention_hooks()
🛡️
OpenMetadata (Governance)
Topology bootstrap creates synthetic entities. Lineage ingestion adds edges. Column-level tagging for DEFECTIVE heads.
backend/app/om_client.py
SynapseQuarantine.DEFECTIVE
🎭
HeadMaskStore
In-memory store for masked heads. Two-level masking: attention tensor + projection masking. Applied per-layer via _TraceSession.
backend/app/inference.py
set_masked_heads()
← Back to Presentation