Abstract
We investigate modeling coreference resolution under a fixed memory constraint by extending an incremental clustering algorithm to utilize contextualized encoders and neural components. Given a new sentence, our end-to-end algorithm proposes and scores each mention span against explicit entity representations created from the earlier document context (if any). These spans are then used to update the entity's representations before being forgotten; we only retain a fixed set of salient entities throughout the document. In this work, we successfully convert a high-performing model (Joshi et al., 2020), asymptotically reducing its memory usage to constant space with only a 0.3% relative loss in F1 on OntoNotes 5.0.
Introduction
Coreference resolution—the task of determining which mentions in a text refer to the same entity—is notoriously memory-intensive. Standard modern models typically encode the entire document at once, comparing every possible span of text to every other previous span. This creates a quadratic ($O(n^2)$) bottleneck in terms of both computation and memory. As we move toward massive contextualized encoders like SpanBERT and longer documents, these models quickly exceed the memory limits of high-end GPUs.
This paper introduces an incremental clustering algorithm for coreference resolution that operates in constant memory ($O(1)$) relative to document length. This approach is not only more efficient but also more psychologically plausible, as humans do not hold every word of a long text in active memory to resolve references.
Methodology
The proposed model processes text segment by segment using an incremental clustering approach. Key components include:
- Entity-Level Representations: Instead of comparing a new mention to all previous spans, the model compares it to a set of entities (clusters), each with its own vector representation.
- Learned Update Rule: When a new mention is linked to an existing entity, the entity's representation is updated using a learned gating mechanism, allowing the vector to evolve as new information is added.
- Constant Memory via Eviction: The model maintains a "permanent" list of entities but only keeps "active" ones in GPU memory. Singletons are evicted if they haven't been seen for more than 600 tokens, while other entities are evicted after 1200 tokens. Evicted entities are moved to the CPU/disk, ensuring the GPU memory footprint remains flat regardless of document length.
Key Results
The model was trained and evaluated on OntoNotes 5.0. It achieved an average F1 score of 79.4, representing only a 0.3% relative performance drop from the baseline SpanBERT-large model (79.6 F1).
Memory Scaling
The primary advantage of this architecture is its scalability. While baseline models show linear or quadratic memory growth as documents get longer, the proposed model's memory usage remains constant.
During inference, the proposed model required only 2.0 GB of GPU memory, compared to over 11.9 GB for the baseline (JS-L). This drastic reduction makes state-of-the-art coreference resolution accessible on consumer-grade hardware.
Discussion and Future Work
While highly efficient, the model shows a performance drop in documents with multiple speakers (a 1.7% F1 drop), likely due to the omission of speaker features to keep entity representations independent. Future work may involve learning the eviction policy—where the model decides which entities are salient enough to keep—rather than relying on manually tuned heuristics. Nevertheless, the ability to maintain high accuracy while "forgetting" inactive entities proves that constant-memory coreference resolution is a viable path for processing long-form text.
Summary updated