PORTAL: Per-User LoRA Memory for Aggregation-Heavy Reasoning at $O(1)$ Context
Xuan Qi ⋅ Yimin Wang
Abstract
Agents that reason over a user's long personal history must decide where that history lives at inference. Retrieval (RAG) keeps it as text and fetches a top-$k$ slice per query. We first show that for aggregation / global queries (counts, lists, distinct-value, existence—"how many of my projects used Python?"), top-$k$ retrieval over raw records faces a structural recall ceiling (list-recall $\le k/m$ for a relevant set of size $m$): as the relevant set outgrows a fixed budget $k$, the fraction of gold records retrieved falls to 0.15 and aggregation accuracy tracks it down—a retrieval-coverage limit we isolate directly, distinct from the reader-aggregation limit that dominates at small histories. The remedy is pre-consolidation: computing global views at write time. We find this lever helps both substrates—a RAG baseline that also indexes summaries reaches 0.68/0.94, and a parametric adapter reaches 0.73/0.89—so consolidation, not the substrate, is what overcomes the ceiling. Our method PORTAL encodes each user's history (records plus recite-then-aggregate consolidation) into a small per-user LoRA on a shared frozen small model (Qwen3-1.7B/4B). Its distinctive value is delivering consolidated answering at $O(1)$ input context (81 input tokens, and small generated output) across the consolidated query types (single-fact 1.00, aggregation 0.73, temporal 1.00, list-recall 0.89; it does not solve multi-hop or abstention), whereas RAG-consolidated must retrieve summaries (131–576 tokens) and drops non-summarized types (temporal 0.03–0.61). PORTAL is thus Pareto-optimal on the accuracy-vs-input-context frontier over these types, and is compatible with multi-tenant multi-LoRA serving. We are explicit about its limits: it answers only consolidated views (generalization to unanticipated aggregation values collapses to 0.37/0.14—a reversal-curse-like effect, where RAG-consolidated stays flexible), pays a one-time write, and does not save storage or raw throughput at short histories. PORTAL reframes memory as a lever for efficient reasoning: consolidated history in weights → $O(1)$ context → the budget returns to reasoning.
Chat is not available.
Successful Page Load