Semantic vs Lexical Deduplication for Text Distillation

Parent: Document Extraction & Text Distillation · Published reference · snapshot 2026-09-08

↓ Facts as markdownall context files

Deduplication is a foundational data-curation step in training large language models (LLMs) and creating high-quality text distillation pipelines. Redundant data causes models to memorize specific pas

These notes link each claim to its source. Some citations identify archived research reports that are no longer hosted on this site. A published reference means the content is available; it does not certify independent review or accuracy.Read the editorial policy and follow the sources before relying on a claim.

Executive Summary

Key Findings

1. Lexical vs Semantic Deduplication

2. Exact Hash vs Cosine Similarity

  • Cosine Similarity: [archived source: https://llms-explorer.com/sources/global-ai-hub/semantic-vs-lexical-dedup/#2-exact-hash-vs-cosine-similarity]
    • Mechanism: Calculates the angle between two dense embedding vectors. Values closer to 1.0 indicate semantic equivalence. [archived source: https://llms-explorer.com/sources/global-ai-hub/semantic-vs-lexical-dedup/#2-exact-hash-vs-cosine-similarity]
    • Complexity: Requires forward passes through an embedding model $O(N)$ followed by nearest neighbor search (often scaling terribly unless using HNSW/FAISS). [archived source: https://llms-explorer.com/sources/global-ai-hub/semantic-vs-lexical-dedup/#2-exact-hash-vs-cosine-similarity]
    • Strengths: Captures context, intent, and meaning regardless of orthographic variations. [archived source: https://llms-explorer.com/sources/global-ai-hub/semantic-vs-lexical-dedup/#2-exact-hash-vs-cosine-similarity]
    • Weaknesses: Highly resource-intensive. Requires empirical tuning of the similarity threshold. A threshold too low aggressively deletes unique data; a threshold too high misses redundancies. [archived source: https://llms-explorer.com/sources/global-ai-hub/semantic-vs-lexical-dedup/#2-exact-hash-vs-cosine-similarity]
  • 3. MinHash vs SimHash

    Contrarian Views And Risks

    Open Questions

    Sources

    Rerun Inputs

    Where this helps

    Project ideas

    Antipatterns

    Known issues

    Where this helps

    Project ideas

    Antipatterns

    Known issues

    Children

    ← the whole tree · 3D view· how to read this page