Understanding Is Done Early: A Depth Division of Labor in Large Language Models and Its Use for Unbounded-Context Memory
Transformer depth is not used uniformly: lower and middle layers build semantic representations, while upper layers increasingly specialize them for prediction. We turn this division of labor into CoMem (Comprehension Memory), which writes each context chunk only through an intermediate layer, retrieves a fixed number of cached residual states, and recomputes the query-conditioned upper layers over the resulting pack. For a fixed retrieval budget, model-side read compute and memory are independent of stored-context length. We evaluate a continued-trained Qwen3-8B base LM under a unified chat-template-free protocol. The backbone is frozen; the flagship trains only a rank-32 self-distillation LoRA on plain PG19, and we report an adapter-free arm separately. CoMem reaches 97.05 on RULER and 38.27 on LoCoMo versus 34.59 for full-context KV-Direct; the dialogue-memory advantage survives conversation-cluster resampling and an independent judge. Results on additional long-context and long-document tasks expose both the benefits of bounded retrieval and its in-window compression tax. Controlled depth sweeps show that deeper caching lowers per-query recomputation but incurs a fidelity loss that self-distillation substantially repairs. In a separate adapter-free efficiency control on an NVIDIA H20 at 128k, CoMem uses 18.26 GB rather than 89.36 GB and achieves a 7.83x prefill speedup. These results show that long-context memory can be organized along the layer axis, not only the token axis.
Code (0)
등록된 구현이 없습니다.
Similar Papers 제목 키워드 기반
Disentangling Mathematical Reasoning in LLMs: A Methodological Investigation of Internal Mechanisms
Large language models (LLMs) have demonstrated impressive capabilities, yet their internal mechanisms for handling reasoning-intensive tasks remain underexplored. To advance the understanding of model-internal processing…
Mathematical ReasoningEmbryosFormer: Deformable Transformer and Collaborative Encoding-Decoding for Embryos Stage Development Classification
The timing of cell divisions in early embryos during the In-Vitro Fertilization (IVF) process is a key predictor of embryo viability. However, observing cell divisions in Time-Lapse Monitoring (TLM) is a time-consuming p…
DecoderAgent based simulations visualize Adam Smith's invisible hand by solving Friedrich Hayek's Economic Calculus
Inspired by Adam Smith and Friedrich Hayek, many economists have postulated the existence of invisible forces that drive economic markets. These market forces interact in complex ways making it difficult to visualize or …
A Mathematical Framework Exhibiting the Emergence of Dynamic Expansion of Task Repertoire in \emph{Pheidole dentata}
The division of labor (DOL) and task allocation among groups of ants living in a colony is thought to be highly efficient, and key to the robust survival of a colony. A great deal of experimental and theoretical work has…
Understanding European Integration with Bipartite Networks of Comparative Advantage
Core objectives of European common market integration are convergence and economic growth, but these are hampered by redundancy, and value chain asymmetries. The challenge is how to harmonize labor division to reach glob…