arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2606.01101cs.LGcs.AI
收藏

Soft-NBCE: 基于熵加权分块融合的长上下文处理

Soft-NBCE: Entropy-Weighted Chunk Fusion for Long-Context

Beijing Normal University(北京师范大学);Chunjiang Intelligence(春江智能)

Shihao Ji, Mingyu Li, Zihui Song

AI总结:

针对长上下文推理中硬选择策略导致语义碎片化的问题,提出Soft-NBCE,通过熵加权软融合和一致性蒸馏,在保持检索精度的同时提升多跳推理性能。

摘要:

自注意力的二次复杂度仍然是大型语言模型(LLMs)处理超长上下文的瓶颈。朴素贝叶斯认知引擎(NBCE)通过将文档分块并在每个解码步骤路由到熵最低的分块,实现了长上下文推理的并行化。这种硬选择策略在跨分块推理时会导致语义碎片化,因为相邻token之间的突然路由变化破坏了模型的上下文基础。我们提出了Soft-NBCE,这是一种轻量级扩展,用软熵加权分块融合替代了离散的分块选择。通过预测熵上的温度缩放Softmax,为所有分块分配连续权重,实现了跨分块条件分布的log空间聚合。为了部分补偿分块引入的条件独立性假设,我们提出了一致性蒸馏,这是一种基于LoRA的自蒸馏方法,通过KL散度将分块logit分布约束为全上下文教师分布。在LongBench多跳基准测试中,带有一致性蒸馏的Soft-NBCE在NBCE风格基线(MuSiQue F1: 0.310 vs. 0.275(Vanilla NBCE);HotpotQA F1: 0.479 vs. 0.427)上持续改进,同时在O(L^2/n)峰值内存下保持检索精度(NIAH-32K: 0.909)。

英文摘要:

The quadratic complexity of self-attention remains a bottleneck for Large Language Models (LLMs) processing ultra-long contexts. The Naive Bayes Cognitive Engine (NBCE) parallelizes long-context inference by chunking documents and routing to the lowest-entropy chunk at each decoding step. This hard-selection strategy causes semantic fragmentation during cross-chunk reasoning, as abrupt routing changes between adjacent tokens disrupt the model's contextual grounding. We present Soft-NBCE, a lightweight extension that replaces discrete chunk selection with soft entropy-weighted chunk fusion. A temperature-scaled Softmax over predictive entropies assigns continuous weights to all chunks, enabling log-space aggregation across chunk-conditioned distributions. To partially compensate for the conditional independence assumption introduced by chunking, we propose Consistency Distillation, a LoRA-based self-distillation that constrains the chunked logit distribution toward a full-context teacher via KL-divergence. On LongBench multi-hop benchmarks, Soft-NBCE with Consistency Distillation improves consistently over NBCE-style baselines (MuSiQue F1: 0.310 vs.\ 0.275 for Vanilla NBCE; HotpotQA F1: 0.479 vs.\ 0.427) while maintaining retrieval accuracy (NIAH-32K: 0.909) at O(L^2/n) peak memory.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑