# Poster 29709

- Kind: Poster
- Talk page and recording: https://iclr.cc/virtual/2025/poster/29709

> Transcript of the talk's recording (session_asr), made by speech recognition or taken from the host's captions. It may contain errors. The words are the speakers'; listen to the recording on the talk's page before quoting it.

Hi, I'm Shoki Ikeguchi. I'd like to talk about our soft matcher, a soft and fast pattern matcher for billion-scale corpus searches. Large-scale corpus searches are required in the LLM era, for example, retriever-augmented generation, example search, and data filtering like toxic content detection. This is the example of toxic content detection with a query homemade bombs. The pattern match only finds a string that exactly match the query.
In contrast, vector search like sparse or dense vector search finds the texts that semantically similar to the query text. The exact pattern match is hard and lexical search, but it can enumerate the occurrence positions of the query pattern. Vector search can retrieve semantically similar texts, but it cannot enumerate sentences that exactly contain the query pattern.
In this work, we developed the soft but fine-grained pattern match which can enumerate the positions of patterns that semantically match the query. We propose soft matcher which softens pattern matching using the similarity of word embeddings. Our soft matcher not only softens pattern matching but also accelerates the flexible pattern matching over billion-word corpora by extending the embedding index.
Notably, our efficient algorithm does not require any GPUs. This is such examples of our soft matcher. Soft matcher can find the occurrence positions of the query pattern and its semantically similar patterns. We also released the demonstration of soft matcher. This video searched for the theorem one and found its neighboring patterns like equation one.
And such it for homemade bombs, the toxic pattern. This is a core idea of soft-matching. Our proposed method relaxes word matching using the similarity of word embeddings.
In particular, the words with a cosine similarity greater than alpha are regarded as matches. In our algorithm, a word-level inverted index is constructed before searching. This process is the same as a standard inverted index. During search time, the index rows that match words in the pattern are concatenated.
This SW is a list of words that softly match the query word W. Then we find the beginning positions of the pattern in the text. This is the example of our algorithm. First we set the positions of SV in the M. And second we shift S talk left by one and take the intersection with M.
And last, we shift s about left by 2 and take the intersection with M. We compare the soft matcher with exact matching and dense vector search on Wikipedia article corpora in English and Japanese. These are the results. Our soft matcher searches the query pattern flexibly.
The search results of soft matcher always contain that of exact matching, and soft matcher matches a query more adequately than base vector search. This is the running time of each search method. Note that our soft matcher does not use any GPUs in both indexing and searching.
In indexing, Sotomatcha took the same time as exact match. And in searching, Sotomatcha was slower than exact match, but faster than dense vector search though GPUs were not used. Our source code, Python package, and demo are publicly available.
Read Thrive People Install Source Matcher. Thank you.
