Offline Model Training
Sulcus doesn't just store memories — it learns from them. Every agent interaction generates training signals that accumulate over time. Periodically, these signals are used to retrain the SIU's ONNX models offline, and the improved models are hot-swapped into the running server. The result: a memory system that gets smarter the more you use it, tuned specifically to your data patterns.
Sulcus · Offline Training Pipeline · 2026
Introduction
Why offline training matters for agent memory
Most memory systems are static. You embed content, store it in a vector database, and hope the retrieval model works well enough. The intelligence never improves. If the quality gate lets junk through on day one, it lets the same junk through on day three hundred.
Sulcus takes a different approach. Every interaction your agents have with their memory — storing knowledge, deleting noise, correcting misclassifications, pinning critical facts — generates a training signal. These signals accumulate in a dedicated table, building a dataset that reflects exactly how your agents use your data.
Periodically, these signals are exported, used to retrain the SIU's ONNX models, and the new models are hot-swapped into production. No restart. No downtime. Just a memory system that wakes up smarter tomorrow than it was today.
No other agent memory system trains its own intelligence from agent behavior. RAG pipelines retrieve — they don't learn. Vector databases index — they don't improve. Sulcus is the only system where the quality gate and type classifier evolve with your usage, creating models tuned specifically for your domain.
The SIU Pipeline
Four components that form the Semantic Inference Unit
The Semantic Inference Unit (SIU)is Sulcus's intelligence layer — the system that decides what to store, how to classify it, what entities it contains, and how to rank results. It has four components, each trainable from accumulated signals:
SIVUQuality GateScores every incoming memory with a base_utility value from 0 to 1. High-utility content gets stored with strong initial heat; low-utility content gets rejected or deprioritized. Learns from accept and reject signals.
SICUType ClassifierClassifies memories into types: episodic, semantic, procedural, preference, or fact. Respects explicit agent-provided types and acts as intelligent fallback when no type is specified. Learns from reclassify signals — the highest-value corrections in the pipeline.
SILUEntity ExtractionExtracts entities and relationships from every stored memory, building entity–relation–entity triples for the Apache AGE knowledge graph. Runs automatically on every store — no configuration needed.
SIRUAdaptive RecallScores and ranks memory search results using multi-signal fusion: semantic similarity, heat, recency, type match, and graph connectivity. Learns optimal scoring weights from recall patterns.
Processing Order
Every memory passes through the quality gate, gets classified, has entities extracted, and is stored. SIRU activates during search to rank results.
Signal Sources
What generates training data and how confidence varies
Training signals come from two sources: explicit agent actions (store, delete, reclassify with train=true) and automatic server-side actions (pin, boost). Each signal type teaches a different component:
| Action | Signal | Trains | Confidence | Trigger |
|---|---|---|---|---|
| Store | accept | SIVU | Explicit | train=true |
| Delete | reject | SIVU | High | train=true |
| Reclassify | reclassify | SICU | Explicit | train=true |
| Pin | accept | SIVU | High | Automatic |
| Boost | accept | SIVU | Medium | Automatic |
| Curator cycle | reclassify | SICU | System | Automatic |
# How training signals accumulate
# Every agent interaction can generate a signal:
client.remember("Deploy via ACR then containerapp update",
memory_type="procedural",
train=True) # accept signal for SIVU
client.delete("node_01J...",
train=True) # reject signal for SIVU
client.update("node_01J...",
memory_type="procedural", # was 'episodic'
train=True) # reclassify signal for SICU
client.pin("node_01J...") # auto accept signal (high confidence)
client.boost("node_01J...", 0.95) # auto accept signal (medium confidence)Note: Recall-triggered heat boosts intentionally do not generate training signals — they would flood the table with low-value noise. Only deliberate actions generate signal.
The Curator's Role
Automated signal generation from memory maintenance
The Curatoris Sulcus's periodic maintenance cycle. It runs on a schedule, scanning for stale memories that have never been recalled. But it does more than just clean up — it generates free training data.
When the Curator finds a node whose type classification looks suspect (based on updated SICU models), it generates a reclassify signal — a correction the system discovered on its own, without any agent intervention. These system-generated signals complement the explicit corrections from agents, creating a richer training dataset.
# The Curator runs periodically and:
# 1. Finds stale, never-recalled nodes
# 2. Re-evaluates their type classification
# 3. Generates reclassify signals for mismatches
# 4. Adjusts heat based on staleness
# This creates "free" training data -- corrections the system
# discovers on its own, without any agent intervention.Identifies stale nodes — memories that have never been recalled or have decayed below useful heat thresholds.
Runs SICU on flagged nodes to check if the current model would classify them differently. Mismatches become reclassify signals.
Generates reclassify signals with system-level confidence. These accumulate alongside agent signals for the next training run.
Training Pipeline
From accumulated signals to improved ONNX models
The training pipeline is deliberately offline. Signal accumulation is continuous, but model retraining happens on your schedule — when enough signals have built up to meaningfully improve the models. This keeps the production server lean (inference-only) while training runs on dedicated compute.
Agent Interactions
store(train=true) delete(train=true) pin boost reclassify
|
v
training_signals table
signal_type: accept | reject | reclassify
content_snapshot, source, confidence, corrected_type
-- accumulates over days/weeks --
|
+---------+---------+
v v
+----------------+ +----------------+
| Train SIVU | | Train SICU |
| Quality Gate | | Type Classif. |
| accept/reject | | reclassify |
+-------+--------+ +-------+--------+
| |
v v
+------------------------------------+
| ONNX Model Artifacts |
| sivu-v2.onnx sicu-v2.onnx |
+----------------+-------------------+
|
v
+------------------------------------+
| Hot-Swap Deploy |
| Filesystem watcher > auto-reload |
| Zero downtime. No restart needed. |
+----------------+-------------------+
|
v
+------------------------------------+
| Better Quality + Accuracy |
| feeds back into agent behavior |
+------------------------------------+01Export Accumulated Signals
Pull all accumulated signals from the training table via the REST API.
# Export accumulated training signals
curl -s https://api.sulcus.ca/api/v2/siu/training-data \
-H "Authorization: Bearer sk-..." \
| jq '.signals | length'
# Output: 2847 (signals ready for training)02Train SIVU (Quality Gate)
Uses accept/reject signals to improve the utility scorer. More signals = better discrimination between valuable content and noise.
# Train the quality gate model
python scripts/train_sivu.py \
--data signals.json \
--output models/sivu-v2.onnx \
--epochs 50 \
--validation-split 0.15
# Metrics:
# Accuracy: 94.2% (up from 89.1% baseline)
# Precision: 96.1% (false accepts down 43%)
# Recall: 91.8% (legitimate content preserved)03Train SICU (Type Classifier)
Uses reclassify signals to improve type classification accuracy. The procedural/semantic boundary typically sees the largest gains.
# Train the type classifier model
python scripts/train_sicu.py \
--data signals.json \
--output models/sicu-v2.onnx \
--epochs 50 \
--classes episodic,semantic,procedural,preference,fact
# Confusion matrix shows strongest improvement on
# procedural/semantic boundary (most common misclassification)Model Deployment
Hot-swap new models with zero downtime
Once new ONNX models are trained, deploying them is trivial. Copy the model files to the server's model directory and the filesystem watcher picks them up automatically — no restart required. The server validates the new models before swapping them in, ensuring zero risk of serving a corrupted or incompatible model.
# Deploy new ONNX models -- hot-swap, no restart needed
cp models/sivu-v2.onnx /opt/sulcus/models/siu-v2/
cp models/sicu-v2.onnx /opt/sulcus/models/siu-v2/
# Server detects new model files via filesystem watcher
# and loads them within 30 seconds -- zero downtime.
# Verify deployment:
curl https://api.sulcus.ca/api/v2/siu/status \
-H "Authorization: Bearer sk-..."
# { "sivu_model": "sivu-v2.onnx", "loaded_at": "2026-05-03T..." }Filesystem watcher detects new .onnx files and loads them within 30 seconds. No server restart. No downtime. No configuration change.
New models are validated before activation. If a model fails validation, the server continues using the previous version and logs the error.
Self-Improving Memory
The feedback loop that makes memory smarter over time
This is where it all comes together. The offline training pipeline creates a continuous improvement loop:
Agents use memory
Store, recall, delete, pin, reclassify — normal agent operations.
Signals accumulate
Every action generates training data in the signals table. The Curator adds more.
Models retrain offline
Export signals, train SIVU and SICU, produce new ONNX artifacts.
Models deploy with hot-swap
Copy models to the server directory. Zero downtime. Immediate improvement.
Better quality gate + classification
SIVU rejects more noise. SICU classifies more accurately. Agents get better results.
Cycle repeats
Better models produce better signals. The system compounds intelligence over time.
The key insight is that better models produce better signals. When SIVU gets better at rejecting noise, the remaining memories are higher quality, which means future accept signals are even more informative. When SICU gets better at classifying, the Curator generates fewer correction signals for correctly-typed content and more for genuine mismatches. The system compounds its own intelligence.
Enterprise Benefits
Train on your infrastructure, with your data, under your control
For enterprise deployments, the offline training pipeline runs entirely on your infrastructure. Training data never leaves your network. Models are produced and deployed within your own environment. This is not just a privacy feature — it is a competitive advantage.
Your models train on your data patterns. An enterprise running Sulcus for legal documents develops a quality gate tuned for legal content. A fintech company develops a classifier that understands financial memory patterns. The models become domain-specific without any manual tuning.
# Enterprise: run training on your own infrastructure
sulcus train \
--data-source postgres://your-db/sulcus \
--output ./models/ \
--sivu --sicu \
--min-signals 500 \
--validation-split 0.2
# Models stay on your infrastructure.
# Data never leaves your network.
# Deploy to your own Sulcus server instance.Training signals, model artifacts, and deployment all happen within your infrastructure. No data leaves your network at any point in the pipeline.
Models trained on your data patterns outperform generic models. Legal, finance, engineering — each domain develops its own quality gate and classifier.
Run training on your own GPU infrastructure, CI/CD pipelines, or scheduled batch jobs. Full control over when and how models are trained.
The longer you run Sulcus, the better it gets. Year-one models outperform baseline. Year-two models outperform year-one. The ROI compounds.
Memory that learns. Intelligence that compounds.
Start generating training signals today with train=true on your store and delete calls. Every signal makes the system smarter. Every training cycle raises the floor.