SoftMatcha 2: A Fast and Soft Pattern Matcher for Trillion-Scale Corpora
Masataka Yoneda, Yusuke Matsushita, Go Kamoda, Kohei Suenaga, Takuya Akiba, Masaki Waga, Sho Yokoi
摘要
We present SoftMatcha 2, an ultra-fast and flexible search algorithm that enables search over trillion-scale natural language corpora in under 0.3 seconds while allowing semantic variations in the form of substitution, insertion, and deletion. Our approach employs string matching based on suffix arrays that scales well with corpus size, and represents words as vectors, which underpin its semantic flexibility. To mitigate the combinatorial explosion induced by the semantic relaxation of queries, our method is built on two key algorithmic ideas: dynamic corpus-aware pruning and fast exact lookup enabled by a disk-aware design. We theoretically analyze the efficiency of the proposed method, indicating that it can mitigate exponential growth in the search space. Empirically, on FineWeb-Edu (Lozhkov et al., 2024) (1.4T tokens), it achieves substantially lower search latency than existing methods: infini-gram (Liu et al., 2024 ), infini-gram mini (Xu et al., 2025 ), and SoftMatcha (Deguchi et al., 2025) . As a practical application, our method uncovers benchmark contamination in training corpora that existing approaches miss, and it also benefits information retrieval and paraphrase detection. We also provide an online demo of fast, soft search across corpora in seven languages. 1,2
问问这篇 Paper
智能体会读完全文。
Lune 把这篇 Paper 索引到了每一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。
它引用的顶会 Paper11
- Retrieval-Augmented Generation for Knowledge-Intensive NLP TasksPatrick Lewis, Ethan Perez, Aleksandra Piktus, Fabio Petroni 等NeurIPS 2020 · 被引用 19,162 次
- Measuring Massive Multitask Language UnderstandingDan Hendrycks, Collin Burns, Steven Basart, Andy Zou 等ICLR 2021 · 被引用 7,905 次
- SimCSE: Simple Contrastive Learning of Sentence EmbeddingsTianyu Gao, Xingcheng Yao, Danqi ChenEMNLP 2021 · 被引用 2,496 次
- Dense Passage Retrieval for Open-Domain Question AnsweringVladimir Karpukhin, Barlas Oguz, Sewon Min, Patrick Lewis 等EMNLP 2020 · 被引用 142 次
- Why and How LLMs Hallucinate: Connecting the Dots with Subsequence AssociationsYiyou Sun, Yu Gai, Lijie Chen, Abhilasha Ravichander 等NeurIPS 2025 · 被引用 20 次
相关 Paper
- SoftMatcha: A Soft and Fast Pattern Matcher for Billion-Scale Corpus SearchesHiroyuki Deguchi, Go Kamoda, Yusuke Matsushita, Chihiro Taguchi 等ICLR 2025
- Infini-gram mini: Exact n-gram Search at the Internet Scale with FM-IndexHao Xu, Jiacheng Liu, Yejin Choi, Noah A. Smith 等EMNLP 2025 · 被引用 1 次
- SeDA: Bridging the Gap between Efficient Syntactic and Precise Semantic Search of Similar Passages in Large Text CorporaPranay Mundra, Daniel Kocher, Martin Schaeler, Nikolaus AugstenVLDB 2026
- DESSERT: An Efficient Algorithm for Vector Set Search with Vector Set QueriesJoshua Engels, Benjamin Coleman, Vihan Lakshman, Anshumali ShrivastavaNeurIPS 2023 · 被引用 27 次
- SOLAR: Sparse Orthogonal Learned and Random EmbeddingsTharun Medini, Beidi Chen, Anshumali ShrivastavaICLR 2021 · 被引用 10 次
