Abstract
Long document coreference resolution remains a challenging task due to the large memory and runtime requirements of current models. Recent work doing incremental coreference resolution using just the global representation of entities shows practical benefits but requires keeping all entities in memory, which can be impractical for long documents. We argue that keeping all entities in memory is unnecessary, and we propose a memory-augmented neural network that tracks only a small bounded number of entities at a time, thus guaranteeing a linear runtime in length of document. We show that (a) the model remains competitive with models with high memory and computational requirements on OntoNotes and LitBank, and (b) the model learns an efficient memory management strategy easily outperforming a rule-based strategy.
Introduction
Coreference resolution—the task of grouping all mentions in a text that refer to the same real-world entity—is notoriously difficult for long documents. Most state-of-the-art models suffer from two major bottlenecks:
- Quadratic Complexity: Standard models compare every mention to every previous mention, leading to $O(n^2)$ runtime relative to document length.
- Memory Bloat: Even "entity-centric" models, which store representations of entity clusters rather than individual mentions, typically require an unbounded amount of memory because the number of entities grows as the document progresses.
The authors argue that keeping every entity in memory is unnecessary. By analyzing the Maximum Active Entities (MAE)—the peak number of entities that have been introduced but not yet concluded at any point in a text—they found that most documents require tracking only a small number of entities simultaneously.
The Learned Bounded Memory (LB-MEM) Architecture
To address these bottlenecks, the authors propose a memory-augmented neural network that processes documents sequentially. The core innovation is the Learned Bounded Memory (LB-MEM) architecture, which features:
- Fixed Capacity: The model is restricted to a small number of memory "cells" (e.g., 10 or 20), each representing an entity cluster.
- Sequential Processing: As the model encounters a new mention, it decides if it belongs to an existing entity in memory or represents a new one.
- Learned Eviction: If memory is full and a new entity is introduced, the model must "evict" (forget) an existing entity. Unlike standard heuristics like "Least Recently Used" (LRU), LB-MEM uses a feedforward neural network to predict which entity is least likely to appear again in the remaining text.
- Encoder: The system utilizes SpanBERT-Large to generate initial representations of text spans, which are then processed by the clustering mechanism.
Empirical Justification for Bounded Memory
A key insight of this work is the empirical distribution of "Entity Spread" (ES)— the normalized distance between the first and last mention of an entity. The authors found that the vast majority of entities are relatively short-lived, appearing within a narrow window of the text and then disappearing. This justifies the use of a bounded memory: if an entity is unlikely to reappear, it can be safely ignored to make room for new information.
Experimental Results
The model was evaluated on two major benchmarks: LitBank (long-form novel prefixes) and OntoNotes (standard multi-genre coreference).
Key Findings:
- Competitive Accuracy: On LitBank, LB-MEM with only 20 memory cells achieved a 75.1 F1 score, remarkably close to the unbounded version (U-MEM) at 76.5 F1.
- Intelligence over Rules: When memory is extremely tight (e.g., 5 cells), the learned eviction strategy (LB-MEM) significantly outperformed a rule-based LRU strategy (RB-MEM), scoring 70.3 F1 compared to the rule-based 57.8 F1 on LitBank.
- Efficiency: By bounding the memory, the clustering stage achieves $O(n)$ runtime. During training, LB-MEM reduced peak memory usage from 11.6 GB to 8.0 GB on LitBank compared to unbounded models.
Conclusion and Future Work
While LB-MEM makes the clustering stage linear and memory-efficient, the document encoder (SpanBERT) remains a memory bottleneck during inference. Future work aims to apply this bounded memory approach to even longer texts, such as full-length books, and to explore unidirectional encoders for truly online, streaming coreference resolution.
Summary updated