WavePrune: RoPE에는 대개 한 주기만으로 충분하다
WavePrune: One period is often enough for RoPE
한국어 초록
회전 위치 임베딩(RoPE, Rotary Position Embedding)은 쿼리 및 키 벡터의 각 2차원 채널을 채널별 특정 주파수로 회전시켜 토큰 위치를 인코딩함으로써, 어텐션 로짓이 공통 위치 이동에 대해 불변하도록 만든다. 그러나 이러한 회전은 주기적이기 때문에, 전체 회전 주기만큼 떨어진 상대적 위치를 서로 구별하기 어려워지는 위치 에일리어싱(position aliasing)을 유발한다. 이를 해결하기 위해, 본 연구에서는 각 채널을 첫 번째 회전 주기로 제한하는 WavePrune을 제안한다. 이를 통해 위치 에일리어싱으로 인해 발생하는 어텐션 맵 내 혼란 요소를 제거하고 전반적인 롱 컨텍스트(long-context) 성능을 향상할 수 있음을 보인다. 구체적으로 WavePrune은 추가적인 튜닝 없이도 테스트한 5개 모델 중 4개에서 HELMET 점수를 향상시켰다(예: Qwen3-8B에서 35.7 -> 40.0). 또한 모델을 처음부터 사전학습(pretraining)할 때, WavePrune을 적용하지 않고 사전학습한 경우보다 외삽된 길이(extrapolated lengths)에서 더 낮은 검증 손실을 달성한다. WavePrune은 각 채널을 슬라이딩 윈도우로 제한하므로 세밀한 희소성을 유도하며, 하드웨어에 최적화된 당사의 CUDA 커널을 통해 32K 컨텍스트에서 FlashAttention-2 대비 1.15배의 프리필(prefill) 및 1.24배의 디코딩 속도 향상을 얻는다. 종합적으로 이러한 결과는 흔히 필수적인 것으로 여겨지던 RoPE의 주기적 구조가 첫 번째 회전 주기를 넘어서는 대개 불필요함을 보여준다.
원문 초록
Rotary Position Embedding (RoPE) encodes token positions by rotating each two-dimensional channel of the query and key vectors at a channel-specific frequency, making the attention logits invariant to a common shift of positions. However, this rotation is periodic, and it leads to position aliasing where relative positions separated by a full rotation period become hard to tell apart. To address this, we propose WavePrune, which restricts each channel to its first rotation period. We show that it removes the distractions in attention maps created by position aliasing and improves overall long-context performance. Specifically, WavePrune raises the HELMET score on four of five models we test without any extra tuning (e.g., 35.7 -> 40.0 on Qwen3-8B). When pretraining models from scratch, WavePrune also achieves lower validation loss at extrapolated lengths than pretraining without it. Because WavePrune restricts each channel to a sliding window, it induces a fine-grained sparsity that our hardware-aligned CUDA kernels exploit for 1.15x prefill and 1.24x decoding speedups over FlashAttention-2 at 32K context. Together, these results show that RoPE's periodic structure, widely regarded as essential, is largely redundant beyond the first rotation period.
제출 이력
확인된 버전만 표시합니다. 전체 제출 이력은 arXiv 원문에서 확인하세요.
함께 살펴볼 논문
공통 태그를 근거로 연결했습니다. 실제 인용 관계나 논문의 우수성을 뜻하지 않습니다.
공통 태그로 연결된 공개 논문이 아직 없습니다.
토론
이 논문과 연결된 포럼 글이 아직 없습니다.