arXiv:2511.14694q-bio.GNcs.AI2025-11被引 1

让DNA大模型突破长序列推理瓶颈,压缩后几乎无损

Near-Lossless Model Compression Enables Longer Context Inference in DNA Large Language Models

  • 用分层压缩摘要令牌替代原始注意力键值,逐层减少内存占用
  • 1kb序列压缩为10个摘要令牌,核苷酸概率误差仅0.0004
  • 适配普通显卡,实现近线性扩展,推理长度提升百倍

基于大规模跨物种DNA语料训练的DNA大语言模型(LLMs)能学习基因组序列的基本“语法”与演化模式,对长距离序列建模具有强大先验能力。然而,自注意力的二次计算开销及自回归解码中键值(KV)缓存的内存增长严重限制其实际应用,导致常用固定窗口截断或滑动窗口策略,牺牲超长序列的保真度。本文提出FOCUS(特征导向的超长自注意力压缩),一种可插入预训练DNA LLM的渐进式上下文压缩模块。FOCUS结合基因组学中的k-mer表示与可学习的层次压缩机制:在k-mer粒度插入摘要令牌,并在多层Transformer中逐步压缩注意力键值激活,仅保留摘要状态而丢弃普通令牌的键值。共享边界窗口方案实现跨窗口稳定接口,最小化长程信息损失。我们在基于Evo-2的DNA LLM上验证,该模型在GRCh38染色体1上进行自监督微调,并采用随机压缩调度以增强鲁棒性。在人类未见染色体上测试,压缩1kb上下文至仅10个摘要令牌(约100倍压缩比)时,平均核苷酸概率偏差仅约0.0004。相比基线无压缩方案,FOCUS显著降低KV缓存内存,将有效推理复杂度从O(N²)转为近线性O(N),在消费级GPU上实现约100倍更长的推理窗口,且保持近乎无损保真度。

原文摘要 · Abstract (English)

Trained on massive cross-species DNA corpora, DNA large language models (LLMs) learn the fundamental "grammar" and evolutionary patterns of genomic sequences. This makes them powerful priors for DNA sequence modeling, particularly over long ranges. However, two major constraints hinder their use in practice: the quadratic computational cost of self-attention and the growing memory required for key-value (KV) caches during autoregressive decoding. These constraints force the use of heuristics such as fixed-window truncation or sliding windows, which compromise fidelity on ultra-long sequences by discarding distant information. We introduce FOCUS (Feature-Oriented Compression for Ultra-long Self-attention), a progressive context-compression module that can be plugged into pretrained DNA LLMs. FOCUS combines the established k-mer representation in genomics with learnable hierarchical compression: it inserts summary tokens at k-mer granularity and progressively compresses attention key and value activations across multiple Transformer layers, retaining only the summary KV states across windows while discarding ordinary-token KV. A shared-boundary windowing scheme yields a stationary cross-window interface that propagates long-range information with minimal loss. We validate FOCUS on an Evo-2-based DNA LLM fine-tuned on GRCh38 chromosome 1 with self-supervised training and randomized compression schedules to promote robustness across compression ratios. On held-out human chromosomes, FOCUS achieves near-lossless fidelity: compressing a 1 kb context into only 10 summary tokens (about 100x) shifts the average per-nucleotide probability by only about 0.0004. Compared to a baseline without compression, FOCUS reduces KV-cache memory and converts effective inference scaling from O(N^2) to near-linear O(N), enabling about 100x longer inference windows on commodity GPUs with near-lossless fidelity.

DNA模型长序列推理模型压缩自注意力

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。