한국어 초록
희소 어텐션(sparse attention) 메커니즘은 작은 키(key) 부분집합을 사용하여 $n$개 토큰에 대한 어텐션을 추정합니다. 기존의 많은 접근법은 최대 내적 검색(MIPS)을 사용하여 가중치가 가장 높은 키들을 검색하며, 이는 다음과 같은 질문을 제기합니다: MIPS 오라클에 대한 블랙박스 접근이 주어졌을 때, $\varepsilon$-정확도의 어텐션 추정치를 출력하기 위해 몇 개의 키를 검색해야 하는가? 본 연구에서는 우선순위 샘플링(priority sampling) 프레임워크를 통해 선행 연구들을 통합함으로써 이 질문에 답합니다. 단일 MIPS 인덱스를 사용할 경우, 검색되는 키의 수로 $Θ(\sqrt{n}/\varepsilon)$개가 필요충분함을 보입니다. $Θ(\log n)$개의 인덱스를 사용할 경우, 단 $O(\log n+1/\varepsilon^2)$개의 키만을 검색하는 알고리즘을 제시하고 이것이 거의 최적(near-optimal)임을 증명합니다. 보다 일반적으로는, MIPS 인덱스의 수와 검색되는 키의 수 사이의 매끄러운 트레이드오프를 확립하는 알고리즘을 설계합니다. 나아가 키와 쿼리의 증강(augmentation)을 허용한다면 위의 하한을 우회할 수 있음을 보입니다: 단일 MIPS 인덱스와 $O(1/\varepsilon^2)$개의 검색된 키만을 사용하는 단순한 우선순위 샘플링 추정기가 존재합니다. LLM 추론에 통합했을 때, 본 연구의 알고리즘들은 선행 연구에서 사용된 top-$k$ 및 샘플링 접근법보다 뛰어난 성능을 보이며 긴 컨텍스트로 유리하게 확장되는 어텐션 근사를 제공합니다.
원문 초록
Sparse attention mechanisms estimate attention over $n$ tokens using a small subset of keys. Many existing approaches use maximum inner product search (MIPS) to retrieve the heaviest keys, which motivates the following question: given black-box access to a MIPS oracle, how many keys must be retrieved to output an $\varepsilon$-accurate attention estimate? We answer this question by unifying prior approaches through the framework of priority sampling. With a single MIPS index, we show that $Θ(\sqrt{n}/\varepsilon)$ retrieved keys are both sufficient and necessary. With $Θ(\log n)$ indices, we give an algorithm that retrieves only $O(\log n+1/\varepsilon^2)$ keys and prove that this is near-optimal. More generally, we design algorithms that establish a smooth tradeoff between the number of MIPS indices and number of retrieved keys. We then show that if we allow augmentation of keys and queries, we can bypass the above lower bounds: there exists a simple priority-sampling estimator using a single MIPS index and $O(1/\varepsilon^2)$ retrieved keys. When integrated into LLM inference, our algorithms outperform top-$k$ and sampling approaches used in prior work and yield attention approximation that scales favorably to long contexts.
제출 이력
확인된 버전만 표시합니다. 전체 제출 이력은 arXiv 원문에서 확인하세요.
함께 살펴볼 논문
공통 태그를 근거로 연결했습니다. 실제 인용 관계나 논문의 우수성을 뜻하지 않습니다.
공통 태그로 연결된 공개 논문이 아직 없습니다.
토론
이 논문과 연결된 포럼 글이 아직 없습니다.