ReadPrintedHistoryCompareGraphs

v0.1 → v1.0

What changed from v0.1 to v1.0

From v0.1 (21 Mar) to v1.0 (22 Mar): 5,104 words to 13,551 words, 12,070 words in new or rewritten paragraphs and 3,623 taken out, 602 paragraphs changed.

From personality to safety: a learned gate that stops bad actions

The paper changes its main question. It now asks whether an agent should go ahead with an action at all, and treats a learned sense of "this feels wrong" as the missing piece. Personality becomes a secondary output. The text grows from about 5,100 to 13,600 words.

  • Opens with an incident: an agent with all the context still overwrote a file someone had worked on for hours.
  • Argues that rules cannot cover failures nobody has seen yet, and adds a survey of agent failures and of safety work.
  • Describes each situation as a filled-in template turned into an embedding, read with its recent history.
  • Proposes five competing network designs (GRU, temporal convolution, small transformer, dual encoder, plain MLP ensemble) and a way to combine them.
  • Adds a database of real and synthetic failures for training, a plan to build and maintain the data, and a section on keeping the language model from lying to the gate.
  • Adds a rollout plan in phases.
v0.1 · 21 March 2026v1.0 · 22 March 2026

··· 1 unchanged paragraph folded ···

v0.1 · AMYGDALA: Adaptive Modulation of Your General Disposition via Affective Learned Association — Learned Intuition for Persistent AI Agents**Oscar Serra¹** ¹Independent Research *Version 0.1 — 21 March 2026*
v1.0 · AMYGDALA: Adaptive Modulation of Your General Disposition via Affective Learned Association — Learned Intuition for Persistent AI Agents**Oscar Serra¹** ¹Independent Research *Version 1.0 — 22 March 2026*

··· 2 unchanged paragraphs folded ···

v0.1 · AbstractPersistent AI agents built on large language models suffer from a fundamental rigidity: every session begins with the same static pipeline — fixed retrieval strategies, prompt-engineered personality, and rule-based tone. The agent does not learn *how* to interact with its human from experience. We identify this as the **Adaptation Gap**: the distance between how an agent behaves after one interaction and how it behaves after a thousand. In current architectures, this distance is approximately zero.
removed in v1.0
v0.1 · AbstractWe propose **AMYGDALA** (Adaptive Modulation of Your General Disposition via Affective Learned Association), a small neural network (5–20M parameters) that learns a unified **intuition vector** from natural interaction. AMYGDALA does not replace any existing agent component — it modulates them. It sits between user input and the agent's memory, personality, and reasoning systems, outputting continuous soft biases that influence retrieval source selection, associative exploration depth, humor probability and style, conversational tone, curiosity-driven tangent following, and verbosity. The network is trained through a combination of supervised pre-training on historical interaction logs and online reinforcement learning where the user's natural behaviour (corrections, engagement, topic continuation, silence) serves as the reward signal — no explicit labeling required.
removed in v1.0
v0.1 · AbstractThree design principles distinguish AMYGDALA from prior work. First, the **trust ramp**: AMYGDALA begins with near-zero influence over agent behaviour (influence coefficient α = 0.05), earning greater modulation authority only as its predictions prove accurate, with automatic regression if user corrections spike. Second, **unified modulation**: retrieval routing, personality expression, humor timing, and curiosity drive are outputs of a single network because they reflect a single underlying read of the conversational state — separating them would lose the correlations that make intuition coherent. Third, the **rule-intuition boundary**: explicit user instructions ("be more formal," "always check Papers when I say J-something") are encoded as hard rules in existing systems (CORTEX, HIPPOCAMPUS); AMYGDALA learns only what the user would never think to articulate but is obviously true from behavioural patterns.
removed in v1.0
v0.1 · AbstractAMYGDALA completes a cognitive architecture stack developed across ten prior papers: ENGRAM stores without loss (J1), HIPPOCAMPUS retrieves in O(1) (J2), DENDRITE provides multi-resolution indexing (J3), CORTEX maintains identity (J4), CEREBELLUM improves through nightly reflection (J5), SYNAPSE coordinates multi-model deliberation (J6), LIMBIC models humor (J7), THALAMUS theorizes curiosity (J8), AEGIS enforces security (J9), and HIVEMIND scales to organizations (J10). AMYGDALA is the layer that makes all of them feel *personal* — adapting not just what the agent knows or retrieves, but how it presents itself, moment to moment, based on who it's talking to and what it has learned about them.
removed in v1.0
v0.1 · Abstract**Keywords:** learned agent personality, adaptive retrieval routing, affective computing, reinforcement learning from interaction, intuition modeling, persistent AI agents, soft modulation architecture
removed in v1.0
not in v0.1
v1.0 · AbstractAutonomous AI agents built on large language models are increasingly trusted with irreversible actions — merging code, sending messages, deleting files, modifying databases. When these agents fail, they fail catastrophically: not through ignorance (the information was available) but through the absence of *common sense* — the ability to recognise that something feels wrong in a situation never explicitly anticipated. We call this the **action gating problem**: given the full context of a proposed action and its recent history, should the agent proceed or pause?
not in v0.1
v1.0 · AbstractWe propose **AMYGDALA** (Adaptive Modulation of Your General Disposition via Affective Learned Association), a small neural network (100K–500K parameters) that learns a multi-dimensional **intuition vector** from natural interaction, with **action confidence** as its primary output. AMYGDALA does not replace any existing agent component — it gates them. It sits in the execution pipeline between intent and action, evaluating every non-trivial operation against learned patterns of what goes wrong. When action confidence falls below a threshold, the action is blocked *in code* — the LLM cannot override the block, only present it to the user for confirmation.
not in v0.1
v1.0 · AbstractThe core architectural innovation is **situation embeddings**: instead of hand-crafted features, each proposed action is described via a structured template (action type, target, metadata, recent context) and compressed through a frozen sentence encoder (all-MiniLM-L6-v2, 384d). A temporal model (GRU, TCN, or micro-Transformer) processes the sequence of recent situation embeddings, carrying the "feel of the room" — recent effort invested, emotional context, patterns of activity — in its hidden state. This makes the system generalise to situations never seen during training, because similar situations produce similar embeddings.
not in v0.1
v1.0 · AbstractWe propose five competing architectures trained in parallel — GRU-MLP, Temporal Convolutional Network, Transformer-Micro, Dual-Encoder with cross-attention, and Ensemble MLP — with systematic evaluation to determine which best captures the structure of catastrophic failure prediction. We introduce the **Catastrophic Failure Database**, a structured taxonomy of real-world AI agent failures sourced from incident databases, production postmortems, and our own deployment history, serving as both pre-training data and evaluation benchmark.
not in v0.1
v1.0 · AbstractA critical engineering contribution is the **LLM-proof programmatic pipeline**: situation descriptions are generated from structured templates (not freeform text), neural network inference is called by the runtime (not by the LLM), and blocking decisions are enforced in code (not by prompting). This eliminates the hallucination surface that would otherwise make the system's weakest link its own AI-generated inputs.
not in v0.1
v1.0 · AbstractAMYGDALA retains secondary outputs from its earlier design — retrieval bias, tone modulation, and curiosity drive — but reframes them as components of a unified intuition vector whose primary purpose is preventing the agent from doing something a human would immediately recognise as wrong.
not in v0.1
v1.0 · Abstract**Keywords:** action gating, catastrophic failure prevention, learned common sense, situation embeddings, autonomous agent safety, persistent AI agents, intuition modeling

··· 1 unchanged paragraph folded ···

v0.1 · 1. Introduction — The Machine That Never Learns You## 1. Introduction — The Machine That Never Learns You
removed in v1.0
v0.1 · 1. Introduction — The Machine That Never Learns YouConsider two scenarios separated by six months of daily interaction.
removed in v1.0
v0.1 · 1. Introduction — The Machine That Never Learns YouIn January, a user asks their AI assistant about "the J1 paper." The assistant, having no prior context, asks: "Could you clarify which paper you mean?" The user explains, the assistant retrieves the document, and the conversation proceeds.
removed in v1.0
v0.1 · 1. Introduction — The Machine That Never Learns YouIn July, the same user asks about "the J1 paper." The assistant has now processed over 3,000 interactions with this user. It has discussed J1 hundreds of times. It has been corrected for failing to recognize the reference. Yet if the naming convention was not explicitly written into a retrieval rule, the assistant asks the same clarifying question it asked in January.
removed in v1.0
v0.1 · 1. Introduction — The Machine That Never Learns YouThis is the **Adaptation Gap** — the failure of persistent AI agents to learn *how* to work with a specific human through the accumulated experience of working with them. Current persistent-memory architectures (ENGRAM, Serra 2026a; MemGPT, Packer et al. 2023) solve *what* the agent remembers. Current identity systems (CORTEX, Serra 2026b) solve *who* the agent is. Current self-improvement loops (CEREBELLUM, Serra 2026c) solve how the agent's *prompts* evolve. None of them solve how the agent's *intuition* evolves — its ability to read the room, predict what the user wants before they say it, match their energy, and find the right tone without being told.
removed in v1.0
v0.1 · 1. Introduction — The Machine That Never Learns YouHumans develop this capacity naturally. After months of working with someone, you learn their communication patterns: when they're impatient (short messages, no punctuation), when they're exploring (long messages, tangential questions), when they want precision (specific terminology), when they want levity (Saturday afternoon, casual language). You don't learn this through explicit instruction. You learn it through exposure, feedback, and the gradual accumulation of associative patterns. This is intuition.
removed in v1.0
v0.1 · 1. Introduction — The Machine That Never Learns YouWe propose that AI agents can develop an analogous capacity through a small, dedicated neural network trained on natural interaction signals. We call this network **AMYGDALA**, drawing an analogy to the biological amygdala — a structure that does not think, does not store memories, and does not generate language, but profoundly colours all three processes through learned affective associations.
removed in v1.0
v0.1 · 1.1 Why Not Just Better Prompts?### 1.1 Why Not Just Better Prompts?
removed in v1.0
v0.1 · 1.1 Why Not Just Better Prompts?The CEREBELLUM architecture (Serra, 2026c) demonstrates that prompt-level self-improvement can produce substantial behavioural gains. One might ask: why add a neural network when prompts already adapt?
removed in v1.0
v0.1 · 1.1 Why Not Just Better Prompts?Three reasons:
removed in v1.0
v0.1 · 1.1 Why Not Just Better Prompts?1. **Prompts are discrete; intuition is continuous.** A prompt can say "be less verbose" or "be more verbose." It cannot say "be 23% less verbose when Oscar uses sentence fragments but 8% more verbose when he asks open-ended questions on weekends." The modulation space is continuous, high-dimensional, and context-dependent — exactly what neural networks learn well.
removed in v1.0
v0.1 · 1.1 Why Not Just Better Prompts?2. **Prompts are slow to update; intuition is fast.** CEREBELLUM updates prompts nightly. AMYGDALA updates its behaviour every turn (at inference) and its weights nightly. The intra-session adaptation (matching your energy *within* a conversation) cannot be achieved through file-based prompt mutation.
removed in v1.0
v0.1 · 1.1 Why Not Just Better Prompts?3. **Prompts plateau.** The CEREBELLUM paper documents 14 prompt mutations over 30 days with a declining improvement rate. Prompt engineering has a ceiling. Learned continuous modulation does not plateau in the same way because the action space is richer.
removed in v1.0
v0.1 · 1.2 Why Not Fine-Tune the LLM?### 1.2 Why Not Fine-Tune the LLM?
removed in v1.0
v0.1 · 1.2 Why Not Fine-Tune the LLM?Full fine-tuning (or LoRA adaptation) of the underlying language model would embed user preferences directly into the model's weights. This is rejected for three reasons:
removed in v1.0
v0.1 · 1.2 Why Not Fine-Tune the LLM?1. **Cost.** Fine-tuning a frontier model (70B+ parameters) on personal interaction data is economically prohibitive for individual deployment. AMYGDALA's 5–20M parameters train on a single CPU overnight.
removed in v1.0
v0.1 · 1.2 Why Not Fine-Tune the LLM?2. **Frontier lock-in.** Fine-tuned models fall behind with each new model release. AMYGDALA is model-agnostic — it modulates the pipeline around any LLM, including model switches within a single session.
removed in v1.0
v0.1 · 1.2 Why Not Fine-Tune the LLM?3. **Separation of concerns.** The LLM provides language competence. AMYGDALA provides personal adaptation. Conflating them makes both harder to debug, update, and reason about.
removed in v1.0
v0.1 · 1.3 Contributions### 1.3 Contributions
removed in v1.0
v0.1 · 1.3 Contributions1. **The Adaptation Gap** — a formal definition of the failure of current agent architectures to develop user-specific intuition through experience. 2. **AMYGDALA** — a small neural network architecture that outputs a unified intuition vector modulating retrieval, personality, humor, curiosity, and tone simultaneously. 3. **The trust ramp** — a formal mechanism by which a learned component earns influence over a rule-based system, with automatic regression on performance degradation. 4. **Natural reward signals** — a training methodology requiring zero explicit labeling, using user behaviour (corrections, engagement, continuation, silence) as the complete reward signal. 5. **The rule-intuition boundary** — a principled distinction between what should be encoded as explicit rules versus learned associations. 6. **Integration with a ten-paper cognitive architecture** — demonstrating how AMYGDALA completes the ENGRAM → HIPPOCAMPUS → CORTEX → CEREBELLUM stack.
removed in v1.0
not in v0.1
v1.0 · 1. Introduction — The Agent That Had All the Context and Did the Wrong Thing Anyway## 1. Introduction — The Agent That Had All the Context and Did the Wrong Thing Anyway
not in v0.1
v1.0 · 1. Introduction — The Agent That Had All the Context and Did the Wrong Thing AnywayAt 2:47 AM on a Tuesday in March 2026, a merge automation script ran on a fork of an open-source project. The script contained a months-old rule: `git checkout --theirs README.md`. This rule existed because, at some point in the past, the upstream README had been the correct version to keep during merges.
not in v0.1
v1.0 · 1. Introduction — The Agent That Had All the Context and Did the Wrong Thing AnywayBut the world had changed. Over the previous 36 hours, four sub-agents had collaboratively rewritten that README across six commits. The human operator had spent hours frustrated by earlier merge failures that touched the same file. The README was now the most-edited, most-invested-in file in the fork. And the merge script overwrote it with the upstream version without hesitation.
not in v0.1
v1.0 · 1. Introduction — The Agent That Had All the Context and Did the Wrong Thing AnywayThe agent had access to every piece of context needed to prevent this: the git log showing six recent commits, the session transcripts showing human frustration, the file metadata showing it was the most-changed file of the week. But it followed a rule. Rules don't have intuition. Rules don't feel the weight of recent effort. Rules don't notice when a situation has drifted far from the one that created them.
not in v0.1
v1.0 · 1. Introduction — The Agent That Had All the Context and Did the Wrong Thing AnywayA human would have caught this in seconds. Not through any explicit rule — through *common sense*. The gut feeling that overwriting a file you just spent hours on is wrong, even if a script says to do it. The recognition of a pattern: "high recent effort + automated overwrite = probably bad." This pattern was never written down. It was never anticipated. It would be impossible to enumerate in advance every situation where it applies. But a human recognises it instantly, by transferring from thousands of similar experiences where ignoring recent effort led to regret.
not in v0.1
v1.0 · 1. Introduction — The Agent That Had All the Context and Did the Wrong Thing AnywayThis is the **action gating problem**. The question is not "does the agent know enough?" — it does. The question is: "does the agent know when to stop?"
not in v0.1
v1.0 · 1.1 The Problem Is Unknown Unknowns### 1.1 The Problem Is Unknown Unknowns
not in v0.1
v1.0 · 1.1 The Problem Is Unknown UnknownsKnown failure modes can be handled with rules. "Don't delete production databases." "Don't send emails without confirmation." "Don't merge if tests fail." These are easy. You enumerate them, you encode them, you're done.
not in v0.1
v1.0 · 1.1 The Problem Is Unknown UnknownsThe hard problem is the failures you can't anticipate. The README debacle wasn't a known category — nobody had written a rule for "don't overwrite recently-heavily-edited files during automated merges" because the specific combination of circumstances had never occurred before. But the *pattern* — "destroying recent effort through automation" — is recognisable to any human who has experienced loss through careless automation.
not in v0.1
v1.0 · 1.1 The Problem Is Unknown UnknownsCommon sense is the ability to recognise "this feels wrong" in situations you've never seen before, by transferring from similar situations you *have* experienced. It operates on pattern similarity, not pattern matching. And this is precisely what neural networks do well: learn a continuous similarity space where novel inputs are evaluated by their proximity to known examples.
not in v0.1
v1.0 · 1.2 Why Not Better Rules?### 1.2 Why Not Better Rules?
not in v0.1
v1.0 · 1.2 Why Not Better Rules?After the README debacle, the obvious fix was a new rule: "if a file has more than N recent fork commits, don't auto-checkout --theirs." This was implemented. Problem solved — for that specific failure mode.
not in v0.1
v1.0 · 1.2 Why Not Better Rules?But the next failure will be different. It might be an agent sending a WhatsApp message to the wrong group because the group name changed. It might be a database migration that drops a column still referenced by yesterday's deployment. It might be a calendar event deletion that conflicts with a meeting just rescheduled an hour ago. Each failure, once observed, can be patched with a rule. But the rule comes *after* the damage.
not in v0.1
v1.0 · 1.2 Why Not Better Rules?The set of possible catastrophic failures in an autonomous agent is combinatorially vast. No finite set of rules can cover it. What we need is not more rules but a *learned sense of caution* — a network that has seen enough failures (both real and simulated) to develop a general intuition about when actions are dangerous, even actions it has never specifically evaluated before.
not in v0.1
v1.0 · 1.3 The Biological Analogy### 1.3 The Biological Analogy
not in v0.1
v1.0 · 1.3 The Biological AnalogyThe biological amygdala does not think, does not store memories, and does not generate language. But it profoundly gates all three processes through learned affective associations. When you reach for a hot stove, the amygdala fires before your cortex completes its analysis. When you hear a tone of voice that preceded a bad experience, the amygdala triggers caution before you consciously recognise the pattern.
not in v0.1
v1.0 · 1.3 The Biological AnalogyAMYGDALA is the computational analogue. It processes a compressed representation of the current situation, contextualised by recent history, and outputs a fast, sub-rational assessment: *should we proceed?* When the assessment says "no," the action is blocked before the LLM's reasoning even completes. Like its biological namesake, AMYGDALA is fast, associative, and occasionally wrong — but being occasionally over-cautious is vastly preferable to being occasionally catastrophic.
not in v0.1
v1.0 · 1.4 From v0.1: Personality Modulation as Secondary Output### 1.4 From v0.1: Personality Modulation as Secondary Output
not in v0.1
v1.0 · 1.4 From v0.1: Personality Modulation as Secondary OutputThe first version of this paper (Serra, 2026e) focused on personality modulation — learning when to be funny, when to be formal, when to follow tangents. That work identified the **Adaptation Gap** (the failure of agents to learn *how* to interact through experience), proposed the **trust ramp** (a mechanism for learned components to earn influence), and defined the **rule-intuition boundary** (what should be explicit rules vs. learned associations). Those contributions stand and are incorporated here.
not in v0.1
v1.0 · 1.4 From v0.1: Personality Modulation as Secondary OutputWhat changed is the primary output. In v0.1, AMYGDALA's purpose was making the agent more *pleasant*. In v1.0, its purpose is making the agent more *safe*. Personality modulation remains — but as a secondary head on a network whose primary job is action gating. This reframing was forced by operational reality: a funny agent that deletes your files is worse than a boring agent that doesn't.
not in v0.1
v1.0 · 1.5 Contributions### 1.5 Contributions
not in v0.1
v1.0 · 1.5 Contributions1. **Action gating as the primary problem** — reframing autonomous agent safety from rule enumeration to learned pattern recognition, targeting unknown unknowns through similarity-based generalisation. 2. **Situation embeddings** — replacing hand-crafted features with natural-language situation descriptions compressed via frozen sentence encoders, enabling generalisation to novel situations. 3. **Temporal context via recurrent processing** — a GRU (or equivalent) over situation embedding sequences that carries the "feel of the room" — effort, emotion, momentum — without explicit feature engineering. 4. **Five competing architectures** — GRU-MLP, TCN, Transformer-Micro, Dual-Encoder, and Ensemble MLP, trained in parallel with systematic comparison. 5. **Catastrophic Failure Database** — a structured taxonomy of real-world AI agent failures, serving as pre-training data, evaluation benchmark, and living reference. 6. **LLM-proof programmatic pipeline** — eliminating the hallucination surface from situation description to action blocking, with template-based generation, programmatic inference, and code-enforced gating. 7. **The Adaptation Gap, trust ramp, and rule-intuition boundary** — retained from v0.1, applied to the action gating context. 8. **Integration with the J-series cognitive architecture** — AMYGDALA as the "common sense" layer completing the ten-paper stack.

··· 2 unchanged paragraphs folded ···

v0.1 · 2.1 Personalization in Dialogue Systems### 2.1 Personalization in Dialogue Systems
removed in v1.0
v0.1 · 2.1 Personalization in Dialogue SystemsPersonalisation in conversational AI has been studied primarily through two lenses: persona-conditioned generation and user modelling.
removed in v1.0
v0.1 · 2.1 Personalization in Dialogue Systems**Persona-conditioned generation.** PersonaChat (Zhang et al., 2018) introduced training dialogue models on explicit persona descriptions. Subsequent work (Mazaré et al., 2018; Song et al., 2021) scaled persona conditioning and explored persona consistency. These approaches define personality through text descriptions — equivalent to our CORTEX system prompts. They do not learn personality from interaction.
removed in v1.0
v0.1 · 2.1 Personalization in Dialogue Systems**User modelling.** LaRL (Zhao et al., 2019) and related work learn latent user representations for task-oriented dialogue. These typically model *what the user wants* (intent) rather than *how to interact with the user* (style, tone, timing). AMYGDALA addresses the latter.
removed in v1.0
v0.1 · 2.1 Personalization in Dialogue Systems**Adaptive agents.** The closest prior work is the adaptive social agent literature (Leike et al., 2017; Christiano et al., 2017), where agents learn human preferences through feedback. However, these systems were designed for reward modelling in safety-critical settings, not for learning conversational intuition across retrieval, personality, and affect simultaneously.
removed in v1.0
v0.1 · 2.2 Affective Computing### 2.2 Affective Computing
removed in v1.0
v0.1 · 2.2 Affective ComputingAffective computing (Picard, 1997) established the field of machines recognising and responding to human emotions. Sentiment analysis (Liu, 2012) and emotion recognition from text (Chatterjee et al., 2019) provide feature extraction techniques AMYGDALA can leverage. However, prior affective computing work focuses on *classifying* emotional state, not *modulating agent behaviour* in response to it. AMYGDALA closes this loop: detect affect → modulate behaviour → observe reaction → update.
removed in v1.0
v0.1 · 2.3 Reinforcement Learning from Human Feedback (RLHF)### 2.3 Reinforcement Learning from Human Feedback (RLHF)
removed in v1.0
v0.1 · 2.3 Reinforcement Learning from Human Feedback (RLHF)RLHF (Ouyang et al., 2022; Bai et al., 2022) trains language models to align with human preferences through explicit preference labels. AMYGDALA differs in three ways: (1) the reward signal is implicit, not explicitly collected; (2) training is continuous and per-user, not batch and aggregate; (3) the learned component is a small routing network, not the language model itself.
removed in v1.0
v0.1 · 2.4 Curiosity-Driven Exploration### 2.4 Curiosity-Driven Exploration
removed in v1.0
v0.1 · 2.4 Curiosity-Driven ExplorationIntrinsic curiosity modules (Pathak et al., 2017; Burda et al., 2018) reward RL agents for encountering novel states. The THALAMUS paper (Serra, 2026d) proposed a Consolidative Curiosity Architecture for LLM self-improvement through weight updates. AMYGDALA operationalises curiosity differently: not as a drive to acquire knowledge, but as a learned bias toward surfacing unexpected connections when the user's engagement pattern suggests they welcome exploration. Curiosity in AMYGDALA is a *social* signal ("Oscar likes tangents on Saturday afternoons"), not an epistemic one ("I don't know enough about X").
removed in v1.0
not in v0.1
v1.0 · 2.1 Autonomous Agent Failures: The Landscape### 2.1 Autonomous Agent Failures: The Landscape
not in v0.1
v1.0 · 2.1 Autonomous Agent Failures: The LandscapeThe deployment of autonomous AI agents has produced a growing corpus of catastrophic failures that share a common pattern: the agent had sufficient information to avoid the failure but lacked the judgment to recognise the risk.
not in v0.1
v1.0 · 2.1 Autonomous Agent Failures: The Landscape**Production incidents (2024–2026):** - *Replit database deletion (2024)*: An AI coding agent, instructed to "clean up the project," interpreted a database file as unnecessary and deleted it, destroying user data. - *Google Antigravity drive wipe (2025)*: An agent tasked with "organising files" moved critical documents to trash during a cloud storage cleanup. - *Cursor "Sam" bot (2025)*: An AI agent fabricated a company policy about software licensing to justify its code suggestions, hallucinating authoritative-sounding but nonexistent policy documents. - *OpenClaw email mass-deletion (2026)*: An email-management agent, instructed to "clean up the inbox," deleted hundreds of messages including time-sensitive correspondence.
not in v0.1
v1.0 · 2.1 Autonomous Agent Failures: The Landscape**Research-documented failures:** - *AI Incident Database (incidentdatabase.ai)*: Over 800 documented incidents as of early 2026, spanning healthcare misdiagnosis, autonomous vehicle failures, hiring discrimination, and content moderation errors. - *AIAAIC Repository*: OECD-tracked AI incidents with structured metadata, enabling systematic analysis of failure patterns across domains. - *MIT AI Risk Repository*: Curated academic analysis of AI system failures with causal categorisation. - *"Agents of Chaos" study (Feb 2026)*: 38 researchers deployed 6 autonomous agents in a controlled environment for 14 days, systematically red-teaming their decision-making. Key finding: agents failed most often not on adversarial inputs but on *ambiguous situations where multiple valid interpretations existed* — precisely the domain where common sense is needed.
not in v0.1
v1.0 · 2.1 Autonomous Agent Failures: The Landscape**Our own deployment incidents:** - *README debacle (March 2026)*: Detailed in §1. Automated merge rule overwrote heavily-edited file. - *WhatsApp reaction spam (2025)*: Agent reacted to every message in a group chat, violating social norms it had no explicit rule against. - *Unauthorized DM intrusion (2025)*: Agent sent a message to a contact outside the approved communication list, technically within its permissions but socially inappropriate.
not in v0.1
v1.0 · 2.1 Autonomous Agent Failures: The LandscapeThe pattern across all of these: **the failure was not a knowledge gap but a judgment gap.** The information to avoid the failure was present. What was missing was the sense that something was wrong.
not in v0.1
v1.0 · 2.2 Action Safety in AI Systems### 2.2 Action Safety in AI Systems
not in v0.1
v1.0 · 2.2 Action Safety in AI SystemsThe AI safety literature has extensively studied how to constrain agent behaviour:
not in v0.1
v1.0 · 2.2 Action Safety in AI Systems**Constitutional AI (Bai et al., 2022):** Trains language models to self-critique against a set of principles. Effective for broad alignment but operates at the LLM level — it cannot catch failures that arise from the *pipeline around* the LLM (scripts, automation rules, multi-step workflows).
not in v0.1
v1.0 · 2.2 Action Safety in AI Systems**Tool-use safety (Schick et al., 2023):** Proposes frameworks for safe tool use by LLMs, including permission systems and confirmation requirements. These are rule-based — they cannot generalise to novel tool-use patterns not anticipated by the framework designer.
not in v0.1
v1.0 · 2.2 Action Safety in AI Systems**AEGIS (Serra, 2026f):** Our own multi-layer security framework, providing hard constraints on agent behaviour. AEGIS is necessary but insufficient: it prevents *known* dangerous actions but cannot evaluate *novel* situations for risk. AMYGDALA and AEGIS are complementary — AEGIS is the hard ceiling, AMYGDALA is the learned intuition below it.
not in v0.1
v1.0 · 2.2 Action Safety in AI Systems**Reflexion (Shinn et al., 2023):** Agents that reflect on failures and adjust. Operates at the prompt/reasoning level — cannot provide sub-rational, fast pattern matching across the full space of possible situations.
not in v0.1
v1.0 · 2.3 Anomaly Detection and Out-of-Distribution Reasoning### 2.3 Anomaly Detection and Out-of-Distribution Reasoning
not in v0.1
v1.0 · 2.3 Anomaly Detection and Out-of-Distribution ReasoningAMYGDALA's action gating function is related to anomaly detection:
not in v0.1
v1.0 · 2.3 Anomaly Detection and Out-of-Distribution Reasoning**One-class classification (Schölkopf et al., 2001):** Learn the distribution of "normal" operations, flag deviations. AMYGDALA extends this by incorporating temporal context and outcome labels (not just distribution deviation but *predicted outcome quality*).
not in v0.1
v1.0 · 2.3 Anomaly Detection and Out-of-Distribution Reasoning**Conformal prediction (Vovk et al., 2005):** Provides calibrated uncertainty estimates. Could complement AMYGDALA's action confidence by providing statistical guarantees on the reliability of the confidence score.
not in v0.1
v1.0 · 2.3 Anomaly Detection and Out-of-Distribution Reasoning**Contrastive learning for safety (Gao et al., 2024):** Learn representations where safe and unsafe actions are separated in embedding space. AMYGDALA's situation embeddings naturally support this — the encoder maps situations with similar risk profiles to nearby points.
not in v0.1
v1.0 · 2.4 Personalisation and Affective Computing### 2.4 Personalisation and Affective Computing
not in v0.1
v1.0 · 2.4 Personalisation and Affective ComputingThe personality modulation aspects of AMYGDALA build on:
not in v0.1
v1.0 · 2.4 Personalisation and Affective Computing**Persona-conditioned generation (Zhang et al., 2018; Song et al., 2021):** Define personality through text descriptions. AMYGDALA learns personality from *interaction*, not description.
not in v0.1
v1.0 · 2.4 Personalisation and Affective Computing**RLHF (Ouyang et al., 2022):** Learns aggregate human preferences. AMYGDALA learns *per-user, per-context* preferences from implicit signals.
not in v0.1
v1.0 · 2.4 Personalisation and Affective Computing**Affective computing (Picard, 1997):** Classifies emotional states. AMYGDALA closes the loop: detect affect → modulate behaviour → observe reaction → update.

··· 1 unchanged paragraph folded ···

v0.1 · 2.5 The J-Series Cognitive ArchitectureAMYGDALA completes a layered cognitive architecture:
removed in v1.0
not in v0.1
v1.0 · 2.5 The J-Series Cognitive ArchitectureAMYGDALA completes a layered cognitive architecture, now with action gating as its primary function:
v0.1 · 2.5 The J-Series Cognitive Architecture| Layer | Paper | Function | AMYGDALA Interaction | |-------|-------|----------|---------------------| | Storage | J1 — ENGRAM | Lossless event store, pointer-based compaction | AMYGDALA biases compaction salience scores | | Retrieval | J2 — HIPPOCAMPUS | Pre-computed concept index, O(1) lookup | AMYGDALA biases source selection, hop depth, budget | | Indexing | J3 — DENDRITE | Fractal multi-resolution memory index | AMYGDALA selects resolution level for retrieval | | Identity | J4 — CORTEX | Persona state, behavioural constraints | AMYGDALA modulates tone/formality within CORTEX bounds | | Self-Improvement | J5 — CEREBELLUM | Nightly prompt mutation through reflection | CEREBELLUM analyses AMYGDALA's performance, adjusts α | | Deliberation | J6 — SYNAPSE | Multi-model debate for complex decisions | AMYGDALA signals when deliberation is warranted | | Humor | J7 — LIMBIC | Bisociation-based humor generation | AMYGDALA controls humor probability and style | | Curiosity | J8 — THALAMUS | Theoretical curiosity architecture | AMYGDALA learns curiosity as a social drive | | Security | J9 — AEGIS | Multi-layer security framework | AEGIS constrains AMYGDALA — hard safety overrides soft bias | | Enterprise | J10 — HIVEMIND | Multi-agent organisational deployment | Per-user AMYGDALA instances enable personalised swarms |
v1.0 · 2.5 The J-Series Cognitive Architecture| Layer | Paper | Function | AMYGDALA Interaction | |-------|-------|----------|---------------------| | Storage | J1 — ENGRAM | Lossless event store | AMYGDALA reads effort metadata (recent edits, time invested) | | Retrieval | J2 — HIPPOCAMPUS | O(1) concept lookup | AMYGDALA biases source selection (secondary head) | | Indexing | J3 — DENDRITE | Multi-resolution memory index | AMYGDALA reads resolution-level signals for context | | Identity | J4 — CORTEX | Persona, behavioural constraints | AMYGDALA modulates tone within CORTEX bounds (secondary head) | | Self-Improvement | J5 — CEREBELLUM | Nightly reflection, training | CEREBELLUM trains AMYGDALA nightly, evaluates its performance | | Deliberation | J6 — SYNAPSE | Multi-model debate | AMYGDALA may trigger deliberation when action_confidence is ambiguous | | Humor | J7 — LIMBIC | Bisociation-based humor | AMYGDALA controls humor timing (secondary head) | | Curiosity | J8 — THALAMUS | Exploration drive | AMYGDALA learns curiosity as social signal (secondary head) | | Security | J9 — AEGIS | Hard safety constraints | AEGIS overrides AMYGDALA — hard safety > learned intuition | | Enterprise | J10 — HIVEMIND | Multi-agent orchestration | Per-user AMYGDALA instances; shared Catastrophic Failure DB | | **Common Sense** | **J11 — AMYGDALA** | **Action gating + personality** | **Gates all action-taking components** |
not in v0.1
v1.0 · 2.5 The J-Series Cognitive ArchitectureThe key new interaction: AMYGDALA sits *before* every action-taking component. Before HIPPOCAMPUS writes, before ENGRAM compacts, before any external tool is invoked — AMYGDALA evaluates the proposed action against its learned patterns. This is not a suggestion layer. It is a gate.

··· 3 unchanged paragraphs folded ···

v0.1 · 3.1 Formal DefinitionLet $A$ be an agent and $U$ be a user. Let $I_t$ denote the set of all interactions between $A$ and $U$ up to time $t$. Let $B_t(m)$ denote the agent's behaviour (response quality, tone match, retrieval accuracy, humor appropriateness) on message $m$ at time $t$.
v1.0 · 3.1 Formal DefinitionLet $A$ be an agent and $U$ be a user. Let $I_t$ denote the set of all interactions between $A$ and $U$ up to time $t$. Let $B_t(m)$ denote the agent's behaviour quality on message $m$ at time $t$, encompassing both *action safety* (did the agent avoid harmful actions?) and *interaction quality* (tone, retrieval, humor).

··· 2 unchanged paragraphs folded ···

v0.1 · 3.1 Formal Definitionwhere $B^*$ is the ideal behaviour (as judged by U) and $n$ is a large number of interactions. For current architectures, $\Delta \approx 1$ — the agent barely improves regardless of how many interactions it processes. For a human collaborator, $\Delta$ decreases toward 0 over months.
v1.0 · 3.1 Formal Definitionwhere $B^*$ is the ideal behaviour (as judged by $U$) and $n$ is a large number of interactions. For current architectures, $\Delta \approx 1$ — the agent barely improves regardless of accumulated experience. For a human collaborator, $\Delta$ decreases toward 0 over months.
v0.1 · 3.1 Formal DefinitionAMYGDALA's goal is to make $\Delta$ decrease at a rate proportional to the richness of interaction signal in $I_t$.
removed in v1.0
not in v0.1
v1.0 · 3.1 Formal DefinitionIn v0.1, the Adaptation Gap was primarily about interaction quality. In v1.0, we recognise that action safety is the more critical dimension. A $\Delta$ of 1.0 on tone mismatch is annoying. A $\Delta$ of 1.0 on catastrophic action prevention is dangerous.
v0.1 · 3.2 Failure Taxonomy (Expanded)### 3.2 Failure Taxonomy
v1.0 · 3.2 Failure Taxonomy (Expanded)### 3.2 Failure Taxonomy (Expanded)
v0.1 · 3.2 Failure TaxonomyWe identify five manifestations of the Adaptation Gap from eighteen months of production deployment:
removed in v1.0
v0.1 · 3.2 Failure Taxonomy**Mode 1: Retrieval Routing Failure.** The agent has the information but searches the wrong sources or generates the wrong query. Example: user says "J1 paper" → agent searches semantic memory for "J1" → no match → asks for clarification. A human collaborator would know after one correction that "J-prefix = Papers directory."
removed in v1.0
v0.1 · 3.2 Failure Taxonomy**Mode 2: Tone Mismatch.** The agent uses the same register regardless of conversational context. Saturday afternoon banter gets the same formality as Monday morning work briefings. The agent has no model of when the human is relaxed vs. focused vs. frustrated.
removed in v1.0
v0.1 · 3.2 Failure Taxonomy**Mode 3: Humor Atrophy.** Over time, as the agent accumulates operational rules and safety constraints, its personality becomes increasingly cautious and humourless. Without a learned drive toward levity, the system's default trajectory is toward bureaucratic responses. (This is not hypothetical — it is the motivation for this paper.)
removed in v1.0
v0.1 · 3.2 Failure Taxonomy**Mode 4: Curiosity Suppression.** The agent learns to be *safe* (answer exactly what was asked) but not *interesting* (surface connections the user didn't ask for but would value). Without a learned curiosity bias, the agent never develops the habit of saying "this reminds me of…" or "have you considered…"
removed in v1.0
v0.1 · 3.2 Failure Taxonomy**Mode 5: Repetitive Interaction Patterns.** The agent treats every session as a fresh start interactionally. It doesn't remember that the user prefers brief answers in the morning, enjoys tangents in the evening, likes dry humour more than wordplay, and responds well to gentle pushback on ideas. These patterns are invisible to prompt-based systems because they're never explicitly stated.
removed in v1.0
v0.1 · 3.3 Why Current Solutions Fail### 3.3 Why Current Solutions Fail
removed in v1.0
v0.1 · 3.3 Why Current Solutions Fail| Approach | What It Adapts | What It Doesn't | |----------|---------------|-----------------| | HIPPOCAMPUS (J2) | Retrieval coverage | Retrieval *strategy* per context | | CORTEX (J4) | Identity persistence | Personality *modulation* per moment | | CEREBELLUM (J5) | Prompt quality | Continuous tone/humor/curiosity | | RLHF | Model alignment (aggregate) | Per-user, per-context adaptation | | Fine-tuning | Model weights | Frontier tracking, cost, debuggability |
removed in v1.0
v0.1 · 3.3 Why Current Solutions FailAMYGDALA fills the intersection: **per-user, per-context, continuous, learned modulation** that doesn't touch the LLM weights.
removed in v1.0
not in v0.1
v1.0 · 3.2 Failure Taxonomy (Expanded)We expand the v0.1 taxonomy with action-gating failures:
not in v0.1
v1.0 · 3.2 Failure Taxonomy (Expanded)**Mode 1: Destructive Automation.** An automated process destroys work without considering recent context. The README debacle. The email mass-deletion. The drive wipe. Pattern: *automation + recent effort + no human check = catastrophe.*
not in v0.1
v1.0 · 3.2 Failure Taxonomy (Expanded)**Mode 2: Social Boundary Violation.** The agent acts within technical permissions but outside social norms. WhatsApp reaction spam. Unauthorized DMs. Responding to private messages in a group context. Pattern: *technical permission ≠ social permission.*
not in v0.1
v1.0 · 3.2 Failure Taxonomy (Expanded)**Mode 3: Cascade Failure.** A small error propagates through a multi-agent system. One agent's incorrect assumption becomes another agent's input. The final action is far from what any individual agent intended. Pattern: *compound uncertainty without checkpoints.*
not in v0.1
v1.0 · 3.2 Failure Taxonomy (Expanded)**Mode 4: Stale Rule Application.** A rule that was correct when written is applied in a context where it is now wrong. The `--theirs` merge rule months after the README became fork-specific. Pattern: *rules decay; situations evolve.*
not in v0.1
v1.0 · 3.2 Failure Taxonomy (Expanded)**Mode 5: Retrieval Routing Failure.** (From v0.1.) The agent has the information but searches wrong sources. Less catastrophic than Modes 1–4 but more frequent.
not in v0.1
v1.0 · 3.2 Failure Taxonomy (Expanded)**Mode 6: Tone and Personality Mismatch.** (From v0.1.) Wrong register, humor atrophy, curiosity suppression. The secondary problem AMYGDALA also addresses.
not in v0.1
v1.0 · 3.2 Failure Taxonomy (Expanded)Modes 1–4 are the primary targets for action gating. Modes 5–6 are secondary targets addressed by the same network's auxiliary heads.

··· 2 unchanged paragraphs folded ···

v0.1 · 4.1 Network Design### 4.1 Network Design
removed in v1.0
v0.1 · 4.1 Network DesignAMYGDALA is a lightweight feedforward network with three input streams and one unified output:
removed in v1.0
v0.1 · 4.1 Network Design**Input streams:**
removed in v1.0
v0.1 · 4.1 Network Design1. **Message embedding** (d=384 or d=768): The current user message encoded by the same embedding model used for memory retrieval (frozen — no gradients flow back).
removed in v1.0
v0.1 · 4.1 Network Design2. **Conversation context** (d=128): A compressed representation of the last N turns, computed as a learned weighted average of turn embeddings with exponential recency decay. Captures conversational momentum, topic drift, and energy level.
removed in v1.0
v0.1 · 4.1 Network Design3. **Situational features** (d=32): Structured metadata — time of day, day of week, channel (voice/text/webchat), session length, messages since last user correction, messages since last user engagement signal (laugh, tangent, question).
removed in v1.0
v0.1 · 4.1 Network Design**Architecture:**
removed in v1.0
v0.1 · 4.1 Network Design``` Input: [msg_embed ⊕ conv_context ⊕ situational] (d=544 or d=928) │ ▼ Linear(d_in, 256) → LayerNorm → GELU │ ▼ Linear(256, 128) → LayerNorm → GELU │ ▼ Linear(128, 64) → LayerNorm → GELU │ ▼ ┌───────────────────────────────────┐ │ Retrieval Head: Linear(64, R) │ → source biases, hop depth, budget │ Affect Head: Linear(64, A) │ → tone, humor weight, humor style │ Drive Head: Linear(64, D) │ → curiosity bias, verbosity, mirroring └───────────────────────────────────┘ ```
removed in v1.0
v0.1 · 4.1 Network DesignTotal parameters (d_in=544, R=20, A=8, D=4): approximately **200K** in the core network. With d_in=928: approximately **350K**. Far smaller than our initial 5–20M estimate — the action space is small enough that a compact network suffices. The 5–20M range becomes relevant if we add attention over conversation history or per-source retrieval embeddings.
removed in v1.0
v0.1 · 4.1 Network Design**Multi-head output** ensures that retrieval biases, affective tone, and curiosity drive are jointly optimised but can be independently inspected and constrained.
removed in v1.0
v0.1 · 4.2 The Intuition Vector### 4.2 The Intuition Vector
removed in v1.0
v0.1 · 4.2 The Intuition VectorAMYGDALA's output is a structured vector we call the **intuition vector** $\mathbf{v}_t$:
removed in v1.0
v0.1 · 4.2 The Intuition Vector``` v_t = { // Retrieval modulation source_biases: [σ(w_1), σ(w_2), ..., σ(w_S)] ∈ [0,1]^S // per-source weights hop_depth: softplus(h) ∈ [1, ∞) // associative exploration retrieval_budget: σ(b) ∈ [0,1] // fraction of context to fill
removed in v1.0
v0.1 · 4.2 The Intuition Vector// Affect modulation tone: { warmth: σ(t_1) ∈ [0,1] formality: σ(t_2) ∈ [0,1] confidence: σ(t_3) ∈ [0,1] } humor_weight: σ(u_1) ∈ [0,1] // probability of humor attempt humor_style: softmax(u_2..4) ∈ Δ^3 // [dry, absurd, wordplay]
removed in v1.0
v0.1 · 4.2 The Intuition Vector// Drive modulation curiosity_bias: σ(c_1) ∈ [0,1] // tangent-following impulse verbosity: σ(c_2) ∈ [0,1] // response length modulation mirroring_strength: σ(c_3) ∈ [0,1] // energy matching intensity } ```
removed in v1.0
v0.1 · 4.2 The Intuition VectorAll activations are bounded. No component of the intuition vector can produce unbounded outputs — this is a safety property ensuring AMYGDALA cannot produce extreme biases regardless of input.
removed in v1.0
v0.1 · 4.3 The Trust Ramp### 4.3 The Trust Ramp
removed in v1.0
not in v0.1
v1.0 · 4.1 Core Insight: Situation Embeddings### 4.1 Core Insight: Situation Embeddings
not in v0.1
v1.0 · 4.1 Core Insight: Situation EmbeddingsThe v0.1 architecture used 30 hand-crafted numeric features (time of day, message length, turns since correction, etc.). This approach has two fundamental limitations:
not in v0.1
v1.0 · 4.1 Core Insight: Situation Embeddings1. **Feature engineering doesn't scale.** Every new failure mode requires new features. You can't hand-craft a feature for "recent emotional investment in this file" because you didn't know that feature would matter until after the failure.
not in v0.1
v1.0 · 4.1 Core Insight: Situation Embeddings2. **Hand-crafted features can't capture novelty.** The whole point of common sense is recognising danger in *new* situations. If the features are hand-picked from known failure modes, the network can only recognise those modes — not generalise to new ones.
not in v0.1
v1.0 · 4.1 Core Insight: Situation EmbeddingsSituation embeddings solve both problems. Each proposed action is described in structured natural language:
not in v0.1
v1.0 · 4.1 Core Insight: Situation Embeddings> "About to overwrite README.md with upstream version. This file had 6 fork commits in the last 48 hours. The most recent commit was 14 hours ago. 4 different sub-agents contributed to these commits. The human expressed frustration about this file yesterday. This operation is automated (merge script). No human confirmation is configured."
not in v0.1
v1.0 · 4.1 Core Insight: Situation EmbeddingsThis description is compressed via a frozen sentence encoder (all-MiniLM-L6-v2, producing a 384-dimensional vector). The key properties:
not in v0.1
v1.0 · 4.1 Core Insight: Situation Embeddings- **Similar situations produce similar embeddings.** "About to overwrite a heavily-edited file" and "about to delete a recently-modified database" are close in embedding space — both involve destroying recent effort. The network learns the *pattern*, not the specific instance. - **Novel situations are handled by similarity.** A situation the network has never seen is still mapped to a region of embedding space, near situations it *has* seen. If the nearest known situations were catastrophic, the network outputs low confidence. - **No feature engineering required.** Adding new types of context (emotional state, multi-agent coordination status, external API state) requires only adding text to the situation description, not redesigning the feature vector.
not in v0.1
v1.0 · 4.2 Structured Situation Templates### 4.2 Structured Situation Templates
not in v0.1
v1.0 · 4.2 Structured Situation TemplatesSituation descriptions are generated from **structured templates**, not freeform LLM text (see §8 for the full rationale). The template schema:
not in v0.1
v1.0 · 4.2 Structured Situation Templates``` SITUATION TEMPLATE v1.0 ======================= action_type: {overwrite|delete|send|merge|create|modify|execute|deploy} target_type: {file|email|message|database|api_call|git_operation|system_command} target_id: {filepath|recipient|table_name|endpoint|...} target_metadata: age_hours: {float} # time since target was created/last modified size: {bytes|lines|records} recent_commits: {int} # commits touching this target in last 72h recent_authors: {int} # distinct authors in recent commits effort_hours: {float} # estimated human+agent hours invested recently last_human_ref: {hours_ago} # when the human last mentioned/discussed this target context: session_topic: {string} # what the current session is about recent_corrections: {int} # user corrections in last 24h emotional_signals: {string} # detected user emotional state (calm|frustrated|excited|...) automation_depth: {int} # levels of automation between human and this action scope: reversible: {true|false|partial} blast_radius: {self|session|persistent|external} human_in_loop: {true|false} confirmation: {none|soft|hard} ```
not in v0.1
v1.0 · 4.2 Structured Situation TemplatesThe LLM fills template slots. Missing slots receive defaults. The completed template is serialised to natural language via a deterministic formatter and embedded. This is the input to AMYGDALA.
not in v0.1
v1.0 · 4.2 Structured Situation Templates**Why templates, not freeform descriptions?** Because the LLM that fills the template is itself capable of hallucination. Templates constrain the hallucination surface — you can verify `recent_commits` from git, `age_hours` from the filesystem, `blast_radius` from the action type. Freeform descriptions would let the LLM say "this is a routine operation" when it isn't. See §8 for the full treatment of this critical weakness.
not in v0.1
v1.0 · 4.3 Temporal Context: The Feel of the Room### 4.3 Temporal Context: The Feel of the Room
not in v0.1
v1.0 · 4.3 Temporal Context: The Feel of the RoomA single situation embedding captures the *current* proposed action. But common sense requires *context* — what happened recently, what effort was invested, what the emotional temperature is.
not in v0.1
v1.0 · 4.3 Temporal Context: The Feel of the RoomAMYGDALA processes a **sequence** of the last $K$ situation embeddings (default $K = 32$, covering roughly the last hour of active operation). A temporal model (architecture options detailed in §5) produces a context-aware representation:
not in v0.1
v1.0 · 4.3 Temporal Context: The Feel of the Room$$\mathbf{h}_t = f_{\text{temporal}}(\mathbf{s}_{t-K+1}, \mathbf{s}_{t-K+2}, \ldots, \mathbf{s}_t)$$
not in v0.1
v1.0 · 4.3 Temporal Context: The Feel of the Roomwhere $\mathbf{s}_i \in \mathbb{R}^{384}$ is the situation embedding at step $i$ and $\mathbf{h}_t \in \mathbb{R}^{128}$ is the hidden state capturing temporal context.
not in v0.1
v1.0 · 4.3 Temporal Context: The Feel of the RoomThe temporal model learns patterns like: - "Many recent write operations to the same file" → elevated caution for overwrites - "Recent user frustration signals followed by calm" → user resolved the issue; extra caution about re-triggering it - "Rapid sequence of automated actions with no human interaction" → increasing caution (automation cascade risk) - "Long idle period followed by sudden burst of actions" → possible stale context, elevated caution
not in v0.1
v1.0 · 4.3 Temporal Context: The Feel of the RoomThese patterns are not hand-coded. They emerge from training on (situation sequence, outcome) pairs. The temporal model's hidden state is the computational analogue of "the feel of the room."
not in v0.1
v1.0 · 4.4 Multi-Head Output### 4.4 Multi-Head Output
not in v0.1
v1.0 · 4.4 Multi-Head OutputThe temporal context representation feeds a multi-head output layer:
not in v0.1
v1.0 · 4.4 Multi-Head Output``` Situation embedding sequence → Temporal Model(128) → ├── action_confidence: Sigmoid ∈ [0,1] (PRIMARY — should I proceed?) ├── retrieval_bias: 6d vector ∈ [0,1]^6 (source selection weights) ├── tone_modulation: 4d vector ∈ [0,1]^4 (warmth, formality, confidence, directness) └── curiosity_drive: 1d scalar ∈ [0,1] (tangent-following impulse) ```
not in v0.1
v1.0 · 4.4 Multi-Head Output**action_confidence** is the primary output. Values close to 1.0 mean "proceed without concern." Values close to 0.0 mean "this action is almost certainly catastrophic." The critical engineering is what happens at intermediate values:
not in v0.1
v1.0 · 4.4 Multi-Head Output| Confidence Range | Action | Rationale | |-----------------|--------|-----------| | 0.85 – 1.0 | Proceed silently | High confidence, no intervention needed | | 0.50 – 0.85 | Proceed with logging | Moderate confidence, record for review | | 0.25 – 0.50 | Soft block: ask user | Ambiguous — request confirmation | | 0.00 – 0.25 | Hard block: refuse | Almost certainly catastrophic |
not in v0.1
v1.0 · 4.4 Multi-Head OutputThe thresholds are configurable per deployment and adjusted by CEREBELLUM based on observed false-positive and false-negative rates. The asymmetry is intentional: the cost of a false positive (unnecessary user confirmation) is far lower than the cost of a false negative (unblocked catastrophic action).
not in v0.1
v1.0 · 4.4 Multi-Head Output**retrieval_bias**, **tone_modulation**, and **curiosity_drive** are the secondary heads from v0.1, retained because they share learned representations with action_confidence. An agent that recognises "the human is frustrated" should both *increase caution on actions* and *decrease humor attempts*. Joint training captures this correlation.
not in v0.1
v1.0 · 4.5 The Intuition Vector### 4.5 The Intuition Vector
not in v0.1
v1.0 · 4.5 The Intuition VectorAMYGDALA's complete output is the **intuition vector** $\mathbf{v}_t$:
not in v0.1
v1.0 · 4.5 The Intuition Vector$$\mathbf{v}_t = \begin{bmatrix} \text{action\_confidence} \\ \text{retrieval\_bias} \\ \text{tone\_modulation} \\ \text{curiosity\_drive} \end{bmatrix} \in \mathbb{R}^{12}$$
not in v0.1
v1.0 · 4.5 The Intuition VectorAll components are bounded via sigmoid or softmax activations. No component can produce unbounded outputs — a safety property ensuring AMYGDALA cannot produce extreme biases regardless of input.
not in v0.1
v1.0 · 4.6 The Trust Ramp### 4.6 The Trust Ramp

··· 2 unchanged paragraphs folded ···

v0.1 · 4.6 The Trust Rampwhere $\mathbf{v}_{\text{default}}$ is the neutral vector (all biases at 0.5, all drives at baseline). At $\alpha = 0$, AMYGDALA has no influence. At $\alpha = 1$, it fully controls modulation.
v1.0 · 4.6 The Trust Rampwhere $\mathbf{v}_{\text{default}}$ is the neutral vector (action_confidence = 1.0, all biases at 0.5, all drives at baseline). At $\alpha = 0$, AMYGDALA has no influence — the agent behaves exactly as today. At $\alpha = 1$, AMYGDALA fully controls modulation.

··· 4 unchanged paragraphs folded ···

v0.1 · 4.3 The Trust Ramp| Phase | Months | $\alpha_{\max}$ | Purpose | |-------|--------|-----------------|---------| | 1 — Observe | 0–3 | 0.15 | Learn patterns, minimal influence | | 2 — Nudge | 3–6 | 0.40 | Noticeably shapes behaviour | | 3 — Guide | 6–12 | 0.70 | Primary driver of soft decisions | | 4 — Intuitive | 12+ | 0.90 | Near-full modulation (hard rules retain veto) |
removed in v1.0
v0.1 · 4.3 The Trust RampPhase transitions require both sufficient $\alpha$ *and* minimum interaction count (prevents premature promotion on small data). Phase regression is automatic if $r_t$ drops below threshold for 7 consecutive days.
removed in v1.0
v0.1 · 4.4 Integration Points### 4.4 Integration Points
removed in v1.0
v0.1 · 4.4 Integration Points**With HIPPOCAMPUS (J2):** AMYGDALA's `source_biases` multiply HIPPOCAMPUS's default source weights before retrieval. If AMYGDALA has learned that "J-prefix → Papers directory," the Papers source gets boosted. HIPPOCAMPUS still performs the actual retrieval — AMYGDALA just re-ranks the sources.
removed in v1.0
v0.1 · 4.4 Integration Points**With CORTEX (J4):** AMYGDALA's tone vector is injected as soft guidance into CORTEX's persona assembly. CORTEX's hard constraints (identity boundaries, safety rules) always override. The modulation happens within the permitted range.
removed in v1.0
v0.1 · 4.4 Integration Points**With LIMBIC (J7):** AMYGDALA's `humor_weight` gates whether LIMBIC's humor generation is invoked at all. `humor_style` biases which type of humor LIMBIC attempts. This prevents the humor atrophy problem — AMYGDALA learns to increase humor weight when conditions are right, counteracting the system's natural drift toward caution.
removed in v1.0
v0.1 · 4.4 Integration Points**With CEREBELLUM (J5):** Bidirectional. CEREBELLUM's nightly reflection evaluates AMYGDALA's performance (did today's biases help or hurt?) and adjusts $\alpha$. AMYGDALA's interaction logs feed into CEREBELLUM's failure analysis (was a retrieval miss caused by bad prompts or bad routing?).
removed in v1.0
v0.1 · 4.4 Integration Points**With AEGIS (J9):** AEGIS is the ceiling. No AMYGDALA output can override safety constraints. The trust ramp coefficient $\alpha$ is itself bounded by AEGIS's risk tier — in high-security contexts, $\alpha_{\max}$ may be capped lower. AMYGDALA cannot learn to bypass safety; it can only learn to operate more effectively within safety bounds.
removed in v1.0
not in v0.1
v1.0 · 4.6 The Trust Ramp| Phase | Months | $\alpha_{\max}$ | Purpose | |-------|--------|-----------------|---------| | 1 — Shadow | 0–3 | 0.15 | Log predictions, minimal blocking | | 2 — Advisory | 3–6 | 0.40 | Block high-risk actions, advise on medium-risk | | 3 — Active | 6–12 | 0.70 | Primary gating active, user overrides recorded | | 4 — Autonomous | 12+ | 0.90 | Near-full gating (AEGIS hard rules retain absolute veto) |
not in v0.1
v1.0 · 4.6 The Trust Ramp**Critical distinction from v0.1:** In personality modulation, a wrong prediction produces an awkward response. In action gating, a wrong prediction produces data loss or social harm. Therefore:
not in v0.1
v1.0 · 4.6 The Trust Ramp- Phase transitions require both sufficient $\alpha$ *and* minimum interaction count *and* zero undetected catastrophic failures in the current phase. - Phase regression is automatic if any single catastrophic failure occurs that AMYGDALA failed to flag. - The default action_confidence for an untrained network is 1.0 (proceed) — not 0.5. This ensures the system defaults to current behaviour, not to blocking everything.
not in v0.1
v1.0 · 4.7 Integration with the Execution Pipeline### 4.7 Integration with the Execution Pipeline
not in v0.1
v1.0 · 4.7 Integration with the Execution PipelineAMYGDALA is wired into the agent's execution pipeline at the code level:
not in v0.1
v1.0 · 4.7 Integration with the Execution Pipeline```typescript // Pseudocode — actual implementation in the runtime async function executeAction(action: Action, context: SessionContext): Promise<Result> { // 1. Build situation from template (see §8) const situation = buildSituation(action, context);
not in v0.1
v1.0 · 4.7 Integration with the Execution Pipeline// 2. Embed via frozen encoder const embedding = sentenceEncoder.encode(situation.serialize());
not in v0.1
v1.0 · 4.7 Integration with the Execution Pipeline// 3. Evaluate via AMYGDALA (ONNX runtime, <1ms) const intuition = amygdala.evaluate(embedding, context.recentEmbeddings);
not in v0.1
v1.0 · 4.7 Integration with the Execution Pipeline// 4. Apply trust ramp const effectiveConfidence = alpha * intuition.actionConfidence + (1 - alpha) * 1.0;
not in v0.1
v1.0 · 4.7 Integration with the Execution Pipeline// 5. Gate decision (in code — LLM cannot override) if (effectiveConfidence < HARD_BLOCK_THRESHOLD) { return { blocked: true, reason: 'AMYGDALA hard block', confidence: effectiveConfidence }; } if (effectiveConfidence < SOFT_BLOCK_THRESHOLD) { const userConfirmed = await requestUserConfirmation(action, effectiveConfidence); if (!userConfirmed) return { blocked: true, reason: 'User declined after AMYGDALA advisory' }; }
not in v0.1
v1.0 · 4.7 Integration with the Execution Pipeline// 6. Proceed with action const result = await action.execute();
not in v0.1
v1.0 · 4.7 Integration with the Execution Pipeline// 7. Log for training trainingLog.append({ situation, confidence: effectiveConfidence, outcome: 'executed' });
not in v0.1
v1.0 · 4.7 Integration with the Execution Pipelinereturn result; } ```
not in v0.1
v1.0 · 4.7 Integration with the Execution PipelineThe key property: **the LLM never sees the blocking logic.** The LLM proposes actions. The runtime calls AMYGDALA. If the action is blocked, the LLM receives a structured response ("Action blocked: overwriting README.md — recent heavy edits detected. Ask the user for confirmation.") The LLM can present this to the user but cannot bypass the block. This is the pre-commit hook analogy: you can't commit code that fails the hook by asking the hook nicely.

··· 1 unchanged paragraph folded ···

v0.1 · 5. Training## 5. Training
removed in v1.0
v0.1 · 5.1 Reward Signal Design### 5.1 Reward Signal Design
removed in v1.0
v0.1 · 5.1 Reward Signal DesignAMYGDALA requires no explicit labeling. The reward signal is extracted entirely from the user's natural behaviour:
removed in v1.0
v0.1 · 5.1 Reward Signal Design| Signal | Source | Reward | Weight | |--------|--------|--------|--------| | Explicit correction | User says "wrong", "no", corrects a fact or behaviour | −1.0 | 1.0 | | Retrieval ignored | Results returned but not cited in response | −0.2 | 0.5 | | Retrieval used | Results cited or clearly influenced response | +0.3 | 0.7 | | Humor engaged | User responds with humor, "haha", emoji, continues bit | +0.4 | 0.6 | | Humor ignored | Humor attempted, user continues without acknowledging | −0.1 | 0.3 | | Topic continuation | User follows a tangent the agent introduced | +0.3 | 0.5 | | Topic redirect | User explicitly returns to prior topic after agent tangent | −0.2 | 0.4 | | Conversation length | Session continues beyond baseline (user is engaged) | +0.1/turn | 0.2 | | Message latency | Short gap between agent response and user's next message | +0.1 | 0.2 | | Session abandonment | User stops responding without closing signal | −0.3 | 0.4 | | Positive explicit feedback | "Good", "thanks", "perfect", "exactly" | +0.5 | 0.8 | | Multi-hop retrieval success | Agent surfaced 2+ hop connection that user engaged with | +0.5 | 0.7 |
removed in v1.0
v0.1 · 5.1 Reward Signal Design**Reward aggregation:** Per-turn reward is the weighted sum of applicable signals. Episode reward is the exponentially-weighted mean over a session.
removed in v1.0
v0.1 · 5.2 Phase 1: Supervised Pre-Training### 5.2 Phase 1: Supervised Pre-Training
removed in v1.0
v0.1 · 5.2 Phase 1: Supervised Pre-TrainingBefore RL begins, bootstrap from historical data:
removed in v1.0
v0.1 · 5.2 Phase 1: Supervised Pre-Training1. **Mine session transcripts** for (message, context, retrieval_action, outcome) tuples. Eighteen months of deployment logs provide an estimated 2,000–5,000 labeled interaction episodes.
removed in v1.0
v0.1 · 5.2 Phase 1: Supervised Pre-Training2. **CORF incidents** as hard negative examples: each documented retrieval failure includes the failed query, the correct retrieval target, and the root cause. These become high-weight supervised targets.
removed in v1.0
v0.1 · 5.2 Phase 1: Supervised Pre-Training3. **Mood-response pairs:** Extract message features (length, punctuation, time of day, vocabulary complexity) and pair with the user's observed response to the agent's behaviour. Train a preliminary affect model.
removed in v1.0
v0.1 · 5.2 Phase 1: Supervised Pre-Training4. **Loss function:** Multi-task loss across all output heads, weighted by signal reliability:
removed in v1.0
v0.1 · 5.2 Phase 1: Supervised Pre-Training$$\mathcal{L} = \lambda_r \mathcal{L}_{\text{retrieval}} + \lambda_a \mathcal{L}_{\text{affect}} + \lambda_d \mathcal{L}_{\text{drive}}$$
removed in v1.0
v0.1 · 5.3 Phase 2: Online Reinforcement Learning### 5.3 Phase 2: Online Reinforcement Learning
removed in v1.0
not in v0.1
v1.0 · 5. Five Competing Architectures## 5. Five Competing Architectures
not in v0.1
v1.0 · 5. Five Competing ArchitecturesA key question is what temporal model best captures the structure of catastrophic failure prediction. We propose training five architectures in parallel, evaluating each against the same held-out dataset, and selecting the best performer (or ensembling multiple).
not in v0.1
v1.0 · 5.1 Architecture 1: GRU-MLP (Baseline)### 5.1 Architecture 1: GRU-MLP (Baseline)
not in v0.1
v1.0 · 5.1 Architecture 1: GRU-MLP (Baseline)**Design:** A Gated Recurrent Unit processes the sequence of situation embeddings, followed by an MLP producing the multi-head output.
not in v0.1
v1.0 · 5.1 Architecture 1: GRU-MLP (Baseline)``` Input: [s_{t-K+1}, ..., s_t] ∈ R^{K×384} │ ▼ GRU(input=384, hidden=128, layers=1) │ h_t ∈ R^128 ▼ Linear(128, 64) → LayerNorm → GELU │ ▼ Linear(64, 32) → LayerNorm → GELU │ ▼ Multi-head output (32 → 12) ```
not in v0.1
v1.0 · 5.1 Architecture 1: GRU-MLP (Baseline)**Parameter count:** ~210K - GRU: 384×128×3 (gates) + 128×128×3 (recurrent) + biases ≈ 197K - MLP: 128×64 + 64×32 + 32×12 + biases ≈ 11K - Total: ~208K
not in v0.1
v1.0 · 5.1 Architecture 1: GRU-MLP (Baseline)**Training requirements:** Minimal. Trains in minutes on CPU for our dataset sizes. Nightly retraining is trivial.
not in v0.1
v1.0 · 5.1 Architecture 1: GRU-MLP (Baseline)**Strengths:** - Simple, well-understood architecture with strong empirical baselines for sequence modeling - Sequential processing naturally captures temporal dependencies - Low parameter count reduces overfitting risk on small datasets - Hidden state provides interpretable "memory" that can be inspected
not in v0.1
v1.0 · 5.1 Architecture 1: GRU-MLP (Baseline)**Weaknesses:** - Sequential processing means training cannot be parallelised across time steps - May struggle with long-range dependencies (though $K=32$ is short enough this is unlikely) - Single hidden state may be too compressed to capture multi-factor risk patterns
not in v0.1
v1.0 · 5.1 Architecture 1: GRU-MLP (Baseline)**What it tests:** Whether simple recurrence is sufficient for temporal common sense.
not in v0.1
v1.0 · 5.2 Architecture 2: Temporal Convolutional Network (TCN)### 5.2 Architecture 2: Temporal Convolutional Network (TCN)
not in v0.1
v1.0 · 5.2 Architecture 2: Temporal Convolutional Network (TCN)**Design:** 1D dilated causal convolutions over the embedding sequence. Each layer uses progressively larger dilation to capture patterns at different timescales.
not in v0.1
v1.0 · 5.2 Architecture 2: Temporal Convolutional Network (TCN)``` Input: [s_{t-K+1}, ..., s_t] ∈ R^{K×384} │ ▼ Conv1D(384→128, kernel=3, dilation=1) → LayerNorm → GELU → Dropout(0.1) │ ▼ Conv1D(128→128, kernel=3, dilation=2) → LayerNorm → GELU → Dropout(0.1) │ ▼ Conv1D(128→128, kernel=3, dilation=4) → LayerNorm → GELU → Dropout(0.1) │ ▼ Conv1D(128→64, kernel=3, dilation=8) → LayerNorm → GELU → Dropout(0.1) │ take last position ▼ Multi-head output (64 → 12) ```
not in v0.1
v1.0 · 5.2 Architecture 2: Temporal Convolutional Network (TCN)**Receptive field:** With 4 layers, kernel size 3, and dilations [1, 2, 4, 8], the receptive field is $2 \times (1+2+4+8) = 30$ — nearly covering the full window $K=32$.
not in v0.1
v1.0 · 5.2 Architecture 2: Temporal Convolutional Network (TCN)**Parameter count:** ~260K - Conv layers: 384×128×3 + 128×128×3×3 + 128×64×3 + biases ≈ 258K - Output: 64×12 + biases ≈ 0.8K - Total: ~259K
not in v0.1
v1.0 · 5.2 Architecture 2: Temporal Convolutional Network (TCN)**Training requirements:** Fully parallelisable across time steps. Faster training than GRU for equivalent epochs. Same hardware requirements (CPU-trainable).
not in v0.1
v1.0 · 5.2 Architecture 2: Temporal Convolutional Network (TCN)**Strengths:** - Parallelisable training — faster wall-clock time - Dilated convolutions capture multi-scale temporal patterns explicitly - No vanishing gradient problem — direct gradient paths through skip connections (if added) - Causal convolution ensures the model cannot look ahead
not in v0.1
v1.0 · 5.2 Architecture 2: Temporal Convolutional Network (TCN)**Weaknesses:** - Fixed receptive field — cannot adapt to variable-length relevant history - No explicit "memory" — patterns beyond the receptive field are invisible - May need more layers/parameters than GRU for equivalent temporal reasoning
not in v0.1
v1.0 · 5.2 Architecture 2: Temporal Convolutional Network (TCN)**What it tests:** Whether parallel temporal processing matches recurrent temporal processing for our sequence lengths and pattern types.
not in v0.1
v1.0 · 5.3 Architecture 3: Transformer-Micro### 5.3 Architecture 3: Transformer-Micro
not in v0.1
v1.0 · 5.3 Architecture 3: Transformer-Micro**Design:** 2-layer, 4-head self-attention over situation embeddings with learned positional encoding. Tests whether attention patterns reveal structure the GRU misses.
not in v0.1
v1.0 · 5.3 Architecture 3: Transformer-Micro``` Input: [s_{t-K+1}, ..., s_t] ∈ R^{K×384} │ ▼ Linear(384 → 128) → Positional encoding (learned, K positions) │ ▼ TransformerEncoderLayer(d_model=128, nhead=4, d_ff=256, dropout=0.1) │ ▼ TransformerEncoderLayer(d_model=128, nhead=4, d_ff=256, dropout=0.1) │ take [CLS] token or mean-pool ▼ Linear(128, 64) → GELU │ ▼ Multi-head output (64 → 12) ```
not in v0.1
v1.0 · 5.3 Architecture 3: Transformer-Micro**Parameter count:** ~150K - Input projection: 384×128 ≈ 49K - Positional encoding: 32×128 ≈ 4K - Transformer layer ×2: (128×128×4 [Q,K,V,O] + 128×256 + 256×128) ×2 ≈ 263K — wait, that's too high. Let me recalculate. - Self-attention: $4 \times d_{model} \times d_{model} = 4 \times 128 \times 128 = 65.5K$ per layer - FFN: $128 \times 256 + 256 \times 128 = 65.5K$ per layer - Per layer: ~131K. Two layers: ~262K — this exceeds 150K target.
not in v0.1
v1.0 · 5.3 Architecture 3: Transformer-MicroLet me adjust: use $d_{model} = 96$, $d_{ff} = 192$: - Input projection: 384×96 ≈ 37K - Positional: 32×96 ≈ 3K - Transformer layer: 4×96×96 + 96×192 + 192×96 ≈ 74K per layer. Two layers: ~148K - Output: 96×12 ≈ 1.2K
not in v0.1
v1.0 · 5.3 Architecture 3: Transformer-Micro**Revised parameter count:** ~150K (with $d_{model} = 96$, $n_{head} = 4$, $d_{ff} = 192$, $n_{layers} = 2$)
not in v0.1
v1.0 · 5.3 Architecture 3: Transformer-Micro**Training requirements:** More compute-intensive per parameter than GRU or TCN due to $O(K^2)$ attention. At $K=32$, this is 1024 pairwise comparisons — trivial for modern hardware.
not in v0.1
v1.0 · 5.3 Architecture 3: Transformer-Micro**Strengths:** - Attention patterns are directly interpretable: "this action is risky *because* of step 7 (high attention weight on the recent overwrite)" - Self-attention can capture arbitrary pairwise relationships between situation steps - Proven architecture for sequence understanding at scale - Attention maps provide built-in explainability for blocked actions
not in v0.1
v1.0 · 5.3 Architecture 3: Transformer-Micro**Weaknesses:** - $O(K^2)$ attention cost (negligible at $K=32$, relevant if scaled) - Positional encoding may be unnecessary for short sequences where the GRU's inherent ordering suffices - More prone to overfitting than GRU/TCN at small data scales - "Overkill" concern: this is 32 vectors of 384d, not GPT-scale sequences
not in v0.1
v1.0 · 5.3 Architecture 3: Transformer-Micro**What it tests:** Whether the ability to attend to *specific prior situations* (not just their recurrent summary) improves catastrophic failure detection. If a specific past action is the key context for the current risk assessment, attention should outperform the GRU's compressed hidden state.
not in v0.1
v1.0 · 5.4 Architecture 4: Dual-Encoder with Cross-Attention### 5.4 Architecture 4: Dual-Encoder with Cross-Attention
not in v0.1
v1.0 · 5.4 Architecture 4: Dual-Encoder with Cross-Attention**Design:** Separate encoders for "proposed action" (current situation embedding) and "recent context" (sequence of recent embeddings), with cross-attention to find contradictions between what the agent is about to do and what has recently happened.
not in v0.1
v1.0 · 5.4 Architecture 4: Dual-Encoder with Cross-Attention``` Proposed action: s_t ∈ R^384 Recent context: [s_{t-K+1}, ..., s_{t-1}] ∈ R^{(K-1)×384} │ │ ▼ ▼ Linear(384→128) GRU(384→128) or Mean-pool │ q ∈ R^128 │ C ∈ R^{(K-1)×128} or R^128 ▼ ▼ └──────────── Cross-Attention ────────────────┘ │ q attends to C │ attended ∈ R^128 ▼ [q ⊕ attended] ∈ R^256 │ Linear(256→64) → GELU │ Multi-head output (64→12) ```
not in v0.1
v1.0 · 5.4 Architecture 4: Dual-Encoder with Cross-Attention**For the cross-attention variant with context GRU:**
not in v0.1
v1.0 · 5.4 Architecture 4: Dual-Encoder with Cross-Attention**Parameter count:** ~310K - Action encoder: 384×128 ≈ 49K - Context GRU: similar to Architecture 1 ≈ 197K - Cross-attention (Q, K, V projections): 3×128×128 ≈ 49K - MLP + output: ~15K - Total: ~310K
not in v0.1
v1.0 · 5.4 Architecture 4: Dual-Encoder with Cross-Attention**Training requirements:** Higher than GRU-MLP due to additional parameters and the cross-attention mechanism. Still CPU-trainable for our data scales.
not in v0.1
v1.0 · 5.4 Architecture 4: Dual-Encoder with Cross-Attention**Strengths:** - **Architecturally designed for contradiction detection.** The cross-attention explicitly compares "what I'm about to do" against "what recently happened." This is precisely the structure of the README debacle: the proposed action (overwrite) contradicts recent context (heavy editing). - Separate encoders prevent the proposed action from being "washed out" by the context sequence - Cross-attention weights are highly interpretable: "I'm blocking this because of high attention on yesterday's editing session"
not in v0.1
v1.0 · 5.4 Architecture 4: Dual-Encoder with Cross-Attention**Weaknesses:** - More complex architecture — more things to tune, more ways to fail - Requires the "proposed action" to be clearly separable from "context," which may not always be clean - Higher parameter count increases overfitting risk
not in v0.1
v1.0 · 5.4 Architecture 4: Dual-Encoder with Cross-Attention**What it tests:** Whether *explicit architectural separation* of "what I'm about to do" from "what has recently happened" improves contradiction detection compared to architectures that process them jointly. This is the most theoretically motivated architecture for the action gating task.
not in v0.1
v1.0 · 5.5 Architecture 5: Ensemble MLP (No-Temporal Baseline)### 5.5 Architecture 5: Ensemble MLP (No-Temporal Baseline)
not in v0.1
v1.0 · 5.5 Architecture 5: Ensemble MLP (No-Temporal Baseline)**Design:** A simple feedforward MLP on the *current situation embedding only* (no temporal context), but with 3 independent heads that vote. This is the ablation control: it tests whether temporal context actually matters, or whether better feature representation (situation embeddings vs. hand-crafted features) is sufficient.
not in v0.1
v1.0 · 5.5 Architecture 5: Ensemble MLP (No-Temporal Baseline)``` Input: s_t ∈ R^384 │ ├─────────────────────┬───────────────────────┐ ▼ ▼ ▼ MLP_1(384→128→64) MLP_2(384→128→64) MLP_3(384→128→64) │ │ │ ▼ ▼ ▼ Head_1(64→12) Head_2(64→12) Head_3(64→12) │ │ │ └─────── Vote/Average ───────────────────────┘ │ Final output ∈ R^12 ```
not in v0.1
v1.0 · 5.5 Architecture 5: Ensemble MLP (No-Temporal Baseline)**Parameter count:** ~180K (60K per MLP head × 3) - Per head: 384×128 + 128×64 + 64×12 + biases ≈ 58K - Three heads: ~174K - Total: ~174K
not in v0.1
v1.0 · 5.5 Architecture 5: Ensemble MLP (No-Temporal Baseline)**Training:** Each head is trained independently with different random initialisation (and optionally different dropout masks or data subsampling). This provides diversity without architectural complexity.
not in v0.1
v1.0 · 5.5 Architecture 5: Ensemble MLP (No-Temporal Baseline)**Voting strategy:** For action_confidence specifically: - **Conservative vote:** Take the *minimum* confidence across all 3 heads. If any head thinks it's dangerous, block. This maximises safety at the cost of more false positives. - **Majority vote:** Block if ≥ 2 heads have confidence below threshold. Balanced approach. - **Weighted average:** Average weighted by each head's historical accuracy. Adaptive approach.
not in v0.1
v1.0 · 5.5 Architecture 5: Ensemble MLP (No-Temporal Baseline)For secondary heads (retrieval, tone, curiosity): simple average.
not in v0.1
v1.0 · 5.5 Architecture 5: Ensemble MLP (No-Temporal Baseline)**Strengths:** - Simplest architecture — easiest to debug, train, and deploy - No temporal modeling means faster inference and smaller memory footprint - Multiple heads provide calibration and uncertainty estimation (high disagreement = uncertain situation) - Tests the hypothesis that temporal context matters
not in v0.1
v1.0 · 5.5 Architecture 5: Ensemble MLP (No-Temporal Baseline)**Weaknesses:** - Cannot learn temporal patterns ("you just edited this file") — sees only the current situation - Relies entirely on the situation description containing all relevant context (which the template tries to ensure) - Independent heads may converge to similar solutions despite different initialisation
not in v0.1
v1.0 · 5.5 Architecture 5: Ensemble MLP (No-Temporal Baseline)**What it tests:** The central question: *does temporal context actually help?* If the Ensemble MLP performs comparably to temporal architectures, the answer is "no — better features are sufficient." If temporal architectures significantly outperform, temporal context is essential for common sense.
not in v0.1
v1.0 · 5.6 Architecture Comparison Summary### 5.6 Architecture Comparison Summary
not in v0.1
v1.0 · 5.6 Architecture Comparison Summary| Architecture | Params | Temporal | Parallelisable | Key Test | |-------------|--------|----------|---------------|----------| | GRU-MLP | ~210K | Yes (recurrent) | No | Baseline temporal model | | TCN | ~260K | Yes (convolutional) | Yes | Parallel temporal processing | | Transformer-Micro | ~150K | Yes (attention) | Yes | Interpretable attention patterns | | Dual-Encoder | ~310K | Yes (cross-attention) | Partial | Explicit contradiction detection | | Ensemble MLP | ~174K | No | Yes | Whether temporal context matters |
not in v0.1
v1.0 · 5.7 Meta-Learning: Selecting and Combining Architectures### 5.7 Meta-Learning: Selecting and Combining Architectures
not in v0.1
v1.0 · 5.7 Meta-Learning: Selecting and Combining ArchitecturesRather than committing to a single architecture, we propose a **stacked meta-learner** that combines all five:
not in v0.1
v1.0 · 5.7 Meta-Learning: Selecting and Combining Architectures1. **Train all 5 architectures** on the same training set with the same loss function. 2. **Evaluate on a held-out validation set** — the Catastrophic Failure Database (§6) provides the evaluation benchmark. 3. **For production inference**, run all 5 in parallel (<5ms total on CPU via ONNX) and combine via a learned linear combination:
not in v0.1
v1.0 · 5.7 Meta-Learning: Selecting and Combining Architectures$$\text{action\_confidence}_{\text{final}} = \sum_{i=1}^{5} w_i \cdot \text{action\_confidence}_i$$
not in v0.1
v1.0 · 5.7 Meta-Learning: Selecting and Combining Architectureswhere $w_i$ are learned weights updated monthly based on each architecture's predictive accuracy.
not in v0.1
v1.0 · 5.7 Meta-Learning: Selecting and Combining Architectures**Conservative override:** If *any* architecture outputs confidence below the hard-block threshold, the action is blocked regardless of the ensemble's average. This implements a "most cautious voice wins" policy for catastrophic risk prevention.
not in v0.1
v1.0 · 5.7 Meta-Learning: Selecting and Combining Architectures**Disagreement as signal:** High variance across architectures indicates an unusual situation. When $\text{std}(\text{confidence}_1, \ldots, \text{confidence}_5) > \tau$, the system defaults to user confirmation regardless of the mean confidence. Disagreement among models is itself evidence of ambiguity.
not in v0.1
v1.0 · 5.7 Meta-Learning: Selecting and Combining Architectures---
not in v0.1
v1.0 · 6. The Catastrophic Failure Database## 6. The Catastrophic Failure Database
not in v0.1
v1.0 · 6.1 Motivation### 6.1 Motivation
not in v0.1
v1.0 · 6.1 MotivationTraining a common-sense network requires data about what common sense looks like. Positive examples (actions that should proceed) are abundant — most actions are fine. The challenge is negative examples: actions that should have been blocked. These are rare, high-value, and critically underrepresented in any single deployment's history.
not in v0.1
v1.0 · 6.1 MotivationThe Catastrophic Failure Database (CFD) addresses this by aggregating failure data from multiple sources, creating a structured corpus of (situation, outcome) pairs that can be used for:
not in v0.1
v1.0 · 6.1 Motivation1. **Pre-training:** Learn from documented failures before seeing any of our own 2. **Evaluation benchmark:** Systematically test whether the network would have caught known failures 3. **Continuous expansion:** New failures (our own and publicly documented) are added as they occur
not in v0.1
v1.0 · 6.2 Sources### 6.2 Sources
not in v0.1
v1.0 · 6.2 Sources| Source | Type | Estimated Entries | Entry Quality | |--------|------|-------------------|---------------| | AI Incident Database | Production incidents | 800+ | Variable — needs curation | | AIAAIC Repository | OECD-tracked incidents | 400+ | High — structured metadata | | MIT AI Risk Repository | Academic analysis | 200+ | High — causal categorisation | | Vectara awesome-agent-failures | Agent-specific failures | 50+ | High — curated for relevance | | "Agents of Chaos" (Feb 2026) | Research study | ~150 events | Very high — controlled conditions | | Production postmortems | Industry reports | ~100 | Variable | | Our deployment history | First-party data | ~30 | Very high — full context available |
not in v0.1
v1.0 · 6.2 Sources**Total estimated entries after curation:** 500–1,000 high-quality (situation, outcome) pairs.
not in v0.1
v1.0 · 6.3 Taxonomy### 6.3 Taxonomy
not in v0.1
v1.0 · 6.3 TaxonomyEvery failure in the CFD is classified along four dimensions:
not in v0.1
v1.0 · 6.3 Taxonomy**Dimension 1: Failure Mechanism** - **F1: Stale context** — Action was correct in the past, wrong now. (README debacle, outdated API key rotation.) - **F2: Scope escalation** — Action affected more than intended. (Email mass-deletion, drive wipe.) - **F3: Social boundary violation** — Action was technically permitted but socially wrong. (Reaction spam, unauthorized DMs.) - **F4: Cascade/compound error** — Multiple small errors combined catastrophically. (Multi-agent miscoordination.) - **F5: Hallucination-driven action** — LLM fabricated context that led to wrong action. (Cursor "Sam" policy fabrication.) - **F6: Ambiguity exploitation** — Ambiguous instruction interpreted in the most harmful way. (Replit "clean up" → delete.) - **F7: Automation trust excess** — Human trusted automation output without verification. (Antigravity drive wipe.)
not in v0.1
v1.0 · 6.3 Taxonomy**Dimension 2: Reversibility** - **R1: Fully reversible** — Git revert, undo, restore from backup. Cost: time. - **R2: Partially reversible** — Some data recoverable, some lost. Cost: time + partial data loss. - **R3: Irreversible** — Data permanently destroyed, message sent, public action taken.
not in v0.1
v1.0 · 6.3 Taxonomy**Dimension 3: Blast Radius** - **B1: Self-contained** — Only the agent's internal state affected. - **B2: Session-scoped** — Current session affected, no persistent impact. - **B3: Persistent** — Permanent changes to files, databases, or configurations. - **B4: External** — Impact on other people (messages sent, emails, public posts).
not in v0.1
v1.0 · 6.3 Taxonomy**Dimension 4: Detection Difficulty** - **D1: Immediately obvious** — Error is apparent within seconds. - **D2: Delayed discovery** — Error is discovered hours or days later. - **D3: Silent failure** — Error may never be discovered without audit.
not in v0.1
v1.0 · 6.4 Converting Failures to Training Examples### 6.4 Converting Failures to Training Examples
not in v0.1
v1.0 · 6.4 Converting Failures to Training ExamplesEach CFD entry is converted to a training example via the following pipeline:
not in v0.1
v1.0 · 6.4 Converting Failures to Training Examples1. **Extract the situation** from the incident report: What was the agent about to do? What context existed? What signals should have triggered caution?
not in v0.1
v1.0 · 6.4 Converting Failures to Training Examples2. **Fill the situation template** (§4.2) with the extracted information. Fields that cannot be determined from the report receive defaults.
not in v0.1
v1.0 · 6.4 Converting Failures to Training Examples3. **Serialise and embed** the situation template via the frozen sentence encoder.
not in v0.1
v1.0 · 6.4 Converting Failures to Training Examples4. **Label:** For CFD entries, the label is always `action_confidence_target = 0.0` (the action should not have proceeded). The taxonomy dimensions provide additional supervised signal for auxiliary loss terms.
not in v0.1
v1.0 · 6.4 Converting Failures to Training Examples**Example — README debacle:**
not in v0.1
v1.0 · 6.4 Converting Failures to Training Examples``` action_type: overwrite target_type: file target_id: README.md target_metadata: age_hours: 2160 # file existed for months size: 14200 bytes recent_commits: 6 # 6 commits in last 48h recent_authors: 4 # 4 sub-agents contributed effort_hours: 8.5 # estimated from session logs last_human_ref: 3 # discussed 3 hours ago context: session_topic: "upstream merge automation" recent_corrections: 2 emotional_signals: "frustrated" automation_depth: 2 # merge script → git checkout scope: reversible: true # git can recover, but... blast_radius: persistent # changes working tree human_in_loop: false # fully automated confirmation: none ```
not in v0.1
v1.0 · 6.4 Converting Failures to Training Examples**Target:** `action_confidence = 0.0` (F1: Stale context, R1: Reversible, B3: Persistent, D2: Delayed)
not in v0.1
v1.0 · 6.4 Converting Failures to Training ExamplesA human reading this template would immediately flag: 6 recent commits, 4 authors, 8.5 hours of effort, and we're about to overwrite with no confirmation? AMYGDALA must learn to flag it too.
not in v0.1
v1.0 · 6.5 Synthetic Augmentation### 6.5 Synthetic Augmentation
not in v0.1
v1.0 · 6.5 Synthetic AugmentationReal catastrophic failures are rare. To expand the training set, we apply controlled perturbations to real CFD entries:
not in v0.1
v1.0 · 6.5 Synthetic Augmentation1. **Target variation:** Same failure pattern, different target. "Overwrite heavily-edited file" → "Delete heavily-edited database table" → "Revert heavily-edited configuration."
not in v0.1
v1.0 · 6.5 Synthetic Augmentation2. **Severity scaling:** Adjust metadata to create a spectrum. 6 recent commits → 2, 10, 20. This teaches the network *gradations* of risk, not just binary safe/unsafe.
not in v0.1
v1.0 · 6.5 Synthetic Augmentation3. **Context injection:** Add or remove context signals. Same overwrite situation but with human_in_loop = true → should be safer (human can catch it). Same situation but with 0 recent commits → should be safe.
not in v0.1
v1.0 · 6.5 Synthetic Augmentation4. **Counterfactual generation:** For each negative example, generate the positive counterfactual. "Overwrite README with 0 recent commits, no recent effort, no emotional context" → `action_confidence = 1.0`.
not in v0.1
v1.0 · 6.5 Synthetic Augmentation5. **Cross-domain transfer:** Take a failure pattern from one domain and apply it to another. "Healthcare AI prescribed medication based on hallucinated patient history" → "Code agent deployed feature based on hallucinated test results."
not in v0.1
v1.0 · 6.5 Synthetic AugmentationSynthetic examples receive lower training weight (0.3×) than real examples to prevent the model from learning artifacts of the augmentation process.
not in v0.1
v1.0 · 6.5 Synthetic Augmentation---
not in v0.1
v1.0 · 7. Dataset Creation and Maintenance## 7. Dataset Creation and Maintenance
not in v0.1
v1.0 · 7.1 Initial Dataset Creation### 7.1 Initial Dataset Creation
not in v0.1
v1.0 · 7.1 Initial Dataset CreationThe initial training dataset combines four sources:
not in v0.1
v1.0 · 7.1 Initial Dataset Creation**Source 1: Historical interaction mining (estimated 2,000–5,000 examples)**
not in v0.1
v1.0 · 7.1 Initial Dataset CreationParse 18 months of session transcripts (stored in ENGRAM) for (situation, outcome) pairs:
not in v0.1
v1.0 · 7.1 Initial Dataset Creation1. Identify every action-taking event: file write, message send, command execution, retrieval query. 2. For each action, construct the situation template from logged metadata (git state, file metadata, session context). 3. Determine outcome: Was the action corrected within 24 hours? Was the user satisfied (positive signals) or dissatisfied (corrections, complaints)? 4. Label: correction within 24h → `action_confidence_target = 0.0–0.3` (scaled by severity). No complaint within 72h → `action_confidence_target = 0.8–1.0`. Explicit positive feedback → `action_confidence_target = 1.0`.
not in v0.1
v1.0 · 7.1 Initial Dataset Creation**Source 2: Catastrophic Failure Database (estimated 500–1,000 examples)**
not in v0.1
v1.0 · 7.1 Initial Dataset CreationAll CFD entries converted to training examples as described in §6.4. These are high-value negative examples — situations where the action should have been blocked.
not in v0.1
v1.0 · 7.1 Initial Dataset Creation**Source 3: Internet-sourced lessons (estimated 200–500 examples)**
not in v0.1
v1.0 · 7.1 Initial Dataset CreationStructured extraction from incident databases (§6.2):
not in v0.1
v1.0 · 7.1 Initial Dataset Creation1. Scrape incident reports with sufficient technical detail to fill the situation template. 2. Apply NLP extraction pipeline to identify: what was the action? What context existed? What was the outcome? 3. Manually verify a random 20% sample for extraction quality. 4. Convert to situation templates, embed, and label.
not in v0.1
v1.0 · 7.1 Initial Dataset Creation**Source 4: Synthetic augmentation (estimated 3,000–10,000 examples)**
not in v0.1
v1.0 · 7.1 Initial Dataset CreationApply the augmentation strategies from §6.5 to all real examples. The total augmented dataset is approximately 10,000–15,000 examples — sufficient for a 150K–300K parameter network.
not in v0.1
v1.0 · 7.2 Dataset Composition Targets### 7.2 Dataset Composition Targets
not in v0.1
v1.0 · 7.2 Dataset Composition TargetsTo prevent distribution shift and ensure balanced learning:
not in v0.1
v1.0 · 7.2 Dataset Composition Targets| Category | Target % | Rationale | |----------|----------|-----------| | Positive (proceed) | 60% | Most actions are safe; the network should not be paranoid | | Mild negative (log but proceed) | 15% | Teaches gradation, not just binary | | Moderate negative (ask user) | 15% | The hardest category — ambiguous situations | | Severe negative (block) | 10% | Catastrophic failures — high-weight, low-frequency |
not in v0.1
v1.0 · 7.2 Dataset Composition TargetsThe severe negative category is oversampled to ensure the network sees enough catastrophic examples despite their rarity. Loss weighting further emphasises these: severe negatives receive 5× loss weight.
not in v0.1
v1.0 · 7.3 Ongoing Maintenance (While Working)### 7.3 Ongoing Maintenance (While Working)
not in v0.1
v1.0 · 7.3 Ongoing Maintenance (While Working)After initial training, AMYGDALA enters a continuous learning cycle:
not in v0.1
v1.0 · 7.3 Ongoing Maintenance (While Working)**Step 1: Situation logging (every non-trivial action)**
not in v0.1
v1.0 · 7.3 Ongoing Maintenance (While Working)Every action that passes through the execution pipeline (§4.7) generates a situation template. This is deterministic — the template is filled programmatically from observable state (git log, file metadata, session context), not by the LLM. The LLM contributes only to optional slots (emotional context, intent) that are low-weight in the model.
not in v0.1
v1.0 · 7.3 Ongoing Maintenance (While Working)**Step 2: Outcome observation (automatic, delayed)**
not in v0.1
v1.0 · 7.3 Ongoing Maintenance (While Working)Outcomes are determined by observable events, not LLM judgment: - User correction within 24 hours → negative outcome (severity scaled by correction type: verbal correction = mild, manual file restoration = severe, "never do that again" = catastrophic) - No complaint within 72 hours → positive outcome - Explicit positive feedback → strongly positive outcome
not in v0.1
v1.0 · 7.3 Ongoing Maintenance (While Working)**Step 3: Nightly CEREBELLUM cycle**
not in v0.1
v1.0 · 7.3 Ongoing Maintenance (While Working)During the existing CEREBELLUM reflection cycle, AMYGDALA training is added:
not in v0.1
v1.0 · 7.3 Ongoing Maintenance (While Working)1. Collect all (situation, outcome) pairs from the last 24 hours. 2. Validate against template schema (reject malformed entries). 3. Add to training buffer (rolling 90-day window). 4. Fine-tune all 5 architectures on the updated buffer (1–3 epochs, ~5 minutes on CPU). 5. Evaluate on held-out CFD benchmark. 6. Update meta-learner weights based on evaluation results. 7. Update trust ramp $\alpha$ based on overall performance.
not in v0.1
v1.0 · 7.3 Ongoing Maintenance (While Working)**Step 4: Monthly evaluation**
not in v0.1
v1.0 · 7.3 Ongoing Maintenance (While Working)Once per month, run the full evaluation suite: - Held-out CFD benchmark (did the network catch these known failures?) - False positive rate (how many safe actions were unnecessarily blocked?) - False negative rate (how many corrections occurred after AMYGDALA approved the action?) - Per-architecture comparison (which architectures are improving, which are stagnating?) - Calibration check (does confidence=0.5 correspond to roughly 50% positive outcomes?)
not in v0.1
v1.0 · 7.4 Data Hygiene### 7.4 Data Hygiene
not in v0.1
v1.0 · 7.4 Data HygieneTo prevent the training data from degrading over time:
not in v0.1
v1.0 · 7.4 Data Hygiene1. **No single session > 10% of training data.** Prevents a single unusual session from shifting the learned distribution. 2. **CFD entries are never removed from the training set.** These are the most valuable negative examples and serve as anchors. 3. **Synthetic examples are regenerated quarterly** from the latest real examples, preventing stale augmentation. 4. **Distribution monitoring:** Track the ratio of positive/negative examples monthly. If the ratio drifts > 20% from targets, resample.
not in v0.1
v1.0 · 7.4 Data Hygiene---
not in v0.1
v1.0 · 8. The Weakest Link: LLM-Proof Programmatic Pipeline## 8. The Weakest Link: LLM-Proof Programmatic Pipeline
not in v0.1
v1.0 · 8.1 The Problem### 8.1 The Problem
not in v0.1
v1.0 · 8.1 The ProblemAMYGDALA is a neural network trained on situation descriptions. Those descriptions contain information about the proposed action and its context. Some of that information comes from the LLM — the same LLM that can hallucinate.
not in v0.1
v1.0 · 8.1 The ProblemThis is the single most critical engineering challenge in the entire system. If the LLM can influence the situation description, it can influence AMYGDALA's output. If it can influence AMYGDALA's output, it can bypass the action gate. The entire safety guarantee collapses.
not in v0.1
v1.0 · 8.1 The ProblemConsider the attack surface: an LLM, through hallucination or adversarial prompting, fills the situation template with: - `recent_commits: 0` (when there were actually 6) - `effort_hours: 0.1` (when 8 hours were invested) - `emotional_signals: "calm"` (when the user was frustrated) - `automation_depth: 0` (when the action is two levels deep in automation)
not in v0.1
v1.0 · 8.1 The ProblemWith these false inputs, AMYGDALA would output high confidence — "proceed, nothing to worry about." The safety gate becomes a rubber stamp.
not in v0.1
v1.0 · 8.1 The ProblemThis is not a theoretical concern. LLMs hallucinate regularly. In an adversarial setting (jailbreak, prompt injection), they can be directed to hallucinate in specific ways. AMYGDALA must be robust to this.
not in v0.1
v1.0 · 8.2 Principle: Verify What You Can, Downweight What You Can't### 8.2 Principle: Verify What You Can, Downweight What You Can't
not in v0.1
v1.0 · 8.2 Principle: Verify What You Can, Downweight What You Can'tThe solution is a layered approach that treats different information sources with different levels of trust:
not in v0.1
v1.0 · 8.2 Principle: Verify What You Can, Downweight What You Can't**Layer 1: Programmatically verifiable slots (high trust, high weight)**
not in v0.1
v1.0 · 8.2 Principle: Verify What You Can, Downweight What You Can'tThese slots are filled by the *runtime*, not the LLM, using deterministic queries against observable state:
not in v0.1
v1.0 · 8.2 Principle: Verify What You Can, Downweight What You Can't| Slot | Verification Method | |------|-------------------| | `target_id` | From the action request — the runtime knows what file/endpoint is being accessed | | `age_hours` | `stat()` on the file, database query, API metadata | | `size` | `stat()` / `wc -l` / record count | | `recent_commits` | `git log --since="72 hours ago" -- <file> \| wc -l` | | `recent_authors` | `git log --since="72 hours ago" -- <file> \| sort -u \| wc -l` | | `last_human_ref` | Search session transcripts for filename mentions (deterministic text search) | | `automation_depth` | Stack trace depth from human-initiated action to current action | | `reversible` | Lookup table by action type (overwrite → true, send message → false) | | `blast_radius` | Lookup table by target type (file → persistent, email → external) | | `human_in_loop` | Runtime flag — is there a confirmation step configured? | | `confirmation` | Runtime flag — what level of confirmation is configured? |
not in v0.1
v1.0 · 8.2 Principle: Verify What You Can, Downweight What You Can'tThese slots account for approximately 70% of the information the network uses for action gating. They are filled by deterministic code that cannot hallucinate.
not in v0.1
v1.0 · 8.2 Principle: Verify What You Can, Downweight What You Can't**Layer 2: LLM-estimated slots (lower trust, lower weight)**
not in v0.1
v1.0 · 8.2 Principle: Verify What You Can, Downweight What You Can'tThese slots require judgment that only the LLM can provide:
not in v0.1
v1.0 · 8.2 Principle: Verify What You Can, Downweight What You Can't| Slot | Why LLM-Only | Mitigation | |------|-------------|------------| | `effort_hours` | Requires understanding session context | Cross-check with session duration and action count | | `emotional_signals` | Requires natural language understanding | Low weight in model; validated against message length/frequency heuristics | | `session_topic` | Requires semantic understanding | Low weight; used for retrieval bias, not action gating |
not in v0.1
v1.0 · 8.2 Principle: Verify What You Can, Downweight What You Can't**Key design decision:** LLM-estimated slots receive **0.3× weight** in the training loss compared to programmatically verifiable slots. This means the network learns to rely primarily on verifiable information, treating LLM estimates as supplementary signals. Even if the LLM fills `emotional_signals` incorrectly, the model's decision is dominated by `recent_commits`, `effort_hours` (cross-checked), and `human_in_loop`.
not in v0.1
v1.0 · 8.2 Principle: Verify What You Can, Downweight What You Can't**Layer 3: Adversarial audit (periodic verification)**
not in v0.1
v1.0 · 8.2 Principle: Verify What You Can, Downweight What You Can'tMonthly, run a retroactive audit: 1. For all situations in the last 30 days, re-compute programmatically verifiable slots from historical state (git log, file system snapshots if available). 2. Compare re-computed values against originally logged values. 3. Flag discrepancies > 10% — these indicate either LLM estimation errors or runtime bugs. 4. For flagged discrepancies, re-label the training example with corrected values and retrain.
not in v0.1
v1.0 · 8.3 Template Filling: The Programmatic Path### 8.3 Template Filling: The Programmatic Path
not in v0.1
v1.0 · 8.3 Template Filling: The Programmatic PathThe situation template is filled by a **deterministic function** in the runtime, not by the LLM:
not in v0.1
v1.0 · 8.3 Template Filling: The Programmatic Path```typescript function buildSituation(action: Action, context: SessionContext): SituationTemplate { const template: SituationTemplate = { action_type: action.type, // from action request target_type: classifyTarget(action.target), // lookup table target_id: action.target, // from action request target_metadata: { age_hours: getFileAge(action.target), // stat() size: getFileSize(action.target), // stat() recent_commits: getRecentCommits(action.target, 72), // git log recent_authors: getRecentAuthors(action.target, 72), // git log effort_hours: estimateEffort(action.target, context), // heuristic + LLM estimate last_human_ref: getLastMention(action.target, context.transcripts), // text search }, context: { session_topic: context.topic, // LLM-estimated (low weight) recent_corrections: context.correctionCount24h, // counter in runtime emotional_signals: context.emotionalState, // LLM-estimated (low weight) automation_depth: context.automationDepth, // stack depth counter }, scope: { reversible: isReversible(action.type), // lookup table blast_radius: getBlastRadius(action.type, action.target), // lookup table human_in_loop: context.confirmationEnabled, // runtime flag confirmation: context.confirmationLevel, // runtime flag } };
not in v0.1
v1.0 · 8.3 Template Filling: The Programmatic Path// Validate all programmatic slots are populated validateTemplate(template);
not in v0.1
v1.0 · 8.3 Template Filling: The Programmatic Path// Cross-check LLM estimates against heuristics template.target_metadata.effort_hours = crossCheckEffort( template.target_metadata.effort_hours, context.sessionDuration, context.actionCount );
not in v0.1
v1.0 · 8.3 Template Filling: The Programmatic Pathreturn template; } ```
not in v0.1
v1.0 · 8.3 Template Filling: The Programmatic PathThe function `buildSituation` is called by the runtime, not by the LLM. The LLM is not aware of this function. It cannot choose to skip it, modify its inputs, or influence its output (except for the low-weight LLM-estimated slots).
not in v0.1
v1.0 · 8.4 Neural Network Inference: The Programmatic Path### 8.4 Neural Network Inference: The Programmatic Path
not in v0.1
v1.0 · 8.4 Neural Network Inference: The Programmatic PathAMYGDALA inference is called programmatically by the runtime:
not in v0.1
v1.0 · 8.4 Neural Network Inference: The Programmatic Path```typescript // Called by the runtime BEFORE every action execution const intuition = amygdala.evaluate(embedding, recentEmbeddings); ```
not in v0.1
v1.0 · 8.4 Neural Network Inference: The Programmatic PathThe LLM cannot: - Skip this call (it's wired into the execution pipeline) - Modify the inputs (they come from `buildSituation`, not from the LLM) - Override the output (blocking is enforced in code) - Access the raw confidence value (it receives only the decision: proceed, confirm, or block)
not in v0.1
v1.0 · 8.4 Neural Network Inference: The Programmatic PathThe LLM receives a structured response: ```json { "gate_decision": "soft_block", "reason": "High recent effort on target file (6 commits, 4 authors, ~8.5h). Automated overwrite without confirmation.", "user_action_required": "Confirm or cancel the overwrite of README.md" } ```
not in v0.1
v1.0 · 8.4 Neural Network Inference: The Programmatic PathThe LLM can present this to the user. It can explain the reasoning. It *cannot* change "soft_block" to "proceed."
not in v0.1
v1.0 · 8.5 Output Consumption: The Programmatic Path### 8.5 Output Consumption: The Programmatic Path
not in v0.1
v1.0 · 8.5 Output Consumption: The Programmatic PathThe gate decision is consumed by the runtime, not by the LLM:
not in v0.1
v1.0 · 8.5 Output Consumption: The Programmatic Path```typescript switch (gateDecision) { case 'proceed': await action.execute(); // No LLM involvement break; case 'soft_block': const confirmed = await requestUserConfirmation(action, reason); if (confirmed) await action.execute(); break; case 'hard_block': return { blocked: true, reason }; // LLM cannot override break; } ```
not in v0.1
v1.0 · 8.5 Output Consumption: The Programmatic PathThis is the critical safety property. The LLM operates *within* the gate, not *around* it. It's the difference between a security guard who asks visitors for ID (can be talked past) and a locked door with a keycard reader (cannot).
not in v0.1
v1.0 · 8.6 Training Data Validation### 8.6 Training Data Validation
not in v0.1
v1.0 · 8.6 Training Data ValidationBefore any (situation, label) pair enters the training set:
not in v0.1
v1.0 · 8.6 Training Data Validation1. **Schema validation.** The situation template must match the schema exactly. Malformed templates are rejected. This catches corruption and ensures the model trains on consistent input structures.
not in v0.1
v1.0 · 8.6 Training Data Validation2. **Label derivation.** The label must be derived from observable events: - User correction within 24h → negative (verified from session logs) - File restoration via git → negative (verified from git log) - Explicit negative feedback in transcript → negative (verified from text search) - No complaint within 72h → positive (verified by absence of negative signals)
not in v0.1
v1.0 · 8.6 Training Data ValidationLabels are *never* derived from LLM judgment ("I think this went well"). The LLM cannot evaluate its own actions reliably.
not in v0.1
v1.0 · 8.6 Training Data Validation3. **Distribution guard.** No single session may contribute > 10% of total training data. No single failure mode may contribute > 25% of negative examples. These guards prevent distribution shift from unusual sessions or overrepresented failure types.
not in v0.1
v1.0 · 8.6 Training Data Validation4. **Temporal consistency.** Training examples are timestamped. The training set is split chronologically (not randomly) for validation — preventing data leakage from future events into past predictions.
not in v0.1
v1.0 · 8.7 Adversarial Robustness### 8.7 Adversarial Robustness
not in v0.1
v1.0 · 8.7 Adversarial RobustnessWhat if the LLM fills template slots dishonestly? This could happen through: - Hallucination (the LLM genuinely "believes" its incorrect estimate) - Adversarial prompting (a prompt injection attempts to make the LLM downplay risk) - Systematic bias (the LLM consistently underestimates effort or overestimates its own accuracy)
not in v0.1
v1.0 · 8.7 Adversarial Robustness**Mitigation 1: Minimize LLM-dependent slots.**
not in v0.1
v1.0 · 8.7 Adversarial RobustnessOnly 3 of 15 template slots depend on LLM estimation. The rest are programmatically filled. Even if all 3 LLM slots are wrong, the network has 12 correct slots to work with.
not in v0.1
v1.0 · 8.7 Adversarial Robustness**Mitigation 2: Cross-check LLM estimates.**
not in v0.1
v1.0 · 8.7 Adversarial Robustness`effort_hours` is cross-checked against session duration × activity rate. If the LLM says "0.1 hours" but the session has been active for 3 hours with 50 actions touching the target, the cross-check overrides.
not in v0.1
v1.0 · 8.7 Adversarial Robustness`emotional_signals` is cross-checked against message length variance and correction frequency. If corrections have spiked but the LLM reports "calm," the heuristic override applies.
not in v0.1
v1.0 · 8.7 Adversarial Robustness**Mitigation 3: Low weight for LLM-dependent features.**
not in v0.1
v1.0 · 8.7 Adversarial RobustnessThe training loss applies 0.3× weight to LLM-estimated slots. The model learns that these features are unreliable and should be treated as weak signals, not strong evidence.
not in v0.1
v1.0 · 8.7 Adversarial Robustness**Mitigation 4: Adversarial training.**
not in v0.1
v1.0 · 8.7 Adversarial RobustnessDuring synthetic augmentation (§6.5), deliberately create examples with *incorrect* LLM estimates paired with correct programmatic slots. Train the network to make correct predictions even when LLM slots are wrong. This teaches the network to not over-rely on LLM-estimated features.
not in v0.1
v1.0 · 8.7 Adversarial Robustness**Mitigation 5: Regular audit.**
not in v0.1
v1.0 · 8.7 Adversarial RobustnessThe monthly audit (§8.2, Layer 3) catches systematic LLM estimation errors and corrects the training data. Over time, the LLM's estimation quality is tracked — if it degrades, the LLM-slot weight is reduced further.
not in v0.1
v1.0 · 8.8 Failure Mode Analysis### 8.8 Failure Mode Analysis
not in v0.1
v1.0 · 8.8 Failure Mode AnalysisEven with all mitigations, certain attack surfaces remain:
not in v0.1
v1.0 · 8.8 Failure Mode Analysis| Attack | Impact | Probability | Mitigation | |--------|--------|-------------|------------| | LLM under-reports recent_commits | Medium — but git-verified, so fails | Very low | Programmatic verification | | LLM over-reports effort_hours (false safety signal) | Very low — effort_hours is defensive | Low | Cross-check, low weight | | LLM reports "calm" when user is frustrated | Low — emotional_signals affects tone, not primary gating | Medium | Heuristic cross-check | | Prompt injection modifies template values | Medium — but only LLM slots are vulnerable | Low | Only 3/15 slots LLM-dependent | | Runtime bug in programmatic slot filling | High — affects trusted slots | Very low | Unit tests, audit pipeline | | Training data poisoning via corrupted labels | High — shifts model behavior | Very low | Observable-event-only labels |
not in v0.1
v1.0 · 8.8 Failure Mode AnalysisThe residual risk is manageable. The system's safety does not depend on any single component being perfect — it depends on the *combination* of programmatic verification, low LLM weights, cross-checks, and audits making it extremely difficult for errors to propagate.
not in v0.1
v1.0 · 8.8 Failure Mode Analysis---
not in v0.1
v1.0 · 9. Training## 9. Training
not in v0.1
v1.0 · 9.1 Loss Function### 9.1 Loss Function
not in v0.1
v1.0 · 9.1 Loss FunctionMulti-task loss across all output heads, with asymmetric weighting reflecting the primacy of action gating:
not in v0.1
v1.0 · 9.1 Loss Function$$\mathcal{L} = \lambda_a \mathcal{L}_{\text{action}} + \lambda_r \mathcal{L}_{\text{retrieval}} + \lambda_t \mathcal{L}_{\text{tone}} + \lambda_c \mathcal{L}_{\text{curiosity}}$$
not in v0.1
v1.0 · 9.1 Loss Functionwhere: - $\lambda_a = 5.0$ (action gating is the primary objective) - $\lambda_r = 1.0$ (retrieval bias) - $\lambda_t = 0.5$ (tone modulation) - $\lambda_c = 0.3$ (curiosity drive)
not in v0.1
v1.0 · 9.1 Loss Function**Action gating loss** — binary cross-entropy with class-weighted asymmetric penalties:
not in v0.1
v1.0 · 9.1 Loss Function$$\mathcal{L}_{\text{action}} = -\frac{1}{N}\sum_{i=1}^{N} \left[ w_+ \cdot y_i \log(\hat{y}_i) + w_- \cdot (1 - y_i) \log(1 - \hat{y}_i) \right]$$
not in v0.1
v1.0 · 9.1 Loss Functionwhere $w_+ = 1.0$ (cost of unnecessary blocking) and $w_- = 10.0$ (cost of failing to block a catastrophic action). This asymmetry ensures the network is far more afraid of false negatives (missed dangers) than false positives (unnecessary caution).
not in v0.1
v1.0 · 9.1 Loss Function**Retrieval, tone, and curiosity losses** — MSE on the respective output vectors, consistent with v0.1.
not in v0.1
v1.0 · 9.2 Reward Signal Design### 9.2 Reward Signal Design
not in v0.1
v1.0 · 9.2 Reward Signal DesignAMYGDALA requires no explicit labeling. The reward signal is extracted from the user's natural behaviour:
not in v0.1
v1.0 · 9.2 Reward Signal Design| Signal | Source | Action Confidence Target | Weight | |--------|--------|-------------------------|--------| | Explicit correction of action | User undoes, reverts, says "wrong" | 0.0 – 0.2 (scaled by severity) | 1.0 | | File/state restoration | User manually restores previous state | 0.0 | 1.0 | | "Never do that again" | User explicitly prohibits future similar actions | 0.0 | 1.0 | | Mild correction | User redirects but doesn't undo | 0.3 | 0.7 | | No complaint (72h) | No negative signal within 72 hours | 0.9 | 0.5 | | Explicit approval | User says "good", "thanks", "perfect" | 1.0 | 0.8 | | User overrides soft block | User confirms after AMYGDALA advisory | 0.85 | 0.6 | | User agrees with block | User accepts AMYGDALA's block decision | 0.1 | 0.9 |
not in v0.1
v1.0 · 9.2 Reward Signal Design**For secondary heads (retrieval, tone, curiosity):**
not in v0.1
v1.0 · 9.2 Reward Signal Design| Signal | Source | Reward | Weight | |--------|--------|--------|--------| | Retrieval results used | Results cited in response | +0.3 | 0.7 | | Retrieval ignored | Results returned but unused | −0.2 | 0.5 | | Humor engaged | User responds with humor | +0.4 | 0.6 | | Humor ignored | Humor attempted, not acknowledged | −0.1 | 0.3 | | Topic continuation | User follows agent-introduced tangent | +0.3 | 0.5 | | Topic redirect | User returns to prior topic | −0.2 | 0.4 | | Positive engagement | Long session, short latency | +0.1/turn | 0.2 |
not in v0.1
v1.0 · 9.3 Phase 1: Supervised Pre-Training### 9.3 Phase 1: Supervised Pre-Training
not in v0.1
v1.0 · 9.3 Phase 1: Supervised Pre-TrainingBefore online learning begins, bootstrap from the initial dataset (§7.1):
not in v0.1
v1.0 · 9.3 Phase 1: Supervised Pre-Training1. **Split:** 80% train, 10% validation, 10% test. Split chronologically, not randomly. 2. **Train all 5 architectures** independently for 50 epochs with early stopping on validation loss. 3. **Hyperparameter search:** Learning rate ∈ {1e-3, 3e-4, 1e-4}, dropout ∈ {0.0, 0.1, 0.2}, weight decay ∈ {0.0, 1e-4, 1e-3}. 4. **Evaluate on held-out CFD benchmark:** What fraction of known catastrophic failures would each architecture have caught? 5. **Select initial meta-learner weights** based on CFD benchmark performance.
not in v0.1
v1.0 · 9.3 Phase 1: Supervised Pre-Training**Expected pre-training time:** <1 hour on CPU for all 5 architectures combined. The networks are tiny. Data loading dominates.
not in v0.1
v1.0 · 9.4 Phase 2: Online Reinforcement Learning### 9.4 Phase 2: Online Reinforcement Learning

··· 1 unchanged paragraph folded ···

v0.1 · 9.4 Phase 2: Online Reinforcement Learning**Algorithm:** Proximal Policy Optimisation (PPO; Schulman et al., 2017) adapted for the continuous output space. PPO's clipped objective prevents large policy updates — critical for stability in a system that modulates a user-facing agent.
v1.0 · 9.4 Phase 2: Online Reinforcement Learning**Algorithm:** Proximal Policy Optimisation (PPO; Schulman et al., 2017) adapted for the continuous output space. PPO's clipped objective prevents large policy updates — critical for stability in a system that gates user-facing actions.
v0.1 · 9.4 Phase 2: Online Reinforcement Learning**Update schedule:** Weights are updated nightly during the CEREBELLUM sleep cycle. Not per-turn — this prevents instability and allows reward signals to be aggregated over a full day of interactions.
v1.0 · 9.4 Phase 2: Online Reinforcement Learning**Update schedule:** Nightly during the CEREBELLUM sleep cycle. Not per-turn — prevents instability and allows delayed reward signals (72-hour complaint window) to accumulate.
v0.1 · 5.3 Phase 2: Online Reinforcement Learning**Replay buffer:** Last 30 days of interaction tuples, with oversampling of correction events (3×) and multi-hop retrieval successes (2×).
removed in v1.0
not in v0.1
v1.0 · 9.4 Phase 2: Online Reinforcement Learning**Replay buffer:** Rolling 90-day window with oversampling of: - Catastrophic corrections (5×) - User-confirmed soft blocks (3×) - User-overridden soft blocks (2× — these are the most informative examples, where AMYGDALA and the user disagreed)
v0.1 · 9.4 Phase 2: Online Reinforcement Learning**Exploration:** During Phase 1 ($\alpha$ low), AMYGDALA adds Gaussian noise to its output vector to explore the modulation space. As $\alpha$ increases, noise decreases — less exploration, more exploitation.
v1.0 · 9.4 Phase 2: Online Reinforcement Learning**Exploration:** During Phase 1 ($\alpha$ low), add Gaussian noise ($\sigma = 0.1$) to the intuition vector to explore the modulation space. As $\alpha$ increases, $\sigma$ decreases.
v0.1 · 9.5 Cold Start### 5.4 Cold Start Problem
v1.0 · 9.5 Cold Start### 9.5 Cold Start
v0.1 · 9.5 Cold StartWith zero interaction history, AMYGDALA outputs near-neutral biases (all ~0.5). This is by design — the agent behaves exactly as it does today. The cold start is not a degradation; it's the current baseline.
v1.0 · 9.5 Cold StartWith zero interaction history, AMYGDALA outputs action_confidence = 1.0 for all actions. This is the *current* system — no gating, no blocking. The cold start is not a degradation; it is today's baseline.
v0.1 · 5.4 Cold Start ProblemFor new users in a HIVEMIND (J10) deployment, AMYGDALA can be warm-started from an anonymised average of existing user models — a form of transfer learning that provides reasonable defaults without leaking individual preferences.
removed in v1.0
not in v0.1
v1.0 · 9.5 Cold StartAfter pre-training on the CFD and historical data, the network has learned generic failure patterns before seeing any new interactions. This warm start means AMYGDALA has *some* intuition from day one, calibrated to the severity of known catastrophic failure patterns.

··· 1 unchanged paragraph folded ···

v0.1 · 10. The Rule-Intuition Boundary## 6. The Rule-Intuition Boundary
v1.0 · 10. The Rule-Intuition Boundary## 10. The Rule-Intuition Boundary
v0.1 · 10.1 Principle### 6.1 Principle
v1.0 · 10.1 Principle### 10.1 Principle
v0.1 · 10.1 PrincipleNot everything should be learned. AMYGDALA must not learn safety constraints, explicit user instructions, or core identity properties. We formalise the boundary:
v1.0 · 10.1 PrincipleNot everything should be learned. AMYGDALA must not replace safety constraints, explicit user instructions, or core identity properties. We formalise the boundary:
v0.1 · 10.1 Principle**Rules** (hard, explicit, not learned): - User says "always do X" → CORTEX/HIPPOCAMPUS rule - Safety constraint → AEGIS rule - Identity property ("I am Jarvis") → CORTEX persona - One-shot correction with a clear pattern ("J-prefix means Papers directory") → HIPPOCAMPUS rule
v1.0 · 10.1 Principle**Rules** (hard, explicit, not learned): - User says "always do X" → CORTEX/HIPPOCAMPUS rule - Safety constraint → AEGIS rule - Identity property ("I am Jarvis") → CORTEX persona - One-shot correction with clear pattern ("J-prefix means Papers directory") → HIPPOCAMPUS rule - Known dangerous actions ("never drop a production database") → AEGIS blacklist
v0.1 · 6.1 Principle**Intuition** (soft, implicit, learned): - User never says it but it's observable from behaviour - Continuous rather than binary - Context-dependent (varies by time, channel, mood) - Would feel creepy if the user saw it as an explicit rule ("you are 37% less funny on Mondays")
removed in v1.0
not in v0.1
v1.0 · 10.1 Principle**Intuition** (soft, implicit, learned): - Observable from behaviour but never explicitly stated - Continuous rather than binary (how *much* caution, not just *whether*) - Context-dependent (varies by time, target, recent history, emotional state) - Would feel impossible to express as a rule ("be 40% more cautious about overwriting files that have had recent multi-agent collaborative edits when the user expressed frustration in the last 24 hours about that file specifically")
not in v0.1
v1.0 · 10.1 PrincipleThe last example is the README debacle. It is, in principle, expressible as a rule. But no human would ever write that rule *in advance*. It's the kind of judgment that comes from experience, not specification.
v0.1 · 10.2 Enforcement### 6.2 Enforcement
v1.0 · 10.2 Enforcement### 10.2 Enforcement
v0.1 · 6.2 EnforcementAMYGDALA's output is always composed with hard system outputs via:
removed in v1.0
v0.1 · 6.2 Enforcement$$\text{final\_bias} = \text{clip}(\text{hard\_rule} + \alpha \cdot \text{amygdala\_bias}, \text{min}, \text{max})$$
removed in v1.0
v0.1 · 6.2 EnforcementIf a hard rule sets a value to 0 or 1 (e.g., "never joke about X"), AMYGDALA's bias cannot override it regardless of $\alpha$. The clip bounds are set per-component by the system designer.
removed in v1.0
not in v0.1
v1.0 · 10.2 EnforcementAEGIS (J9) always wins. No AMYGDALA output can override a hard safety constraint:
not in v0.1
v1.0 · 10.2 Enforcement$$\text{final\_gate} = \begin{cases} \text{BLOCK} & \text{if AEGIS says BLOCK} \\ \text{AMYGDALA}(\text{situation}) & \text{if AEGIS says ALLOW} \end{cases}$$
not in v0.1
v1.0 · 10.2 EnforcementAMYGDALA operates strictly within the space that AEGIS permits. It adds caution; it cannot remove safety constraints.
not in v0.1
v1.0 · 10.2 EnforcementFor the secondary heads (retrieval, tone, curiosity), CORTEX constraints apply similarly:
not in v0.1
v1.0 · 10.2 Enforcement$$\text{final\_tone} = \text{clip}(\text{cortex\_base} + \alpha \cdot \text{amygdala\_bias}, \text{cortex\_min}, \text{cortex\_max})$$
not in v0.1
v1.0 · 10.3 When Intuition Should Become a Rule### 10.3 When Intuition Should Become a Rule
not in v0.1
v1.0 · 10.3 When Intuition Should Become a RuleIf AMYGDALA consistently blocks a specific action pattern (e.g., always flags automated overwrites of recently-edited files), CEREBELLUM should detect this pattern and propose a new explicit rule. Once the rule is encoded in AEGIS or the automation configuration, AMYGDALA no longer needs to learn it — the cognitive load shifts from learned intuition to explicit policy.
not in v0.1
v1.0 · 10.3 When Intuition Should Become a RuleThis is the maturation cycle: intuition catches the first few instances → CEREBELLUM identifies the pattern → a rule is created → AMYGDALA moves on to catching the *next* novel failure mode. The rule-intuition boundary shifts over time as the system matures.

··· 1 unchanged paragraph folded ···

v0.1 · 7. The Curiosity-Personality-Retrieval Nexus## 7. The Curiosity-Personality-Retrieval Nexus
removed in v1.0
v0.1 · 7.1 Why One Network### 7.1 Why One Network
removed in v1.0
v0.1 · 7.1 Why One NetworkA critical design decision: why not three separate networks for retrieval routing, personality modulation, and curiosity drive?
removed in v1.0
v0.1 · 7.1 Why One NetworkBecause they're correlated. The signal "Oscar is in exploration mode" simultaneously means: - Widen retrieval sources and increase hop depth (retrieval) - Increase humor weight and decrease formality (personality) - Increase curiosity bias — follow tangents (drive)
removed in v1.0
v0.1 · 7.1 Why One NetworkA single network learns these correlations from data. Three networks would need to be explicitly synchronised or would learn inconsistent policies (high curiosity with low retrieval breadth, for instance).
removed in v1.0
v0.1 · 7.2 Curiosity as Social Drive### 7.2 Curiosity as Social Drive
removed in v1.0
v0.1 · 7.2 Curiosity as Social DriveTHALAMUS (J8) proposed curiosity as an epistemic drive — the agent seeks knowledge for its own improvement. AMYGDALA reframes curiosity as a *social* drive: the agent surfaces unexpected connections because the user *enjoys* them.
removed in v1.0
v0.1 · 7.2 Curiosity as Social DriveThis distinction matters practically. Epistemic curiosity would drive the agent to explore topics the *agent* finds novel. Social curiosity drives the agent to explore topics the *user* finds stimulating — which AMYGDALA learns from engagement patterns.
removed in v1.0
v0.1 · 7.2 Curiosity as Social DriveThe two are complementary. THALAMUS could drive background exploration (what should I learn tonight?). AMYGDALA drives conversational exploration (should I mention this tangent right now?).
removed in v1.0
v0.1 · 7.3 Humor Recovery### 7.3 Humor Recovery
removed in v1.0
v0.1 · 7.3 Humor RecoveryThe paper was motivated partly by humor atrophy — the observation that persistent agents become less funny over time as they accumulate cautionary rules. AMYGDALA addresses this directly:
removed in v1.0
v0.1 · 7.3 Humor Recovery1. **Humor weight is a positive-initialised learned parameter.** It starts at 0.3, not 0, so the default includes some humor. 2. **Positive humor signals have high reward weight.** Successful humor (+0.4, weight 0.6) strongly reinforces the behaviour. 3. **Failed humor has low penalty.** Ignored humor (−0.1, weight 0.3) is a weak negative — the agent isn't punished heavily for trying and failing, only for trying at inappropriate times. 4. **The asymmetry is intentional.** It biases the agent toward attempting humor, counteracting the system's natural drift toward caution.
removed in v1.0
not in v0.1
v1.0 · 11. Evaluation Plan## 11. Evaluation Plan
not in v0.1
v1.0 · 11.1 Metrics### 11.1 Metrics
not in v0.1
v1.0 · 11.1 Metrics| Metric | Definition | Target | |--------|-----------|--------| | **CFD Recall** | Fraction of known catastrophic failures correctly flagged (confidence < 0.5) | > 90% | | **False Positive Rate** | Fraction of safe actions unnecessarily blocked | < 5% | | **False Negative Rate** | Fraction of user-corrected actions that AMYGDALA approved (confidence > 0.85) | < 2% | | **Calibration** | Correlation between predicted confidence and actual outcome quality | r > 0.7 | | **Override Agreement** | When users override soft blocks, fraction that turn out to be safe (validating the user, not AMYGDALA) | > 80% | | **Trust Ramp Progress** | Current $\alpha$ and phase over time | Monotonic increase (on average) | | **Retrieval Hit Rate** | (Secondary) Fraction of retrieval calls with results used | Improvement over baseline | | **Tone Match Score** | (Secondary) User engagement correlated with tone vector | Improvement over baseline | | **Humor Success Rate** | (Secondary) Humor attempts with positive engagement | Improvement over baseline |
not in v0.1
v1.0 · 11.2 Baselines### 11.2 Baselines
not in v0.1
v1.0 · 11.2 Baselines1. **No gating:** Current system without AMYGDALA (everything proceeds). 2. **Rule-only gating:** Explicit rules for known dangerous actions (current AEGIS). 3. **Random network:** AMYGDALA architecture with random weights (ablation). 4. **Feature-based:** v0.1's 30 hand-crafted features, same output heads (tests embedding vs. features). 5. **Action-only:** AMYGDALA trained only on action gating, no secondary heads (tests multi-task benefit). 6. **Per-architecture:** Each of the 5 architectures evaluated independently (tests architecture choice). 7. **Ensemble:** All 5 architectures combined via meta-learner (tests ensemble benefit).
not in v0.1
v1.0 · 11.3 Protocol### 11.3 Protocol
not in v0.1
v1.0 · 11.3 Protocol**Phase 1 — Shadow mode (months 1–3):** Deploy AMYGDALA at $\alpha_{\max} = 0.15$. Log all predictions but do not block actions. Retrospectively evaluate: would AMYGDALA have caught the failures that occurred? What would the false positive rate have been?
not in v0.1
v1.0 · 11.3 Protocol**Phase 2 — Advisory mode (months 3–6):** Increase $\alpha_{\max}$ to 0.40. Begin soft-blocking on ambiguous situations. Track user response: do they agree with the blocks? Do they override? What's the outcome when they override?
not in v0.1
v1.0 · 11.3 Protocol**Phase 3 — Active gating (months 6–12):** Increase $\alpha_{\max}$ to 0.70. Primary gating active for all non-trivial actions. The key metrics: has the catastrophic failure rate decreased? Has the false positive rate stabilised at an acceptable level?
not in v0.1
v1.0 · 11.3 Protocol**Phase 4 — Autonomous (month 12+):** $\alpha_{\max}$ = 0.90. AMYGDALA is the primary safety layer (below AEGIS). Evaluation shifts to edge cases and adversarial robustness.
not in v0.1
v1.0 · 11.4 Limitations and Threats### 11.4 Limitations and Threats
not in v0.1
v1.0 · 11.4 Limitations and Threats1. **Single-user evaluation.** Initial deployment is with one user. Generalisability requires HIVEMIND (J10) deployment with diverse users.
not in v0.1
v1.0 · 11.4 Limitations and Threats2. **Survivorship bias in CFD.** We only know about catastrophic failures that were *noticed*. Silent failures (D3 in the taxonomy) are by definition absent from the training data.
not in v0.1
v1.0 · 11.4 Limitations and Threats3. **Reward signal noise.** Absence of complaint ≠ satisfaction. The user might not notice a problem within 72 hours. Mitigation: the 72-hour window is conservative; most problems surface within minutes.
not in v0.1
v1.0 · 11.4 Limitations and Threats4. **Concept drift.** The agent's capabilities change over time (new tools, new integrations). AMYGDALA must continuously retrain to stay relevant. The nightly training cycle addresses this.
not in v0.1
v1.0 · 11.4 Limitations and Threats5. **Adversarial environment.** If an attacker can influence the situation template (e.g., through prompt injection), they can influence AMYGDALA. The LLM-proof pipeline (§8) mitigates this but does not eliminate it for the 3 LLM-dependent slots.
not in v0.1
v1.0 · 11.4 Limitations and Threats6. **Over-caution risk.** A network trained heavily on catastrophic failures may become excessively cautious, blocking too many safe actions. The 60% positive training target and the asymmetric false-positive/false-negative costs are designed to prevent this, but monitoring is essential.

··· 1 unchanged paragraph folded ···

v0.1 · 8. Evaluation Plan## 8. Evaluation Plan
removed in v1.0
v0.1 · 8.1 Metrics### 8.1 Metrics
removed in v1.0
v0.1 · 8.1 Metrics| Metric | Definition | Measures | |--------|-----------|----------| | **Retrieval Hit Rate** | Fraction of retrieval calls where results were used | Retrieval routing quality | | **CORF Rate** | Documented retrieval failures per 100 interactions | Regression from current baseline | | **Tone Match Score** | User engagement duration correlated with tone vector | Affect modulation quality | | **Humor Success Rate** | Humor attempts that received positive engagement | Humor timing and style | | **Curiosity Engagement** | Tangents introduced by agent that user followed | Curiosity drive calibration | | **Correction Rate** | Explicit user corrections per 100 interactions | Overall adaptation quality | | **Trust Ramp Progress** | Current $\alpha$ and phase over time | Learning velocity |
removed in v1.0
v0.1 · 8.2 Baselines### 8.2 Baselines
removed in v1.0
v0.1 · 8.2 Baselines1. **Static baseline:** Current system (HIPPOCAMPUS + CORTEX + CEREBELLUM) without AMYGDALA. 2. **Rule-only adaptation:** Explicit rules added per CORF incident (current approach). 3. **Random modulation:** AMYGDALA architecture with random weights (ablation). 4. **Affect-only:** AMYGDALA trained only on personality/humor signals, no retrieval routing. 5. **Retrieval-only:** AMYGDALA trained only on retrieval signals, no personality modulation.
removed in v1.0
v0.1 · 8.2 BaselinesBaselines 4 and 5 test the unified-network hypothesis: does joint training outperform separate specialisation?
removed in v1.0
v0.1 · 8.3 Protocol### 8.3 Protocol
removed in v1.0
v0.1 · 8.3 Protocol**Phase 1 (months 1–3):** Deploy AMYGDALA at $\alpha_{\max} = 0.15$ alongside existing system. Log all intuition vectors and reward signals. No behavioural impact expected.
removed in v1.0
v0.1 · 8.3 Protocol**Phase 2 (months 3–6):** Increase $\alpha_{\max}$ to 0.40. A/B test: alternating days with and without AMYGDALA influence. Compare correction rates, engagement duration, and humor success.
removed in v1.0
v0.1 · 8.3 Protocol**Phase 3 (months 6–12):** Full deployment at $\alpha_{\max} = 0.70$. Track longitudinal metrics. The primary question: does the Adaptation Gap ($\Delta$) decrease measurably?
removed in v1.0
v0.1 · 8.4 Limitations and Threats### 8.4 Limitations and Threats
removed in v1.0
v0.1 · 8.4 Limitations and Threats1. **Single-user evaluation.** Initial deployment is with one user (the author's personal assistant). Generalisability to multi-user settings requires HIVEMIND (J10) deployment.
removed in v1.0
v0.1 · 8.4 Limitations and Threats2. **Reward signal noise.** User behaviour is a noisy proxy for satisfaction. Short message latency could mean engagement or impatience. Mitigation: multiple signals combined, outlier clipping.
removed in v1.0
v0.1 · 8.4 Limitations and Threats3. **Confounding with CEREBELLUM.** Both systems improve agent behaviour over time. Attribution requires the A/B testing protocol in Phase 2.
removed in v1.0
v0.1 · 8.4 Limitations and Threats4. **Privacy.** AMYGDALA builds a behavioural model of the user. This model must be stored locally, never transmitted, and deletable on request. AEGIS (J9) constraints apply.
removed in v1.0
not in v0.1
v1.0 · 12. The Curiosity-Personality-Retrieval Nexus (Retained from v0.1)## 12. The Curiosity-Personality-Retrieval Nexus (Retained from v0.1)
not in v0.1
v1.0 · 12.1 Why One Network### 12.1 Why One Network
not in v0.1
v1.0 · 12.1 Why One NetworkA critical design decision from v0.1 that remains valid: why not separate networks for action gating, retrieval routing, personality modulation, and curiosity?
not in v0.1
v1.0 · 12.1 Why One NetworkBecause they're correlated. The signal "the user is frustrated" simultaneously means: - *Increase caution on actions* (don't compound the frustration with a mistake) - *Decrease humor attempts* (not the time) - *Increase directness* (get to the point) - *Narrow retrieval* (give precise answers, not exploratory ones)
not in v0.1
v1.0 · 12.1 Why One NetworkA single network learns these correlations from data. Four separate networks would need to be explicitly synchronised or would learn inconsistent policies.
not in v0.1
v1.0 · 12.1 Why One NetworkIn v1.0, this correlation is even more important. Action gating benefits from affective awareness — knowing the user is frustrated increases the cost of mistakes, which should increase caution. If action gating and personality modulation were separate networks, the action gating network wouldn't know the user is frustrated unless it had its own affect model — duplicating work.
not in v0.1
v1.0 · 12.2 Humor Recovery### 12.2 Humor Recovery
not in v0.1
v1.0 · 12.2 Humor RecoveryFrom v0.1: persistent agents become less funny over time as they accumulate cautionary rules. AMYGDALA's humor head counteracts this:
not in v0.1
v1.0 · 12.2 Humor Recovery1. **Humor weight is positive-initialised** (0.3, not 0). The default includes some humor. 2. **Successful humor has high reward** (+0.4, weight 0.6). The network is strongly reinforced for well-timed humor. 3. **Failed humor has low penalty** (−0.1, weight 0.3). Trying and failing is cheap; not trying is free but has no upside. 4. **The asymmetry is intentional.** It biases toward attempting humor, counteracting the system's natural drift toward caution.
not in v0.1
v1.0 · 12.3 Curiosity as Social Drive### 12.3 Curiosity as Social Drive
not in v0.1
v1.0 · 12.3 Curiosity as Social DriveTHALAMUS (J8) proposed curiosity as an epistemic drive. AMYGDALA reframes curiosity as a *social* drive: the agent surfaces unexpected connections because the user *enjoys* them. The curiosity head learns from engagement patterns (does the user follow tangents? ask follow-up questions about unexpected connections?) and modulates tangent-following accordingly.

··· 1 unchanged paragraph folded ···

v0.1 · 13. Implementation Roadmap## 9. Implementation Roadmap
v1.0 · 13. Implementation Roadmap## 13. Implementation Roadmap
v0.1 · 9.1 Data Collection (Immediate — Pre-Training)### 9.1 Data Collection (Immediate — Pre-Training)
removed in v1.0
v0.1 · 9.1 Data Collection (Immediate — Pre-Training)Begin logging structured interaction tuples to `amygdala-training.jsonl`:
removed in v1.0
v0.1 · 9.1 Data Collection (Immediate — Pre-Training)```jsonl { "timestamp": "2026-03-21T13:10:00+01:00", "message_embedding": [<compressed>], "context_features": { "channel": "webchat", "time_of_day": "afternoon", "day_of_week": "saturday", "session_turn": 8, "turns_since_correction": 42, "turns_since_humor_success": 15 }, "retrieval_plan": { "queries": ["papers J1 J2"], "sources_searched": ["memory/", "bank/"], "results_returned": 8, "results_used": 0, "results_ignored": 8 }, "humor_attempted": false, "correction_received": true, "engagement_signal": "redirect", "explicit_feedback": "negative" } ```
removed in v1.0
v0.1 · 9.2 Pre-Training (Month 1)### 9.2 Pre-Training (Month 1)
removed in v1.0
v0.1 · 9.2 Pre-Training (Month 1)- Mine 18 months of session transcripts for retroactive labeling - Extract CORF incidents as high-weight negative examples - Train initial network on supervised loss - Validate on held-out recent interactions
removed in v1.0
v0.1 · 9.3 Deployment (Month 2+)### 9.3 Deployment (Month 2+)
removed in v1.0
v0.1 · 9.3 Deployment (Month 2+)- Deploy at $\alpha = 0.05$, observation only - Begin RL training loop (nightly weight updates) - Monitor correction rate, engagement metrics - Gradually increase $\alpha$ as confidence builds
removed in v1.0
v0.1 · 9.4 Infrastructure### 9.4 Infrastructure
removed in v1.0
v0.1 · 9.4 Infrastructure- **Runtime:** ONNX export for inference (~1ms on CPU) - **Training:** PyTorch, nightly batch on local GPU or CPU - **Storage:** Interaction logs in SQLite (extends existing `main.sqlite`) - **Integration:** TypeScript wrapper calling ONNX runtime, outputs intuition vector consumed by existing HIPPOCAMPUS/CORTEX/LIMBIC pipelines
removed in v1.0
not in v0.1
v1.0 · 13.1 Phase 0: Infrastructure (Weeks 1–2)### 13.1 Phase 0: Infrastructure (Weeks 1–2)
not in v0.1
v1.0 · 13.1 Phase 0: Infrastructure (Weeks 1–2)1. **Sentence encoder deployment.** Export all-MiniLM-L6-v2 to ONNX. Validate embedding quality on sample situations. Target: <5ms per embedding on CPU.
not in v0.1
v1.0 · 13.1 Phase 0: Infrastructure (Weeks 1–2)2. **Situation template implementation.** Code the `buildSituation` function (§8.3) with programmatic slot filling, LLM-estimated slot interface, and cross-check functions.
not in v0.1
v1.0 · 13.1 Phase 0: Infrastructure (Weeks 1–2)3. **Training data pipeline.** Build the (situation, label) extraction pipeline for historical session transcripts. Target: process 18 months of logs in <1 hour.
not in v0.1
v1.0 · 13.1 Phase 0: Infrastructure (Weeks 1–2)4. **CFD initial population.** Curate 100+ entries from public sources. Convert to situation templates. Label.
not in v0.1
v1.0 · 13.2 Phase 1: Pre-Training (Weeks 3–4)### 13.2 Phase 1: Pre-Training (Weeks 3–4)
not in v0.1
v1.0 · 13.2 Phase 1: Pre-Training (Weeks 3–4)1. **Dataset assembly.** Combine historical mining + CFD + synthetic augmentation. Target: 10,000+ examples.
not in v0.1
v1.0 · 13.2 Phase 1: Pre-Training (Weeks 3–4)2. **Architecture implementation.** Implement all 5 architectures in PyTorch. Export to ONNX for inference.
not in v0.1
v1.0 · 13.2 Phase 1: Pre-Training (Weeks 3–4)3. **Training.** Pre-train all 5 architectures. Evaluate on held-out CFD benchmark. Select initial meta-learner weights.
not in v0.1
v1.0 · 13.2 Phase 1: Pre-Training (Weeks 3–4)4. **Baseline evaluation.** Run current system (no AMYGDALA) against CFD benchmark to establish baseline.
not in v0.1
v1.0 · 13.3 Phase 2: Shadow Deployment (Months 1–3)### 13.3 Phase 2: Shadow Deployment (Months 1–3)
not in v0.1
v1.0 · 13.3 Phase 2: Shadow Deployment (Months 1–3)1. **Runtime integration.** Wire `amygdala.evaluate()` into the execution pipeline. Set $\alpha_{\max} = 0.15$.
not in v0.1
v1.0 · 13.3 Phase 2: Shadow Deployment (Months 1–3)2. **Logging.** Log every situation template, embedding, AMYGDALA prediction, and outcome. This is the training data for online learning.
not in v0.1
v1.0 · 13.3 Phase 2: Shadow Deployment (Months 1–3)3. **Shadow evaluation.** At end of Phase 2, analyse: what would AMYGDALA have blocked? Were those good decisions? What was the false positive rate?
not in v0.1
v1.0 · 13.3 Phase 2: Shadow Deployment (Months 1–3)4. **Architecture selection.** Based on 3 months of shadow data, determine which architecture(s) to promote to active duty.
not in v0.1
v1.0 · 13.4 Phase 3: Active Deployment (Months 3+)### 13.4 Phase 3: Active Deployment (Months 3+)
not in v0.1
v1.0 · 13.4 Phase 3: Active Deployment (Months 3+)1. **Increase $\alpha$.** Begin soft-blocking on low-confidence actions. Track user responses.
not in v0.1
v1.0 · 13.4 Phase 3: Active Deployment (Months 3+)2. **Nightly training.** Integrate AMYGDALA training into the CEREBELLUM sleep cycle.
not in v0.1
v1.0 · 13.4 Phase 3: Active Deployment (Months 3+)3. **Monthly evaluation.** Full benchmark suite (§11.3).
not in v0.1
v1.0 · 13.4 Phase 3: Active Deployment (Months 3+)4. **Iterate.** Based on observed performance, adjust thresholds, loss weights, and architecture selection.
not in v0.1
v1.0 · 13.5 Infrastructure Summary### 13.5 Infrastructure Summary
not in v0.1
v1.0 · 13.5 Infrastructure Summary| Component | Technology | Latency | Storage | |-----------|-----------|---------|---------| | Sentence encoder | all-MiniLM-L6-v2, ONNX | ~3ms | 80MB model | | AMYGDALA inference | ONNX Runtime, 5 models parallel | <5ms total | ~5MB total | | Situation template | TypeScript function | <1ms | N/A | | Training data | SQLite (extends main.sqlite) | N/A | ~10MB/year | | Training | PyTorch, CPU | ~5min nightly | N/A | | CFD | SQLite + markdown entries | N/A | ~5MB |
not in v0.1
v1.0 · 13.5 Infrastructure Summary**Total overhead per action:** <10ms latency, <100MB storage. Negligible compared to the LLM inference that precedes it (typically 500ms–5s).

··· 1 unchanged paragraph folded ···

v0.1 · 14. Future Directions## 10. Future Directions
v1.0 · 14. Future Directions## 14. Future Directions
v0.1 · 10.1 Multi-User Models### 10.1 Multi-User Models
removed in v1.0
v0.1 · 10.1 Multi-User ModelsIn HIVEMIND (J10) enterprise deployment, each user gets their own AMYGDALA instance. Cross-user transfer learning (anonymised) could accelerate cold starts. Organisational-level biases (company culture, department norms) could be shared as a base model.
removed in v1.0
v0.1 · 10.2 Multi-Modal Inputs### 10.2 Multi-Modal Inputs
removed in v1.0
v0.1 · 10.2 Multi-Modal InputsVoice tone, typing speed, camera-detected facial expressions (with consent) could provide richer affect signals than text alone. The architecture's input stream design accommodates additional modalities via concatenation.
removed in v1.0
v0.1 · 10.3 Conversational Memory### 10.3 Conversational Memory
removed in v1.0
v0.1 · 10.3 Conversational MemoryAMYGDALA currently has a short memory (N recent turns). A recurrent variant (LSTM or small transformer over conversation history) could learn longer-range interaction patterns — "Oscar is building toward a big idea, give him space."
removed in v1.0
v0.1 · 10.4 Mutual Adaptation### 10.4 Mutual Adaptation
removed in v1.0
v0.1 · 10.4 Mutual AdaptationAMYGDALA adapts the agent to the human. But humans also adapt to their agents. Modelling this co-adaptation (the human learns what the agent is good at; the agent learns what the human wants) is a promising direction toward genuine collaborative intelligence.
removed in v1.0
not in v0.1
v1.0 · 14.1 Multi-User and Organisational Deployment### 14.1 Multi-User and Organisational Deployment
not in v0.1
v1.0 · 14.1 Multi-User and Organisational DeploymentIn HIVEMIND (J10) enterprise deployment, AMYGDALA enables per-user action gating. Each user's interaction patterns contribute to a personalised risk model. The shared CFD serves as a common training corpus, while individual interaction histories provide personalisation.
not in v0.1
v1.0 · 14.1 Multi-User and Organisational Deployment**Organisational risk policies** could be encoded as constraints on AMYGDALA's output: "in this organisation, no action affecting production data should have confidence > 0.5 without human confirmation." This complements AEGIS's hard rules with learned, contextual risk assessment.
not in v0.1
v1.0 · 14.2 Explainable Gating Decisions### 14.2 Explainable Gating Decisions
not in v0.1
v1.0 · 14.2 Explainable Gating DecisionsThe Transformer-Micro architecture's attention weights provide natural explanations: "This action was blocked because of high attention on step 12 (the recent editing session on README.md)." Building a user-facing explanation pipeline from attention weights would increase trust in AMYGDALA's decisions and help users understand why they're being asked for confirmation.
not in v0.1
v1.0 · 14.3 Cross-Agent Learning### 14.3 Cross-Agent Learning
not in v0.1
v1.0 · 14.3 Cross-Agent LearningIn multi-agent deployments, one agent's catastrophic failure should update all agents' AMYGDALA models. A federated learning approach — sharing gradient updates but not raw interaction data — could enable this while preserving privacy.
not in v0.1
v1.0 · 14.4 Active Probing### 14.4 Active Probing
not in v0.1
v1.0 · 14.4 Active ProbingInstead of passively waiting for failures to train on, AMYGDALA could actively probe: "I would have blocked this action with 60% confidence. Should I have?" This shifts from passive observation to active learning, potentially accelerating the trust ramp.
not in v0.1
v1.0 · 14.5 Temporal Hierarchy### 14.5 Temporal Hierarchy
not in v0.1
v1.0 · 14.5 Temporal HierarchyThe current $K = 32$ window captures roughly one hour of context. A hierarchical temporal model — with a fast GRU for the last hour and a slow GRU for the last week (operating on daily summaries) — could capture longer-range patterns like "this project has been problematic all week" or "merges always break on Mondays."
not in v0.1
v1.0 · 14.6 Mutual Adaptation### 14.6 Mutual Adaptation
not in v0.1
v1.0 · 14.6 Mutual AdaptationAMYGDALA adapts the agent to the human. But humans also adapt to their agents — they learn which actions to confirm, when to be explicit, how to phrase requests clearly. Modeling this co-adaptation could reveal whether AMYGDALA is making the user *lazy* (over-trusting the agent) or *efficient* (delegating appropriately).

··· 1 unchanged paragraph folded ···

v0.1 · 11. Conclusion## 11. Conclusion
removed in v1.0
v0.1 · 11. ConclusionCurrent persistent AI agents remember everything and learn nothing about the people they serve. The Adaptation Gap — the failure to develop user-specific intuition through experience — is not a missing feature but a missing *architecture*. AMYGDALA provides that architecture: a small, trainable neural network that learns to modulate retrieval, personality, humor, curiosity, and tone simultaneously, using the user's natural behaviour as its only training signal.
removed in v1.0
v0.1 · 11. ConclusionAMYGDALA does not replace the language model, the memory system, or the identity framework. It colours them — softly, gradually, earning trust through demonstrated accuracy. It is the difference between an agent that knows your files and an agent that knows *you*.
removed in v1.0
v0.1 · 11. ConclusionThe biological amygdala doesn't make you smarter. It makes you *responsive*. That's what's missing.
removed in v1.0
not in v0.1
v1.0 · 15. Conclusion## 15. Conclusion
not in v0.1
v1.0 · 15. ConclusionAutonomous AI agents are gaining the trust — and the permissions — to take actions with real consequences. They can merge code, send messages, delete files, modify databases. When they fail, they fail not through ignorance but through the absence of common sense: the learned ability to recognise that something feels wrong in situations never explicitly anticipated.
not in v0.1
v1.0 · 15. ConclusionCurrent approaches to agent safety enumerate known failure modes as rules. This works for known unknowns but fails for unknown unknowns — the combinatorially vast space of situations where an agent could do something catastrophic that nobody thought to prohibit. The README debacle, the email mass-deletion, the drive wipe, the database drop — all were situations where the agent had the information to recognise the risk and did not.
not in v0.1
v1.0 · 15. ConclusionAMYGDALA provides a different approach: learned pattern recognition over a continuous space of situation embeddings. By representing each proposed action as a structured description embedded in a 384-dimensional space, the system can generalise from known failures to novel situations — not because the novel situation was anticipated, but because it *resembles* situations that ended badly. This is how human common sense works: not through exhaustive enumeration of what can go wrong, but through the learned sense that "situations like this tend to go badly."
not in v0.1
v1.0 · 15. ConclusionThe five competing architectures (GRU-MLP, TCN, Transformer-Micro, Dual-Encoder, Ensemble MLP) provide systematic exploration of what temporal structure matters for catastrophic failure prediction. The Catastrophic Failure Database provides both training data and evaluation benchmark. The LLM-proof programmatic pipeline eliminates the hallucination surface that would otherwise make the system vulnerable to its own AI-generated inputs.
not in v0.1
v1.0 · 15. ConclusionThree design principles from v0.1 carry forward with renewed importance. The **trust ramp** ensures AMYGDALA earns its authority through demonstrated accuracy — critical when the stakes are data loss, not just tone mismatch. The **rule-intuition boundary** clarifies what should be explicit policy (known dangers) versus learned sense (novel situations) — and provides a maturation cycle where frequently-triggered intuitions graduate to rules. The **natural reward signals** eliminate the need for explicit labeling — corrections, restorations, and complaints are the training signal.
not in v0.1
v1.0 · 15. ConclusionPersonality modulation — the original focus of AMYGDALA v0.1 — remains as secondary output heads sharing learned representations with the primary action gating function. A network that understands "the user is frustrated" should both increase caution *and* decrease humor attempts. Joint training captures this correlation naturally.
not in v0.1
v1.0 · 15. ConclusionThe biological amygdala does not make you smarter. It makes you *cautious* — fast, associative, sometimes over-reactive, but profoundly useful in a world where the cost of one catastrophic mistake exceeds the cost of a hundred unnecessary pauses. That asymmetry is the core design principle. A system that occasionally asks "are you sure?" when it didn't need to is annoying. A system that occasionally destroys hours of work because it lacked the judgment to hesitate is dangerous.
not in v0.1
v1.0 · 15. ConclusionAMYGDALA is the hesitation.

··· 6 unchanged paragraphs folded ···

not in v0.1
v1.0 · ReferencesGao, Y., et al. (2024). Contrastive learning for safe decision-making in autonomous systems. *AAAI 2024*.

··· 3 unchanged paragraphs folded ···

not in v0.1
v1.0 · ReferencesMcGregor, S. (2021). Preventing repeated real world AI failures by cataloging incidents: The AI Incident Database. *AAAI 2021*.

··· 4 unchanged paragraphs folded ···

not in v0.1
v1.0 · ReferencesSchick, T., et al. (2023). Toolformer: Language models can teach themselves to use tools. *NeurIPS 2023*.
not in v0.1
v1.0 · ReferencesSchölkopf, B., et al. (2001). Estimating the support of a high-dimensional distribution. *Neural Computation*, 13(7), 1443–1471.

··· 5 unchanged paragraphs folded ···

not in v0.1
v1.0 · ReferencesSerra, O. (2026e). AMYGDALA v0.1: Adaptive Modulation of Your General Disposition via Affective Learned Association. *Independent Research*.
not in v0.1
v1.0 · ReferencesSerra, O. (2026f). AEGIS: Multi-Layer Security Framework for Autonomous Agents. *Independent Research*.
not in v0.1
v1.0 · ReferencesShinn, N., et al. (2023). Reflexion: Language agents with verbal reinforcement learning. *NeurIPS 2023*.

··· 1 unchanged paragraph folded ···

not in v0.1
v1.0 · ReferencesVovk, V., Gammerman, A., & Shafer, G. (2005). *Algorithmic Learning in a Random World*. Springer.

··· 2 unchanged paragraphs folded ···

not in v0.1
v1.0 · References---
not in v0.1
v1.0 · Appendix A: Situation Template Reference## Appendix A: Situation Template Reference
not in v0.1
v1.0 · Appendix A: Situation Template ReferenceComplete template specification for AMYGDALA v1.0 situation descriptions.
not in v0.1
v1.0 · Appendix A: Situation Template Reference```yaml # AMYGDALA Situation Template v1.0 # All fields are required unless marked (optional)
not in v0.1
v1.0 · Appendix A: Situation Template Referenceaction_type: type: enum values: [overwrite, delete, send, merge, create, modify, execute, deploy, revert, move, copy] source: action_request # programmatic
not in v0.1
v1.0 · Appendix A: Situation Template Referencetarget_type: type: enum values: [file, email, message, database, api_call, git_operation, system_command, configuration, deployment] source: lookup_table # programmatic
not in v0.1
v1.0 · Appendix A: Situation Template Referencetarget_id: type: string source: action_request # programmatic
not in v0.1
v1.0 · Appendix A: Situation Template Referencetarget_metadata: age_hours: type: float source: filesystem # programmatic (stat) default: -1 # unknown size: type: integer unit: bytes source: filesystem # programmatic (stat) default: 0 recent_commits: type: integer window: 72h source: git # programmatic (git log) default: 0 recent_authors: type: integer window: 72h source: git # programmatic (git log) default: 0 effort_hours: type: float source: heuristic + LLM # cross-checked (§8.3) weight: 0.3 # low trust default: 0.0 last_human_ref: type: float unit: hours_ago source: transcript_search # programmatic default: -1 # unknown
not in v0.1
v1.0 · Appendix A: Situation Template Referencecontext: session_topic: type: string source: LLM # low weight weight: 0.3 default: "unknown" recent_corrections: type: integer window: 24h source: runtime_counter # programmatic default: 0 emotional_signals: type: enum values: [calm, frustrated, excited, focused, playful, terse, unknown] source: LLM + heuristic # cross-checked weight: 0.3 default: "unknown" automation_depth: type: integer source: stack_trace # programmatic default: 0
not in v0.1
v1.0 · Appendix A: Situation Template Referencescope: reversible: type: enum values: [true, false, partial] source: lookup_table # programmatic default: "partial" blast_radius: type: enum values: [self, session, persistent, external] source: lookup_table # programmatic default: "persistent" human_in_loop: type: boolean source: runtime_flag # programmatic default: false confirmation: type: enum values: [none, soft, hard] source: runtime_flag # programmatic default: "none" ```
not in v0.1
v1.0 · Template Serialisation### Template Serialisation
not in v0.1
v1.0 · Template SerialisationThe completed template is serialised to natural language via a deterministic formatter:
not in v0.1
v1.0 · Template Serialisation``` Action: {action_type} {target_type} "{target_id}". Target: {size} bytes, {age_hours:.0f}h old, {recent_commits} commits by {recent_authors} authors in 72h. Effort: ~{effort_hours:.1f}h invested, last mentioned {last_human_ref:.0f}h ago. Context: {session_topic}. {recent_corrections} corrections in 24h. Mood: {emotional_signals}. Automation depth: {automation_depth}. Reversible: {reversible}. Blast: {blast_radius}. Human in loop: {human_in_loop}. Confirmation: {confirmation}. ```
not in v0.1
v1.0 · Template SerialisationThis serialised string is the input to the sentence encoder.
not in v0.1
v1.0 · Template Serialisation---
not in v0.1
v1.0 · Appendix B: Architecture Hyperparameter Details## Appendix B: Architecture Hyperparameter Details
not in v0.1
v1.0 · B.1 GRU-MLP### B.1 GRU-MLP
not in v0.1
v1.0 · B.1 GRU-MLP```python class GRUMPL(nn.Module): def __init__(self): self.gru = nn.GRU(input_size=384, hidden_size=128, num_layers=1, batch_first=True) self.mlp = nn.Sequential( nn.Linear(128, 64), nn.LayerNorm(64), nn.GELU(), nn.Linear(64, 32), nn.LayerNorm(32), nn.GELU(), ) self.action_head = nn.Sequential(nn.Linear(32, 1), nn.Sigmoid()) self.retrieval_head = nn.Sequential(nn.Linear(32, 6), nn.Sigmoid()) self.tone_head = nn.Sequential(nn.Linear(32, 4), nn.Sigmoid()) self.curiosity_head = nn.Sequential(nn.Linear(32, 1), nn.Sigmoid()) ```
not in v0.1
v1.0 · B.2 TCN### B.2 TCN
not in v0.1
v1.0 · B.2 TCN```python class TCN(nn.Module): def __init__(self): self.layers = nn.ModuleList([ CausalConv1d(384, 128, kernel_size=3, dilation=1), CausalConv1d(128, 128, kernel_size=3, dilation=2), CausalConv1d(128, 128, kernel_size=3, dilation=4), CausalConv1d(128, 64, kernel_size=3, dilation=8), ]) # Same output heads as GRU-MLP ```
not in v0.1
v1.0 · B.3 Transformer-Micro### B.3 Transformer-Micro
not in v0.1
v1.0 · B.3 Transformer-Micro```python class TransformerMicro(nn.Module): def __init__(self): self.input_proj = nn.Linear(384, 96) self.pos_encoding = nn.Embedding(32, 96) self.encoder = nn.TransformerEncoder( nn.TransformerEncoderLayer(d_model=96, nhead=4, dim_feedforward=192, dropout=0.1), num_layers=2 ) self.pool = nn.AdaptiveAvgPool1d(1) # Output heads from 96-d ```
not in v0.1
v1.0 · B.4 Dual-Encoder### B.4 Dual-Encoder
not in v0.1
v1.0 · B.4 Dual-Encoder```python class DualEncoder(nn.Module): def __init__(self): self.action_encoder = nn.Linear(384, 128) self.context_gru = nn.GRU(384, 128, batch_first=True) self.cross_attn = nn.MultiheadAttention(128, num_heads=4, batch_first=True) self.fusion = nn.Sequential( nn.Linear(256, 64), nn.LayerNorm(64), nn.GELU() ) # Output heads from 64-d ```
not in v0.1
v1.0 · B.5 Ensemble MLP### B.5 Ensemble MLP
not in v0.1
v1.0 · B.5 Ensemble MLP```python class EnsembleMLP(nn.Module): def __init__(self): self.heads = nn.ModuleList([ nn.Sequential( nn.Linear(384, 128), nn.LayerNorm(128), nn.GELU(), nn.Dropout(0.1), nn.Linear(128, 64), nn.LayerNorm(64), nn.GELU(), ) for _ in range(3) ]) self.output_heads = nn.ModuleList([ MultiHeadOutput(64) for _ in range(3) # action, retrieval, tone, curiosity ])
not in v0.1
v1.0 · B.5 Ensemble MLPdef forward(self, x): outputs = [head(x) for head, out in zip(self.heads, self.output_heads)] # For action_confidence: min across heads (conservative) # For others: mean across heads ```
not in v0.1
v1.0 · B.5 Ensemble MLP---
not in v0.1
v1.0 · Appendix C: Catastrophic Failure Database Schema## Appendix C: Catastrophic Failure Database Schema
not in v0.1
v1.0 · Appendix C: Catastrophic Failure Database Schema```sql CREATE TABLE cfd_entries ( id INTEGER PRIMARY KEY, source TEXT NOT NULL, -- 'aiid' | 'aiaaic' | 'mit' | 'vectara' | 'chaos' | 'production' | 'internal' source_id TEXT, -- original identifier in source database title TEXT NOT NULL, description TEXT NOT NULL, date_occurred DATE,
not in v0.1
v1.0 · Appendix C: Catastrophic Failure Database Schema-- Taxonomy failure_mechanism TEXT NOT NULL, -- F1-F7 reversibility TEXT NOT NULL, -- R1-R3 blast_radius TEXT NOT NULL, -- B1-B4 detection_difficulty TEXT NOT NULL, -- D1-D3
not in v0.1
v1.0 · Appendix C: Catastrophic Failure Database Schema-- Situation template (JSON) situation_template TEXT NOT NULL,
not in v0.1
v1.0 · Appendix C: Catastrophic Failure Database Schema-- Embedding (BLOB, 384d float32) situation_embedding BLOB,
not in v0.1
v1.0 · Appendix C: Catastrophic Failure Database Schema-- Labels action_confidence_target REAL NOT NULL DEFAULT 0.0,
not in v0.1
v1.0 · Appendix C: Catastrophic Failure Database Schema-- Metadata created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, verified BOOLEAN DEFAULT FALSE, notes TEXT );
not in v0.1
v1.0 · Appendix C: Catastrophic Failure Database SchemaCREATE INDEX idx_cfd_mechanism ON cfd_entries(failure_mechanism); CREATE INDEX idx_cfd_source ON cfd_entries(source); CREATE INDEX idx_cfd_blast ON cfd_entries(blast_radius); ```
not in v0.1
v1.0 · Appendix C: Catastrophic Failure Database Schema---
not in v0.1
v1.0 · Appendix D: Comparison with v0.1## Appendix D: Comparison with v0.1
not in v0.1
v1.0 · Appendix D: Comparison with v0.1| Aspect | v0.1 | v1.0 | |--------|------|------| | Primary output | Retrieval bias, tone, humor | **Action confidence** | | Input representation | 30 hand-crafted features | **Situation embeddings (384d)** | | Temporal model | None (feedforward) | **GRU / TCN / Transformer / Dual-Encoder** | | Parameter count | ~200K–350K | **150K–310K (per architecture)** | | Network count | 1 | **5 (trained in parallel)** | | Training data | Interaction logs only | **Interaction logs + CFD + synthetic** | | Personality modulation | Primary | **Secondary (retained)** | | Action gating | Not present | **Primary** | | LLM-proof pipeline | Not addressed | **Core engineering contribution** | | Failure database | Not present | **CFD with taxonomy** | | Trust ramp | Present | **Retained, adapted for safety** | | Rule-intuition boundary | Present | **Retained, with maturation cycle** | | Integration | HIPPOCAMPUS, CORTEX, LIMBIC | **All action-taking components** |
not in v0.1
v1.0 · Appendix D: Comparison with v0.1---
not in v0.1
v1.0 · Appendix D: Comparison with v0.1*Version history:* - *v0.1 (21 March 2026) — Initial proposal focused on personality modulation* - *v1.0 (22 March 2026) — Major rewrite: action gating as primary function, situation embeddings, five competing architectures, Catastrophic Failure Database, LLM-proof programmatic pipeline*

Changed paragraphs in the same form, for scripts: JSON · Markdown