Language models can answer questions about structured data, such as a knowledge graph of dated political events, when that data is handed to them as "soft tokens": vectors produced by a graph encoder and projected into the model's input embedding space, where they sit alongside ordinary word embeddings. Current systems of this kind build a fresh subgraph for every question and project it. That approach falls apart when the graph is a stream that keeps growing, such as news events arriving every day. Either the history is truncated, or the soft-token prompt grows without limit. Video understanding already has machinery for bounded memory over unbounded streams: fixed-size memory banks that are updated recurrently. Those methods, however, compress features for a vision decoder. They do not compress them into something a language model can read.
We propose a fixed number of memory slots that summarise an entire temporal knowledge graph stream and are projected into a frozen-weight, LoRA-tuned LLM. LoRA is low-rank adapter fine-tuning. The memory is not trained to reconstruct graph features. It is trained so that the LLM, reading only the compressed memory, produces the same answer distribution it would produce if it had read the complete history as text. The teacher is the same LLM with the full history in its context window, which is affordable only on short streams during training. The student must then carry that behaviour to streams far longer than the teacher can read.
Core Claim
Bounded memory for LLMs over structured streams fails for two separate reasons. The first is that recurrent compression drifts over long horizons. The second is that LLMs often cannot interpret projected vectors at all. Can LLMs Use Relational Transformer Embeddings? shows this second failure clearly. Its hybrid of a Qwen model and Relational Transformer embeddings hovers around 50.7 AUROC, against 71.9 for the encoder alone, unless the soft tokens are wrapped in JSON field labels. The same paper finds that adding more soft tokens, from 64 up to 1024, quickly stops helping.
Our claim is that a single training signal addresses both failures. That signal is distillation from an uncompressed teacher, measured in the LLM's output space. This transplants the Unbiased Guidance Loss of Recurrent Dynamic Embedding for Video Object Segmentation. In that paper, a growing memory bank supervises a constant-size bank through KL divergence, but only at the level of segmentation features. Supervising at the level of what the LLM answers means the compressor is rewarded only for information the LLM actually uses. If this works, two things should follow. First, accuracy on questions whose evidence lies far in the past should stay close to the teacher's. Second, the memory should keep a constant token cost however long the stream runs.
Relation to Prior Work
Two papers motivate the gap, and both say so themselves.
Towards Explainable Temporal Reasoning in Large Language Models (GETER) projects embeddings from a temporal graph network (RE-GCN) into an LLM through a linear prefix adapter, and gains up to 11.10% F1 on the ETR benchmark over text-only tuning. It works on precomputed windowed subgraphs, and its authors flag latency and accumulated noise over long histories as open problems. MemoTime reaches strong results on MultiTQ through multi-step text prompting and temporal-first retrieval. It averages 8.75 LLM calls per question, and its authors name streaming graphs as future work. Our proposal keeps GETER's soft-token interface and replaces its per-question subgraph with a persistent bounded state. We also aim for single-pass inference where MemoTime makes many calls.
Three papers supply the method. The Global Context module of Fast Video Object Segmentation Using the Global Context Module shows that a running, attention-weighted summary can stand in for a growing key-value bank. RDE adds the teacher-student loss we borrow. MovieChat+ shows that letting the question decide which parts of memory are read out matters.
Four papers constrain the design. HierarQ and MovieChat merge memory by similarity, with no fidelity objective. HierarQ also keeps its LLM frozen, so its projection is never trained against the compressed distribution. Our approach differs on exactly that point. The textual-crutch result rules out bare soft tokens, so each memory slot carries a short discrete anchor, the name of its dominant entity. This keeps scaffolding cost constant per slot instead of growing with history. The saturation result argues for a small number of read-out tokens chosen by the question, rather than projecting everything. The 2-hop noise finding in Enhancing Large Language Model for Knowledge Graph Completion via Structure-Aware Alignment-Tuning (SAT) warns that adding more context naively hurts. That is a further reason to let the teacher, not a hop radius, decide what is kept.
Research Program
The stream is a temporal knowledge graph replayed in chronological order: ICEWS14, ICEWS18, ICEWS05-15 and GDELT, the sources behind ETR and MultiTQ. At each timestamp a frozen RE-GCN encodes the new events. The memory holds $K$ slots, with $K$ set to 32, 64 and 128 in the experiments. A write module updates these slots by attending from the slots to the new event embeddings. It then applies RDE's extract, enhance and squeeze steps, followed by a learned gate. Each slot also carries the text anchor of the entity it attends to most. At question time, the question attends over the slots. The top $k$ slots, with $k$ around 16, pass through a two-layer projector and are inserted as "[entity: X] ⟨soft⟩" pairs into the prompt of a LoRA-tuned 7–8B LLM, matching GETER's backbones.
Training minimises
$$\mathcal{L} = \mathbb{E}_{(q,t)}\big[\mathrm{KL}\big(p_\theta(y \mid q, \mathrm{text}(H_{\le t})) \,\|\, p_\theta(y \mid q, \mathrm{Proj}(M_t))\big)\big] + \lambda\, \mathrm{CE}(y^\star, p_\theta(y \mid q, \mathrm{Proj}(M_t))).$$
Here $q$ is a question asked at time $t$, and $H_{\le t}$ is the full event history up to $t$, written out as text. The teacher term $p_\theta(\cdot \mid q, \mathrm{text}(H_{\le t}))$ is the LLM's answer distribution given that text. The teacher's weights are frozen after a text-only fine-tuning phase. $M_t$ is the memory state at time $t$, $\mathrm{Proj}$ is the projector, $y^\star$ is the gold answer, and $\lambda$ weights the supervised cross-entropy term.
The teacher is only run on training streams short enough that $\mathrm{text}(H_{\le t})$ fits in the context window. Training proceeds through time with truncated backpropagation over windows of timestamps. This addresses the sequential-training cost noted by WinT3R.
Baselines
The naive reference is the LLM given only the most recent $W$ timestamps as verbalised text. We pick $W$ so that its token count equals the memory's read-out budget, which makes this the "do nothing clever" point at equal cost.
The strongest structural competitor is GETER-style per-question subgraph projection. We use the same RE-GCN, the same backbone and the same LoRA budget, with its subgraph window tuned on validation data. To beat it, we must match GETER on recent-evidence questions and exceed it on old-evidence questions, while using a fixed rather than growing number of soft tokens. GETER reports gains of up to 11.10% F1 over text-only tuning on ETR, but no reported result was found on Lacuna for GETER's absolute ETR F1. We will therefore rerun it.
The strongest system overall is MemoTime on MultiTQ. It reports raising Qwen3-32B "from a baseline of 1.3% to over 60%" accuracy and beating TempAgent by up to 24.0%. We run it with its published configuration and report accuracy, LLM calls and wall-clock time. Beating it at its own scale is not required. The success criterion is accuracy within a few points at one call per question, or higher accuracy on the streaming split described below.
The upper bound is the full-history teacher, wherever the history fits in context.
The key ablation isolates the distillation signal. It keeps the same memory architecture but trains it only with task cross-entropy, or with RDE-style feature-level KL against an uncompressed graph bank. If the output-space teacher adds nothing over these, the central claim fails. A second ablation removes the text anchors, which tests whether distillation lets the LLM do without the textual crutch.
Why not just…?
Why not just use a recency window? Temporal knowledge graph events are strongly driven by recency, so a window may genuinely suffice on many questions. This is a real threat. We settle it by stratifying every result by the age of the oldest evidence fact the gold answer requires. If the window baseline matches our method in the oldest strata, the bounded memory buys nothing and we will report exactly that.
Why not just project RE-GCN's evolving entity states? RE-GCN already updates entity embeddings recurrently, so it is in effect a constant-size summary per entity. Projecting those states is the cheapest bounded memory available, and we include it as a baseline. It still leaves two problems. Its cost grows with the number of entities, not the number of slots. And it is trained for link scoring rather than for what the LLM can read, which is the setting where Can LLMs Use Relational Transformer Embeddings? saw projected embeddings fail. Comparing it against the ablation trained with cross-entropy only shows whether learned slots help beyond the encoder's own states.
Why not just use temporal text retrieval like MemoTime? Retrieval with chronological pruning addresses the temporal incoherence of plain retrieval. MemoTime's MultiTQ results show it is strong. The cost is several LLM calls per question and a store that keeps growing. We compare at matched prompt tokens and report accuracy per call. Where retrieval wins on accuracy, we will say so and treat our method as the low-latency option rather than claiming superiority.
Why not just use a long-context LLM with the full history? That is exactly our teacher. Its cost grows linearly with history, and it hits the context limit. The extrapolation test below measures how much of its accuracy survives once it must truncate.
Proposed Experiments
The main evaluation is a streaming version of MultiTQ and of the ETR subsets drawn from ICEWS and GDELT. The graph is replayed in time order, each question is posed at its own timestamp, and any answer requiring facts after that timestamp is excluded. We report accuracy (MultiTQ) and F1 (ETR) stratified by evidence age, along with LLM calls, prompt tokens and peak memory. TimeQuestions serves as an out-of-source transfer test.
The first decisive check is extrapolation, in the spirit of RDE's looped-clip test. We train with teacher histories of at most a few thousand events, then evaluate on streams 5 to 20 times longer. Two outcomes count as success. First, the student's accuracy curve stays flat while the truncated teacher's accuracy falls. Second, the gap between output-space distillation and the cross-entropy-only ablation widens with stream length. A student that decays at the same rate as the recency window would falsify the drift-correction claim.
The second check sweeps the slot count $K$ and the read-out count $k$, with and without anchors. This tests whether output-space distillation removes the saturation seen in prior work when soft tokens go from 64 to 1024, and whether it removes the need for text scaffolding.
References
- Can LLMs Use Relational Transformer Embeddings?
- Recurrent Dynamic Embedding for Video Object Segmentation
- Towards Explainable Temporal Reasoning in Large Language Models: A Structure-Aware Generative Framework
- MemoTime: Memory-Augmented Temporal Knowledge Graph Enhanced Large Language Model Reasoning
- Fast Video Object Segmentation Using the Global Context Module
- MovieChat+: Question-Aware Sparse Memory for Long Video Question Answering
- HierarQ: Task-Aware Hierarchical Q-Former for Enhanced Video Understanding
- Enhancing Large Language Model for Knowledge Graph Completion via Structure-Aware Alignment-Tuning
- WinT3R: Window-Based Streaming Reconstruction with Camera Token Pool