SemHash-LLM: A Multi-Granularity Semantic Hashing Framework for Document Deduplication
SemHash-LLM is a multi-granularity framework that unifies semantic projection hashing, attention-weighted MinHash, and selective LLM adjudication to achieve efficient and robust large-scale document deduplication with minimal neural verification costs.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
Imagine you are running a massive library that receives millions of new books every day. Your goal is to get rid of duplicate copies so you don't waste space, but you face a tricky problem: some books are exact photocopies, while others are the same story just rewritten with different fonts, extra advertisements, or slightly shuffled sentences.
If you just look for exact matches, you miss the rewritten ones. If you try to read every single book to check for meaning, your library staff will burn out from exhaustion.
SemHash-LLM is a new, super-smart system designed to solve this "library problem" for the digital age. It acts like a highly efficient team of librarians that uses a mix of quick tricks and deep thinking to find duplicates without reading every single word.
Here is how the system works, broken down into simple steps:
1. The "Super-Scanner" (Semantic Projection Hashing)
Imagine trying to find two books that tell the same story. A traditional scanner might say, "These are different because one says 'car' and the other says 'automobile'."
SemHash-LLM uses a Super-Scanner (powered by a distilled version of a Large Language Model) that understands meaning. It turns the entire story of a document into a short, unique "barcode" (a binary code).
- The Magic: Even if the words change, if the meaning is the same, the barcodes will look very similar. This allows the system to quickly group similar stories together without reading them in detail.
2. The "Noise Filter" (Attention-Weighted MinHash)
Many web pages are cluttered. They have the same navigation menus, cookie warnings, and ads at the top and bottom, even if the article in the middle is unique. Traditional methods get confused by this "noise."
SemHash-LLM uses a Noise Filter that acts like a spotlight. It looks at the document and asks, "Which parts are the author actually talking about?"
- How it works: It ignores the boring, repetitive parts (like ads) and focuses only on the important, unique sentences. It then creates a "fingerprint" based only on those important parts, making it much harder to be tricked by template clutter.
3. The "Smart Boundary" (Contrastive Boundary Learning)
Sometimes, two documents are almost the same, but not quite. A rigid rule (like "if they are 90% similar, delete one") doesn't work for everything. A technical manual might need to be 99% identical to be a duplicate, while a news story might be a duplicate at 85%.
The system learns Smart Boundaries. Instead of using a fixed ruler, it learns to adjust the ruler based on the type of document. It figures out exactly where the line is between "similar enough to be a duplicate" and "different enough to keep."
4. The "Expert Judge" (LLM-as-Judge)
What happens when the system is confused? When the "Super-Scanner" and the "Noise Filter" can't agree, the system flags the pair as "borderline."
Instead of wasting time on every single document, it only calls in the Expert Judge (a powerful AI) for these tricky cases.
- The Strategy: The system handles 97% of the work automatically. It only asks the Expert Judge to read the remaining 3% of confusing pairs. This keeps the system fast and cheap while still getting the hard decisions right.
5. The "Funnel" (Cascaded Filtering)
The whole process works like a giant funnel with four layers:
- Layer 1: A quick check to throw out obvious exact copies.
- Layer 2: The "Super-Scanner" groups similar meanings.
- Layer 3: The "Noise Filter" checks the important parts.
- Layer 4: The "Expert Judge" only looks at the tiny few that are still confusing.
The Result
The paper claims that this system is incredibly effective. It successfully finds duplicates in five different difficult scenarios:
- Template Pollution: Pages with the same layout but different content.
- Short Texts: Tiny snippets that are slightly tweaked.
- Containment: One long article that contains a shorter one inside it.
- Viral Fragments: Popular phrases that appear everywhere.
By using this multi-step approach, the system achieves 91% accuracy (beating previous methods) while using the expensive "Expert Judge" for less than 1% of the work. It proves you can have both speed and deep understanding without needing to read every single document manually.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.