VECTOR
An autonomous infrastructure system that monitors itself, contains its own failures, and narrows its own authority when it stops being certain.
- Python
- RSSM world model
- Multi-objective RL
- Real-time systems
VECTOR — Variable Environment Control Through Observation Response — began as a traffic intelligence system and became something with a wider remit: a real-time system that governs itself through an explicit escalation chain ending at a human being.
Traffic is still the first application. It is no longer the description.
The problem
The original problem was clean. Predict congestion, prioritise emergency vehicles, optimise flow in real time.
The problem that replaced it announced itself as the system grew: a smart model is worthless if it cannot survive failure. A traffic intelligence platform that goes dark during peak congestion is not merely inconvenient — it is dangerous. And the moments that decide whether infrastructure is safe are exactly the moments benchmark accuracy says nothing about: when the system is wrong, uncertain, degraded, or being fed bad data.
That reframes what needs building. Not a better decision-maker. A structure inside which a decision-maker can be trusted to run unattended — bounded, interruptible, accountable, and capable of reducing its own authority when conditions stop being legible.
The approach
Two layers, built in that order, and the order is the design.
The governance stack came first — eight protocols forming one escalation chain. Sentinel detects anomalies. Serpentine classifies system stress across five levels. Aegis contains failures before they cascade. Atlas rebalances load. Punisher repairs, governed by a credit budget that makes it progressively more conservative as failures accumulate. Phoenix orchestrates recovery. Hyperion is an emergency shutdown that fires within a second with no cleverness in it at all. Terminus is the permanent stop, and orchestrators, agents and internal services are explicitly blocked from invoking it — it requires a human at a physical console.
The intelligence layer was allowed on top only once that was proven. Anarchy runs bounded what-if simulations on specific triggers. ORACLE predicts futures in latent space rather than simulating them. MORL handles objectives that genuinely conflict. PULSAR makes small reversible corrections. Fusion coordinates them under safety gates, and Meta adapts the whole thing slowly, and only when conditions are stable enough to justify adapting at all.
Above both sits VIHAAN, the authority layer, which escalates deterministically from normal through warning and critical to activation — and on activation strips the system back to its deterministic baseline before reintroducing intelligence in stages.
Architecture
The pipeline:
Input → Sentinel → Serpentine → Anarchy → ORACLE → MORL → PULSAR → Fusion → Meta → Output
Detection and classification run before any intelligence does — the system establishes how stressed it is before deciding how ambitious to be.
Four principles hold it together. Bounded everything: every stage has a hard time cap and exits rather than running long, because a late decision in infrastructure is a failed decision under another name. Intelligence is subordinate to safety: the control plane is immutable and no amount of model confidence widens the envelope. Tail risk is first-class: p95 and p99 are optimised alongside the average, because an average latency means nothing if the tail is catastrophic. Autonomy is earned: under sustained uncertainty the system narrows its own freedom and restores it only against evidence.
The most important structural property is that the deterministic controller built before any learning is still maintained as a first-class component. It is not scaffolding. It is the floor everything falls back to when VIHAAN activates, which is why the system never faces a choice between doing something clever and doing nothing.
Results
v1 completed a two-hour adversarial stress test across more than 647,000 cycles: zero failures, zero crashes, zero dropped events on the bus, zero ordering violations, and 6.17 ms p95 under sustained adversarial load. A shorter profiling snapshot measured 0.607 ms average, 1.124 ms p95, 1.634 ms p99, 1.908 ms maximum, with 32 of 32 regression tests passing.
Those numbers were bought once, in a single fix. An early profile sat near 100 ms p95 with tail spikes that made the system unusable. Profiling found Sentinel — the simplest component, written first and trusted longest — consuming roughly 97% of runtime through unbounded statistical work at the head of the pipeline. Rolling-window O(1) statistics, a 5 ms hard cap, heavy analysis moved to bounded background tasks, and per-stage budget enforcement across the pipeline took it to real-time.
What is not done: SUMO training and a real pilot. Until a system has met an environment it did not anticipate, its numbers describe a laboratory.
Lessons learned
- Find the bottleneck before optimising anything. Six weeks went into components that were not the problem. Suspicion should follow measurement, not architecture — cost does not care how sophisticated a component looks.
- Unbounded is the defect, not slow. Sentinel was fine on average. It was unbounded, so its worst case was unrelated to its typical case, and in a real-time system the worst case is the specification.
- Build the floor before the ceiling. The deterministic controller existed before any model did, which means every learned component has something to beat and every degradation path has somewhere defined to land.
- A system that cannot stop is not autonomous, it is unsupervised. Hyperion and Terminus are the least clever components in the project and the ones I would keep if I had to discard everything else.
- The name is load-bearing. EXTREMIS kept pulling explanations back toward traffic long after the system had outgrown it, and that was shaping the architecture rather than just the conversation.
- An accident is not evidence. Rajasthan is why I returned to this problem and proves nothing about signal timing. Keeping those two statements apart is a discipline I had to learn deliberately.