用预测不确定性验证长文本依赖关系,提升模型理解能力
EntropyLong: Effective Long-Context Training via Predictive Uncertainty
- 通过预测熵识别关键位置,筛选真实相关上下文
- 构建128K长度序列数据集,显著提升远距离信息处理能力
- 适合需要强长程建模的场景,如法律、科研文档分析
训练捕捉长程依赖的长文本语言模型需要专门的数据构造。现有方法如通用文本拼接或基于启发式的方法常无法保证真实的长程依赖。我们提出EntropyLong,一种新型数据构造方法,利用预测不确定性来验证依赖质量。该方法识别文档中高熵位置,从大规模语料库中检索语义相关的上下文,并通过评估这些上下文是否降低预测熵来验证其有效性。这种模型内验证机制确保每个依赖关系都代表可度量的信息增益,而非虚假关联。我们通过将原始文档与经验证的上下文补充组合,构建了具有验证依赖关系的训练样本。使用FineWebEdu和Cosmopedia数据集,生成了128K长度序列的验证数据集。在该数据上训练的模型在RULER基准测试中表现显著提升,尤其在需要远距离信息的任务中优势明显。经过指令微调后,模型在LongBenchv2上也取得显著进步,展现出更强的长上下文理解能力。大量消融实验进一步验证了基于熵的验证对于长上下文训练的必要性与有效性。
原文摘要 · Abstract (English)
Training long-context language models to capture long-range dependencies requires specialized data construction. Current approaches, such as generic text concatenation or heuristic-based variants, frequently fail to guarantee genuine long-range dependencies. We propose EntropyLong, a novel data construction method that leverages predictive uncertainty to verify dependency quality. Our approach identifies high-entropy positions in documents, retrieves semantically relevant contexts from large corpora, and verifies their utility by assessing whether they reduce prediction entropy. This model-in-the-loop verification ensures each dependency represents measurable information gain rather than spurious correlation. We construct training samples with long-range dependencies by combining original documents with these verified contextual supplements. Using FineWebEdu and Cosmopedia, we generate a dataset of 128K-length sequences with verified dependencies. Models trained on this data demonstrate significant improvements on RULER benchmarks, particularly in tasks requiring distant information. Following instruction fine-tuning, our models also achieve substantial gains on LongBenchv2, demonstrating enhanced long-context understanding. Extensive ablation studies further validate the necessity and effectiveness of entropybased verification for long-context training.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。