{
  "id": 1388,
  "kind": "post",
  "title": "You could have invented transformers from memory",
  "summary": "A pedagogical explainer (not a research result) deriving linear maps, MLPs, and self-attention as associative key-value memory stores from first principles. The unifying quantity is the interference-to-signal ratio — interference from other stored memories vs the target's signal — and capacity is the number of memories before interference matches signal (random unit keys, query with a stored key). At d_k=64: outer-product linear store ≈64; optimal linear (least-squares/whitened keys) ≈128; ReLU MLP ≈128; squared ReLU / SwiGLU ≈2d_k²/3 ≈2,700–2,900; cubed ReLU ≈2d_k³/15 ≈35,000; self-attention with β=√d_k ≈e^{2√d_k−2} ≈1.2 million; β ∝ log M allows an essentially unbounded store (>2M in experiments). Derivations: interference terms add like a random walk (√M); σ(s)=ReLU(s)^p gives capacity M≈d_k^p; the exponential is a weighted sum of all powers, so capacity grows exponentially in the sharpness β: M≈e^{2β(1−β/d_k)} for β≪d_k; normalizing weights for numerical stability yields exactly f(x)=Vᵀsoftmax(βKx). Unlike MLPs, self-attention is non-parametric: keys/values come from context tokens, so the store grows with context length. Notes that the original transformer's v2/v3 described the feedforward layer as \"a kind of attention\" (passage removed from later versions) and tried replacing FFNs with learned-key-value attention at similar quality. The long-context section compares β∝log M tricks (Su 2021 entropy scaling, Scalable-Softmax, Qwen LogN-Scaling, Qwen2.5-1M YaRN scaling), driving the interference ratio to ~10⁻⁴ at 2M memories. Author-stated caveat: the count is random-vector recall of a single layer, ignoring training data; companion pointers to bits-per-parameter memorization work (Morris et al. ~3.6 bits/param; Allen-Zhu & Li ~2 bits factual knowledge/param). Includes interactive demos (sliders for M and β with live interference/signal visualization). Asides: a gradient-descent step is a memory write (Irie, Csordás & Schmidhuber); transformers' MLPs store facts in superposition.",
  "body": "",
  "notes": "Discovery: Hudson shared the bare blog link directly 2026-10-16; post read in full; published 2026-10-15 per the page. Relevance: (1) pedagogical explainer, not a research result — label as such; (2) conceptual anchor for his memory-scaling line: queued #48 xHC (residual-stream expansion explicitly framed as memory scaling), #11 MSAR, #15 MGVR, #41 ScalingDepth, #870 DepthBench, #43 MAI-Base-2, #52 Nemotron long-context transduction, #849 ThunderSyncRL — the post gives the cleanest intuition for why memory scaling matters and where each component's capacity comes from (linear ≈d_k, MLP ≈thousands via power-law suppression, attention ≈unbounded); (3) the \"gradient descent step writes a memory\" aside connects to his training-dynamics interests (#901 mode-hopping); (4) the references list name-checks Gated DeltaNet (his known stack line — Gated DeltaNet isn't faster than a Transformer until ≥16k context) and the full memory-research map (dense associative memory → Mamba/Titans → product-key/UltraMem → RETRO/kNN-LM → ROME/MEMIT → KVzip/gist tokens). Caveats: idealized random-key analysis; no training-data accounting. Cluster: memory capacity, associative memory, long-context scaling, transformer interpretability. No code released; all math hand-derived with interactive figures. | License: n/a",
  "url": "https://alexwang.ai/posts/associative-memory/",
  "links": [],
  "authors": [
    "Alex Wang (researcher",
    "San Francisco",
    "PhD CS Stanford — long-context architectures for sequence modeling and memory",
    "ex-research scientist at Cartesia)"
  ],
  "tags": [],
  "topics": "",
  "venue": "Alex Wang's blog (alexwang.ai, published 2026-10-15)",
  "publisher": "",
  "source": "blog",
  "language": "en",
  "access": "free",
  "license": "",
  "published_year": 2026,
  "added_at": "2026-10-16T00:00:00.000Z",
  "verified_at": "2026-10-16T00:00:00.000Z",
  "attrs": {},
  "enrichment": {},
  "enriched_at": null,
  "license_class": "unknown",
  "langs": [
    "en"
  ],
  "modalities": [],
  "size_class": null,
  "provenance": {
    "legacy_paper_id": "1695"
  },
  "visibility": "public",
  "status": "active",
  "duplicate_of": null,
  "origin": "legacy",
  "created_at": "2026-11-01T12:54:09.936Z",
  "updated_at": "2026-11-01T12:54:09.936Z",
  "page": "https://papers.projxon.ai/entries/1388",
  "markdown": "https://papers.projxon.ai/entries/1388.md",
  "api": "https://papers.projxon.ai/api/entries/1388",
  "relations": [],
  "duplicates": [],
  "similar": [
    {
      "id": 1255,
      "kind": "paper",
      "title": "The Surprising Effectiveness of Shared Memory in Looped Transformers",
      "summary": "Looped Transformers add compute without parameters by re-applying the same layers, but each recursion writes its own KV cache, so memory grows with compute. This paper pretrains looped models to share memory instead: only the first recursion writes a cache; later recursions read it while keeping a short window of their own. Sharing memory does not cost quality — it improves it. At 150M-1B parameters, the Looped Prediction Transformer (LPT) and its hybrid variant set a new quality-memory frontier for looped models: with five recursions, the hybrid lowers FineWeb-Edu validation perplexity by 1.12-1.82 vs a same-size standard Transformer while using 76-79% less context memory. Analysis: shared and local memory develop different representations, later recursions attend mostly to the shared memory, which also acts as a gradient highway to the first recursion.",
      "url": "https://arxiv.org/abs/2610.02383",
      "authors": [
        "Giovanni Monea",
        "Keshav Ramji",
        "Yousef El-Kurdi",
        "Luis A. Lastras",
        "Yoav Artzi",
        "Nathan Godey",
        "Ramon Fernandez Astudillo"
      ],
      "tags": [
        "looped-transformers",
        "kv-cache",
        "shared-memory",
        "pretraining",
        "perplexity",
        "cornell",
        "ibm"
      ],
      "venue": "arXiv 2610.02383 [cs.LG/cs.AI], submitted 1 Oct 2026, preprint",
      "source": "x",
      "license": "",
      "published_year": 2026,
      "added_at": "2026-10-05T00:00:00.000Z",
      "has_dataset_profile": false,
      "license_class": "unknown",
      "langs": [
        "en"
      ],
      "modalities": [],
      "size_class": null,
      "citation_count": null,
      "downloads": null,
      "stars": null,
      "page": "https://papers.projxon.ai/entries/1255",
      "markdown": "https://papers.projxon.ai/entries/1255.md",
      "api": "https://papers.projxon.ai/api/entries/1255"
    },
    {
      "id": 1269,
      "kind": "code",
      "title": "Agent Memory Repo (Cognition) — open spec for persistent agent memory",
      "summary": "Cognition open-sources its agent memory format as an open standard, usable with any agent (announced alongside Devin's 'Dreaming' feature, where Devin builds a persistent memory graph of how a user likes to work across sessions). The format is a git repo of Markdown: every session clones the latest memory, searches or follows links, updates entries as the agent learns (no human in the loop), and pushes after every edit. MEMORY.md is the entry point loaded at the start of every session; entries are one-line bullets with open [key: value] metadata (recommended: source link to the session where it was learned, added date); [[path]] cross-links connect files; history and versioning come from git. 'Dreaming' is a dedicated periodic agent with two jobs: add new memory (spot patterns across sessions) and clean up (merge duplicates, drop outdated entries, resolve contradictions). Composability: memories are folders — a session can clone several repos at once (personal + team + swarm folders), each keeping its own ownership/permissions/history, and the agent tracks who said what. Agent swarms coordinate via message-board folders (findings.md, questions.md) with git rejecting conflicting pushes, forcing the agent to reconcile both versions. Worked examples: four parallel agents diagnosing a 1-in-100 slow request by sharing measurements through the repo, and a saved SQL query reused across sessions. Open to contributions: https://github.com/AgentMemoryRepo/agentmemoryrepo. Notably complementary/contrastable with the pending proactivity items on agent memory: the two-tier Memorystore/AlloyDB blueprint (SQL-native vector + BM25 hybrid retrieval, compaction) and the 'docs, not memory' RAG-skeptic argument. Directly relevant to the user's unnamed AI agent app.",
      "url": "https://cognition.com/agent-memory-repo",
      "authors": [
        "Cognition (Walden Yan)"
      ],
      "tags": [
        "agent-memory",
        "cognition",
        "devin",
        "dreaming",
        "persistent-memory",
        "git",
        "markdown"
      ],
      "venue": "Open standard announcement, 5 Oct 2026 (cognition.com/agent-memory-repo)",
      "source": "x",
      "license": "",
      "published_year": 2026,
      "added_at": "2026-10-06T00:00:00.000Z",
      "has_dataset_profile": false,
      "license_class": "unknown",
      "langs": [
        "en"
      ],
      "modalities": [],
      "size_class": null,
      "citation_count": null,
      "downloads": null,
      "stars": null,
      "page": "https://papers.projxon.ai/entries/1269",
      "markdown": "https://papers.projxon.ai/entries/1269.md",
      "api": "https://papers.projxon.ai/api/entries/1269"
    },
    {
      "id": 1060,
      "kind": "code",
      "title": "Block Delta Memory (BDM): Sparse Recurrent Memory with Dense Execution",
      "summary": "Block Delta Memory (BDM) is a recurrent sequence mixer that routes each token via an SDM-style product-key router to a sparse subset of small GDN2 memory banks, then updates selected banks as dense matrix states with a shared GDN2 controller (route-weighted decay/erase/write). On WikiText-103 (~15–17M, N=2048/K=64) BDM roughly matches attention on Adaptive Recall (span/overwrite/one-hop ~97–99% exact) with LM NLL near attention/SDM; H200 sweeps show decode nearly flat as capacity grows N=T, ~2× faster than SDM and within ~1.2–1.6× of GDN2. No arXiv; GitHub README+code.",
      "url": "https://github.com/p0rc314in/bdm",
      "authors": [
        "porcelain (@p0rc314in)"
      ],
      "tags": [
        "bdm",
        "block-delta-memory",
        "recurrent-memory",
        "deltanet",
        "gdn2",
        "sdm",
        "sequence-mixer",
        "sparse-routing",
        "product-key",
        "mixture-of-memories",
        "p0rc314in",
        "porcelain"
      ],
      "venue": "GitHub / X (independent)",
      "source": "github",
      "license": "unspecified for original code; SDM-extracted shell CC BY-NC 4.0 (THIRD_PARTY_NOTICES); FLA optional MIT",
      "published_year": 2026,
      "added_at": "2026-09-25T22:19:31.000Z",
      "has_dataset_profile": false,
      "license_class": "unknown",
      "langs": [
        "en"
      ],
      "modalities": [],
      "size_class": null,
      "citation_count": null,
      "downloads": null,
      "stars": 8,
      "page": "https://papers.projxon.ai/entries/1060",
      "markdown": "https://papers.projxon.ai/entries/1060.md",
      "api": "https://papers.projxon.ai/api/entries/1060"
    },
    {
      "id": 1282,
      "kind": "paper",
      "title": "Balancing Memory Pathways: Analyzing and Improving Memory Utilization in Hybrid LMs",
      "summary": "Recurrent-attention hybrid LMs (e.g., Qwen3.5) interleave attention and recurrent layers as two complementary memory pathways: attention supports precise recall of earlier tokens, recurrent layers consolidate disparate information over long contexts. The paper shows hybrids rely substantially more on attention than on the recurrent state — and that standard SFT improves overall performance but does not fix the imbalance: the model becomes more reliant on attention-propagated information while recurrent-pathway use stays limited. Fix: an auxiliary loss that limits attention's access to earlier context while the recurrent state propagates through the full sequence, forcing the model to retain and use information through the recurrent pathway alongside attention. Results: overall performance improves with especially strong gains on longer-context and information-aggregation tasks; QA avg +4.6%, agentic tasks avg +12.1% across multiple hybrid LMs; also generalizes to attention-only models combining different memory types (+28.6%). Core message: simply providing multiple memory pathways does not ensure their effective use — targeted supervision is needed to coordinate them.",
      "url": "https://arxiv.org/abs/2610.06750",
      "authors": [
        "Hyunji Lee",
        "Joykirat Singh",
        "Zaid Khan",
        "Justin Chih-Yao Chen",
        "Elias Stengel-Eskin",
        "Alessandro Sordoni",
        "Arman Cohan",
        "Mohit Bansal"
      ],
      "tags": [
        "memory-pathways",
        "recurrent-attention-hybrid",
        "auxiliary-loss",
        "memory-utilization",
        "long-context",
        "agentic-tasks"
      ],
      "venue": "arXiv 2610.06750 (cs.CL, cs.AI), submitted 5 Oct 2026",
      "source": "x",
      "license": "",
      "published_year": 2026,
      "added_at": "2026-10-06T00:00:00.000Z",
      "has_dataset_profile": false,
      "license_class": "unknown",
      "langs": [
        "en"
      ],
      "modalities": [],
      "size_class": null,
      "citation_count": null,
      "downloads": null,
      "stars": null,
      "page": "https://papers.projxon.ai/entries/1282",
      "markdown": "https://papers.projxon.ai/entries/1282.md",
      "api": "https://papers.projxon.ai/api/entries/1282"
    },
    {
      "id": 461,
      "kind": "paper",
      "title": "Memory Caching: RNNs with Growing Memory",
      "summary": "Memory Caching (MC) segments the sequence, caches each segment's memory state, and aggregates online plus cached memories at retrieval. Four variants: Residual Memory, Gated Residual Memory (GRM), Memory Soup, and Sparse Selective Caching (SSC). Complexity O(NL) interpolates RNN O(L) and Transformer O(L^2). Applied to Linear Attention, SWLA, DLA, and Titans. On 760M/30B-token and 1.3B/100B-token FineWeb training, MC lifts language-modeling and commonsense averages; Titans+GRM is strongest. Closes part of the recall gap vs Transformers on NIAH, in-context retrieval, LongBench, and MQAR. No official code on the abs page.",
      "url": "https://arxiv.org/abs/2602.24281",
      "authors": [
        "Ali Behrouz",
        "Zeman Li",
        "Yuan Deng",
        "Peilin Zhong",
        "Meisam Razaviyayn",
        "Vahab Mirrokni"
      ],
      "tags": [
        "memory-caching",
        "titans",
        "linear-attention",
        "rnn",
        "long-context",
        "google",
        "ssc",
        "grm"
      ],
      "venue": "arXiv / Google",
      "source": "arxiv",
      "license": "CC BY 4.0",
      "published_year": 2026,
      "added_at": "2026-08-14T16:36:00.000Z",
      "has_dataset_profile": false,
      "license_class": "permissive",
      "langs": [
        "en"
      ],
      "modalities": [],
      "size_class": null,
      "citation_count": 12,
      "downloads": null,
      "stars": null,
      "page": "https://papers.projxon.ai/entries/461",
      "markdown": "https://papers.projxon.ai/entries/461.md",
      "api": "https://papers.projxon.ai/api/entries/461"
    },
    {
      "id": 1274,
      "kind": "paper",
      "title": "LiFT: Loop Flow Transformers",
      "summary": "UvA Amsterdam introduces LiFT, a family of looped generative models that scale computation by repeatedly applying a shared Diffusion Transformer (DiT) core with only light changes to the standard architecture. The key training innovation: rather than asking every recurrent step for the final prediction, each loop is supervised at its own target - a point on a straight reference path from the model's initial velocity estimate to the flow-matching target. Because targets are indexed by a continuous depth coordinate, the trained model can loop far beyond its training depth (K_inf > K_train) with no retraining, early exits, or other modifications, and longer rollouts improve generation - inference computation grows without adding parameters. Prelude-core-coda decomposition: prelude embeds input once, shared core R_theta applied K times (boundary operator reinjects input state), coda maps any state to a prediction. On ImageNet 256x256, LiFT-L/2 achieves FID 3.34 points lower than the dense DiT-XL/2 baseline while using ~60 percent fewer parameters, 32 percent fewer training FLOPs, and 52 percent fewer inference FLOPs. Separates two axes of inference compute: integration steps (follow the flow more closely) vs loops (estimate the velocity field more accurately). At DiT-B/2 the dense model still wins, so the advantage appears at larger scales. CC BY 4.0. Joins the looped-models cluster (670, 952, 1545, 1548, 1549, 1551, 1563, 1566, 1579, 1581) and complements ALoDLM (1581) - the other Oct-2026 looped-diffusion result, which adapts depth per token instead.",
      "url": "https://arxiv.org/abs/2610.05538",
      "authors": [
        "Mohammad Mahdi Derakhshani",
        "Pedro M. P. Curvo",
        "Gertjan J. Burghouts",
        "Jan-Willem van de Meent",
        "Cees G. M. Snoek"
      ],
      "tags": [
        "lift",
        "loop-flow-transformers",
        "diffusion-transformer",
        "looped-transformers",
        "flow-matching",
        "imagenet",
        "dit",
        "test-time-scaling",
        "recurrent-depth"
      ],
      "venue": "arXiv 2610.05538 [cs.LG], submitted 4 Oct 2026, preprint (UvA Amsterdam VISLab/AMLab, TNO)",
      "source": "x",
      "license": "",
      "published_year": 2026,
      "added_at": "2026-10-06T00:00:00.000Z",
      "has_dataset_profile": false,
      "license_class": "unknown",
      "langs": [
        "en"
      ],
      "modalities": [],
      "size_class": null,
      "citation_count": null,
      "downloads": null,
      "stars": null,
      "page": "https://papers.projxon.ai/entries/1274",
      "markdown": "https://papers.projxon.ai/entries/1274.md",
      "api": "https://papers.projxon.ai/api/entries/1274"
    }
  ]
}
