Lost-in-the-Middle: Why LLMs Forget Protagonists in Long Novels
An analysis of the systematic memory bottleneck that causes large language models to forget main characters when reading lengthy narratives, and how the Generative Semantic Workspace (GSW) framework offers a solution.
Key points
- LLMs show a U-shaped memory curve on long inputs: they excel at recalling beginning and end information but forget middle sections.
- Forgetting in long novels is multi-level: identity markers (names), static descriptions (appearance, personality), and dynamic relationships (character networks, motivations).
- Even state-of-the-art models can fail to correctly name a protagonist after reading hundreds of thousands of tokens (GMX report evidence).
- The GSW framework proposes building dynamic, queryable internal world models — a form of AI "episodic memory" — instead of relying on static fact retrieval (RAG).
1. The Lost-in-the-Middle Effect: LLMs' Long-Text Memory Bottleneck
When processing long-form texts like novels, LLMs exhibit the "Lost-in-the-Middle" effect. This is not a matter of intelligence but an architectural limitation, producing a U-shaped memory curve: utilization efficiency is highest for information at the beginning and end of the context window, while middle-positioned information is significantly underused.
Key insight
In multi-document QA experiments, when answer-containing documents were placed in middle positions, model accuracy dropped significantly — even falling below "closed-book" performance without any input documents.
Attention's primacy and recency effects
Self-attention requires computing associations between every token and all others, with complexity growing quadratically with sequence length. To control costs, models in practice tend to "dilute" or "truncate" attention, leaving middle sequence portions with insufficient attention weight. This parallels the human "primacy effect" and "recency effect" in list recall.
2. What LLMs Forget About Protagonists
When LLMs "forget the protagonist" in long novels, the forgetting is systematic and occurs across three categories:
1. Identity information — Names are core identity markers; complex referencing and coreference resolution failures cause models to forget them. Per the GMX report, when asked "Who is the protagonist?" after reading all chapters, even top models sometimes give inconsistent answers or completely forget the name — models fail to retain the protagonist's name in working memory across hundreds of thousands of tokens. 2. Static descriptions — Appearance and personality traits are typically introduced intensively early on and rarely repeated, so memory of them fades as the story progresses. 3. Dynamic relationships — Long novels feature complex, evolving relationship networks (family, friendship, love, enmity, mentorship). LLMs struggle to track scattered relationship nodes and their evolution, as well as the protagonist's core goals and motivations.
3. GSW Framework: Constructing AI's "Episodic Memory"
The Generative Semantic Workspace (GSW) framework aims to give LLMs human-like episodic memory to track the dynamic evolution of time, place, characters, and emotions.
Core concept
GSW draws inspiration from the division of labor between the neocortex (abstraction, reasoning, prediction) and the hippocampus (binding time, place, and events into coherent episodic memories).
From fact retrieval to world models
Traditional RAG methods are essentially "fact retrieval" systems: they fetch relevant fact snippets from a knowledge base. This works for static knowledge but fails for dynamic, evolving narratives. GSW instead takes an active construction approach — building and querying internal world models.
The Operator
In the GSW framework, "The Operator" acts like a detective: it extracts key semantic information from raw text and converts it into structured data — the crucial first step in building an internal world model.
---
*Translated and adapted from a zhichai.net forum post. Citations in the original refer to referenced works on the Lost-in-the-Middle phenomenon, attention mechanisms, the GMX report, and episodic memory / GSW research.*