Omen, Instant-CLS & REM-Engram (Qwen3-0.6B Dual-Timescale Repo-Engram)
Author: Ryan Joshua Z. Gapac (ORCID: 0009-0004-2591-0219, ryanjoshuagapac.com)
Paper #2 DOI: 10.5281/zenodo.24607074 (Omen, Instant-CLS & REM-Engram)
Dataset: DevMortimer/GhostLocus-Bench
Series: System-One & Bio-Memory Research Series (Paper #2), directly extending Warden-S1 (DOI: 10.5281/zenodo.24494405).
License: Apache License, Version 2.0 (including the legally binding NOTICE file).
Overview
Omen, Instant-CLS & REM-Engram equips a frozen Qwen/Qwen3-0.6B backbone with a dual-timescale synaptic memory architecture that predicts untouched cross-file invariant breakages (ghost loci) from a raw git diff in a single forward pass:
- Wake Phase (Omen): Zero extra wake prompt tokens (
125.6raw diff tokens vs.872.4for top-8 BM25 RAG) and zero CoT decode tokens (67.0 msp50 wake latency on Tesla T4,2.85 msfour-head overhead). - Daytime Hippocampal Phase (Instant-CLS): Closed-form
fp32Hippocampal Fast-Matrix (0.633 MBfast weights +32.0 MBcovariance state,0backprop,0extra prompt tokens):- Sherman-Morrison Daytime Write (
1.04 msp50): Lifts mid-day new-rule Ghost R@1 and R@3 from0.0%to100.0%(243xfaster than Online SGD/LoRA) while matching batch ridge regression to3.2e-6. - Active-Anchor Orthogonal QR Surgical Unlearning (
2.71 msp50): Drops mid-day post-refactor Stale FPR from71.7%to1.7%(-70.0 ppvs. Nightly Bio-REM,p < 0.0001,267xfaster than Online SGD/LoRA) with98.9%Prior Active Retention and0.0active-anchor veto leak.
- Sherman-Morrison Daytime Write (
- Nightly Neocortical Sleep (Bio-REM): Compiles multi-day history into a 7.98 MB hot-swappable Repo-Engram (
4.38 MBrank-8 LoRA +3.60 MBparallel heads) in294.6 s +/- 14.9 sinside5,962.1 MiBVRAM via Stage-1 Counterfactual Twin Contrast + Hindsight-to-Foresight reverse-KL distillation (SDPG KL = 0.0208) and Stage-26:4:4CLS replay + NPO + SHY, then resetsW_hipp = 0.
Suite 1: 3-Seed x 6-Arm Nightly Consolidation (GhostLocus-Bench v2)
Evaluated across seeds 42, 137, 2026 (60 families across FastAPI, Hono, Pydantic, Vite, Zod; M = 80 files; 260 held-out Day-6 episodes; 0 lexical path leaks; homogeneous Tesla T4):
| Arm | Ghost R@1 | Ghost R@3 | Ghost MRR | Locus R@1 | Safe-Twin FPR (β) | Stale FPR (β) | Alarm AUROC | Wake Lat p50 (ms) | Wake Tokens |
|---|---|---|---|---|---|---|---|---|---|
| A: Amnesiac Zero-Shot | 5.0% +/- 0.0% | 10.8% +/- 0.0% | 0.1421 | 25.8% | 60.0% +/- 0.0% | 50.0% +/- 0.0% | 0.4476 +/- 0.0000 | 38.4 | 125.6 |
| B: Append-Only RAG (top-8) | 26.4% +/- 2.5% | 54.7% +/- 9.2% | 0.4562 | 44.4% | 33.3% +/- 12.6% | 37.8% +/- 30.9% | 0.6168 +/- 0.0658 | 115.0 | 872.4 |
| C: Naive Uniform Replay SFT | 91.4% +/- 6.9% | 98.3% +/- 1.4% | 0.9481 | 78.1% | 98.3% +/- 0.7% | 36.1% +/- 19.3% | 0.7183 +/- 0.0383 | 71.0 | 125.6 |
| D: Bio-REM Consolidation (Ours) | 97.5% +/- 0.8% | 99.2% +/- 0.0% | 0.9840 | 61.4% | 14.2% +/- 5.6% | 0.6% +/- 1.0% | 0.9063 +/- 0.0044 | 67.0 | 125.6 |
| D-noTwin (-Counterfactual Twin) | 99.2% +/- 1.4% | 100.0% +/- 0.0% | 0.9958 | 88.6% | 86.7% +/- 3.8% | 0.0% +/- 0.0% | 0.8165 +/- 0.0120 | 71.9 | 125.6 |
| D-noNPO (-Stage-2 REM NPO) | 91.7% +/- 6.5% | 98.9% +/- 1.9% | 0.9511 | 47.5% | 7.1% +/- 6.9% | 21.7% +/- 15.3% | 0.8056 +/- 0.0440 | 75.3 | 125.6 |
Suite 2: 3-Seed 24-Hour Continuous Repo Stream (Instant-CLS)
| 24h Stream Arm | 12:00 New R@1 | 12:00 New R@3 | 16:00 Stale FPR (β) | 16:00 Prior R@3 | 16:00 AUROC | 06:00 Post-Sleep R@1 | 06:00 Post-Sleep R@3 | 06:00 Stale FPR | Write p50 (ms) | Erase p50 (ms) | Extra Tok |
|---|---|---|---|---|---|---|---|---|---|---|---|
| RAG (Prompt Stuffing) | 0.0% | 1.7% | 57.2% | 77.2% | 0.5499 | 27.2% | 39.4% | 57.2% | 0.04 | 0.11 | +746.8 |
| Nightly Bio-REM Only | 0.0% | 1.1% | 71.7% | 100.0% | 0.6645 | 96.7% | 97.2% | 0.6% | Deferred | Deferred | 0.0 |
| Online SGD/LoRA | 11.1% | 23.3% | 0.0%* | 1.7% | 0.5033 | 87.8% | 98.1% | 6.1% | 253.62 | 723.73 | 0.0 |
| Instant-CLS (Ours) | 100.0% | 100.0% | 1.7% | 98.9% | 0.8837 | 94.7% | 97.8% | 2.2% | 1.04 | 2.71 | 0.0 |
Note: Online SGD/LoRA's 0.0% Stale FPR at 16:00 is total model collapse (0.0% Active TPR, 1.7% Prior R@3). At 06:00 after nightly consolidation and W_hipp = 0 reset, Instant-CLS achieves 7.9% Safe-Twin FPR (lowest of all arms) and 0.9051 AUROC.
Per-Ecosystem Active Ghost Recall (Arm D, M=80 Pool)
- FastAPI:
95.8%R@1 /95.8%R@3 - Hono:
97.2%R@1 /100.0%R@3 - Pydantic:
97.2%R@1 /100.0%R@3 - Vite:
97.2%R@1 /100.0%R@3 - Zod:
100.0%R@1 /100.0%R@3
Limitations
- Threshold calibration: Under
FP16backbone precision at the uncalibrated0.50threshold, Active Alarm TPR (68.1%) and Locus Top-1 (61.4%) are conservative relative to0.9063overall AUROC (0.9538AUROC vs. stale). Validation temperature/threshold calibration or nativeBF16consolidation recovers sensitivity without losing Safe-Twin precision. - Scale and daytime capacity: Evaluated at
M = 80candidate repository files andd = 2048daytime fast-weight feature space. Scaling beyond2,048distinct commits per day can adopt RanPAC-style random feature lifting before nightly consolidation.
Citation & Attribution
Any redistribution or derivative work must preserve the Apache-2.0 NOTICE file.
@techreport{gapac2026omenclsrem,
title = {Omen, Instant-CLS and REM-Engram: Dual-Timescale Subconscious Ghost Locus and Bio-Inspired Synaptic Memory for Evolving Codebases},
author = {Gapac, Ryan Joshua Z.},
year = {2026},
month = nov,
institution = {Independent Research}
}
@techreport{gapac2026wardens1,
title = {Warden-S1: A Sub-1 GiB, 128K-Context Local System-One Verifier for Long-Horizon Coding Agents},
author = {Gapac, Ryan Joshua Z.},
year = {2026},
month = nov,
institution = {Independent Research},
doi = {10.5281/zenodo.24494405}
}