TASK Memory: Beyond Text-Only Memory with Activation Steering and Knowledge Editing against Memory Hallucination: what it means for business leaders
TASK Memory pairs each stored text note with a removable weight edit and a pair of steering vectors so that a frozen model uses a correct memory where it applies and leaves it alone where it does not.
1. What the method is
TASK Memory is a design for agent memory in which every remembered fact is stored as three coupled parts instead of text alone. The text note holds the content. A small, removable, closed-form edit to one MLP layer, in the ROME lineage, supplies an internal address: its subject key tells, from one partial forward pass, whether a query is about this memory. A pair of activation-steering vectors holds no content and only controls use: one pushes the model to adopt the note when the address fires, the other pushes it to keep its own answer when the note is present but the question concerns something else. The base model stays frozen and off the shelf, with no pre-training. The authors, from Beihang University, aim this at what they call use-time memory hallucination: the stored memory is correct and in the prompt, and the answer is still wrong.
2. Why the method was developed
Most agent memory, ours included, writes facts as notes and retrieves them into the prompt. The paper measures what happens after retrieval succeeds, on five open models. In up to 46% of queries where the weights hold a stale fact, the model answers with the stale fact despite the correct note. In up to 24% of questions about a neighbouring entity, it assigns the note's answer to the wrong entity, and combining retrieval with a weight edit raises that to as much as 49%. When an old and a revised version of a fact both remain stored, 53% of answers give the superseded value. The first two failures pull in opposite directions, so a single remedy cannot fix both: methods that push the model uniformly towards its context trade ignoring for misapplying, and an ungated evidence direction scored below plain text memory in their tests (0.780 against 0.811).
3. Who should care
Teams that build agents with long-term memory or retrieval over changing facts are the direct audience: customer records, product catalogues, API versions, anything where the model's training data is out of date. Platform and ML engineering should note the main constraint, which is that the method needs access to model internals, hooks on the residual stream and MLP weights, so it applies to open-weight models we host and not to models we reach only through a vendor API. Product and support leaders should care about the diagnosis even if we never adopt the method, because it says a retrieval system can store and fetch perfectly and still answer wrongly. Evaluation and quality owners gain a concrete test plan: measure adoption on relevant queries, restraint on unrelated ones, and stale answers after revisions. Risk and security should register the authors' own warning that an agent made to trust notes more also trusts wrong notes more.
4. How the method works
At write time an observation is compiled into a memory object bound to the model version. The address key is the average MLP input at the subject's last token over a set of writer contexts, whitened by a second-moment estimate from Wikitext so that commonly used directions count less, with a per-memory threshold set midway between the memory's own contexts and hard negatives. The edit is a rank-one patch stored as low-rank factors and unloadable bit-exactly. The two steering vectors are trained for 40 Adam steps on the frozen model and added only at the last prompt token and generated tokens. At read time BM25 proposes candidates, one partial forward pass computes each address response, and that single gate decides whether the note is shown, the patch loaded, and which vector is applied. On revision, the agent's own model judges whether a new observation updates an existing record, and the old text, patch and vectors are retired together. Free-form dialogue facts use a semantic address instead.
5. How it was evaluated
The evaluation used five frozen open models from four families, 8B to 27B parameters: Qwen3-8B as primary, Llama-3.1-8B, Qwen3-14B, Phi-4 and Gemma-3-27B, with greedy decoding. Protocols covered a note supplied directly in context (CounterFact and zsRE, 300 test worlds each), a library of 300 memories extended to 1,000 and 3,000 with distractors, continual revision (100 facts inserted, 50 revised), multi-hop composition on MQuAKE-CF-3k (600 questions), and free-form dialogue on LoCoMo (1,230 test questions). Baselines included plain text memory and BM25 retrieval, six context-use methods given the same note (IKE, CAD, CAA, KSD, ContextFocus, CAST), the editors ROME, MEMIT, AlphaEdit and WISE, and Mem0 and A-Mem for dialogue. Controls swapped in random, wrong-layer, other-memory and ungated vectors. Splits were frozen in advance, primary comparisons registered before outputs existed, each test set run once, and significance read from 95% paired-bootstrap intervals. The headline composite is the harmonic mean of two adoption measures and locality.
6. How it performed
With the note in context, reversion to the stale fact fell from 4.9–46.3% to at most 1.5% in all ten model–dataset cells, and neighbour misuse on Qwen3-8B CounterFact fell from 39.2% to 7.5%, a 10.8-point composite gain. Against BM25 retrieval over 300 memories the gain was 16.4 points, and at 3,000 memories the score held at 0.926 against 0.731. Multi-hop accuracy rose 7.5 points, and 21 of 23 cross-model comparisons were significant. The limits are real: gains shrink on models that already follow context (2.2 points on Qwen3-14B), one cell showed no improvement, and dialogue results were small and far below full-context reading. The update judge missed 14% of true updates on one model and wrongly retired 34% of memories on another in same-subject libraries. Writing one memory costs about 29 GPU-seconds, libraries stop at 3,000, and the main benchmarks are synthetic counterfactuals. Our call: watch the method, and pilot its adoption, restraint and stale-version measurements on our own retrieval systems. (Source: arXiv 2611.34762, 2026)
← Back to dossier index