LongAct: Harnessing Intrinsic Activation Patterns for Long-Context Reinforcement Learning
AI 摘要
LongAct通过聚焦高激活量权重,提升LLM在长文本RL任务中的性能和泛化能力。
主要贡献
- 观察到长文本处理中query和key向量的高激活量
- 提出LongAct策略,进行基于显著性的稀疏更新
- 验证了LongAct在不同RL算法中的普适性
方法论
提出LongAct,选择性更新与高激活量相关的权重,实现高效且更具针对性的模型优化。
原文摘要
Reinforcement Learning (RL) has emerged as a critical driver for enhancing the reasoning capabilities of Large Language Models (LLMs). While recent advancements have focused on reward engineering or data synthesis, few studies exploit the model's intrinsic representation characteristics to guide the training process. In this paper, we first observe the presence of high-magnitude activations within the query and key vectors when processing long contexts. Drawing inspiration from model quantization -- which establishes the criticality of such high-magnitude activations -- and the insight that long-context reasoning inherently exhibits a sparse structure, we hypothesize that these weights serve as the pivotal drivers for effective model optimization. Based on this insight, we propose LongAct, a strategy that shifts from uniform to saliency-guided sparse updates. By selectively updating only the weights associated with these significant activations, LongAct achieves an approximate 8% improvement on LongBench v2 and enhances generalization on the RULER benchmark. Furthermore, our method exhibits remarkable universality, consistently boosting performance across diverse RL algorithms such as GRPO and DAPO. Extensive ablation studies suggest that focusing on these salient features is key to unlocking long-context potential.