Infini-gram mini: FM-인덱스를 활용한 인터넷 규모의 정확한 n-그램 검색
Infini-gram mini: Exact n-gram Search at the Internet Scale with FM-Index
June 13, 2025
저자: Hao Xu, Jiacheng Liu, Yejin Choi, Noah A. Smith, Hannaneh Hajishirzi
cs.AI
초록
언어 모델은 주로 인터넷에서 수집된 방대한 텍스트 데이터를 기반으로 학습되며, 이러한 데이터 소스를 이해하는 것이 점점 더 중요해지고 있다. 정확 일치 검색 엔진은 대규모 텍스트 코퍼스에서 문자열 출현 횟수를 세고 해당 문서를 검색할 수 있게 해주지만, 높은 저장 공간 오버헤드로 인해 인터넷 규모의 데이터에 적용하기에는 어려움이 있다. 본 논문에서는 페타바이트 수준의 텍스트 코퍼스를 검색 가능하게 하는 효율적이고 확장 가능한 시스템인 Infini-gram mini를 소개한다. FM-인덱스 데이터 구조(Ferragina and Manzini, 2000)를 기반으로 텍스트를 동시에 인덱싱하고 압축하는 이 시스템은 코퍼스 크기의 44%에 불과한 인덱스를 생성한다. Infini-gram mini는 기존 FM-인덱스 구현체와 비교하여 인덱싱 속도(18배), 인덱싱 시 메모리 사용량(3.2배 감소), 쿼리 시 메모리 사용량(무시할 수준으로 감소)에서 크게 개선되었다. 단일 128코어 CPU 노드를 사용하여 46TB의 인터넷 텍스트를 50일 만에 인덱싱했으며(75개 노드를 사용할 경우 19시간 소요), 벤치마크 오염에 대한 대규모 분석에서 Infini-gram mini의 중요한 활용 사례를 보여준다. SQuAD와 같은 핵심 언어 모델 평가 벤치마크가 인터넷 크롤 데이터에서 최대 40%까지 오염된 것을 발견했으며, 이러한 데이터로 학습된 언어 모델의 능력을 과대평가할 가능성이 있음을 확인했다. 이를 위해 다양한 핵심 및 커뮤니티 기여 벤치마크의 오염률을 공유하는 벤치마크 오염 게시판을 운영하고 있으며, Infini-gram mini 인덱스에 대한 일반 검색 쿼리를 제공하기 위한 웹 인터페이스와 API 엔드포인트도 공개했다.
English
Language models are trained mainly on massive text data from the Internet,
and it becomes increasingly important to understand this data source.
Exact-match search engines enable searching in large text corpora -- counting
string appearances and retrieving the enclosing documents -- yet the high
storage overhead hinders their application on Internet-scale data. We present
Infini-gram mini, an efficient and scalable system that can make petabyte-level
text corpora searchable. Based on the FM-index data structure (Ferragina and
Manzini, 2000), which simultaneously indexes and compresses text, our system
creates indexes with size only 44% of the corpus. Infini-gram mini greatly
improves upon the best existing implementation of FM-index in terms of indexing
speed (18times) and memory use during both indexing (3.2times reduction)
and querying (down to a negligible amount). We index 46TB of Internet text in
50 days with a single 128-core CPU node (or 19 hours if using 75 such nodes).
We show one important use case of Infini-gram mini in a large-scale analysis of
benchmark contamination. We find several core LM evaluation benchmarks to be
heavily contaminated in Internet crawls (up to 40% in SQuAD), which could lead
to overestimating the capabilities of language models if trained on such data.
We host a benchmark contamination bulletin to share the contamination rate of
many core and community-contributed benchmarks. We also release a web interface
and an API endpoint to serve general search queries on Infini-gram mini
indexes.