Papers
Topics
Authors
Recent
Search
2000 character limit reached

IDF-Weighted Keyword Overlap

Updated 12 December 2025
  • IDF-weighted keyword overlap is a method for quantifying text similarity by weighting token overlaps with inverse document frequency, emphasizing rare, informative terms.
  • It utilizes consistent-weighted sampling to extend traditional Jaccard similarity, enabling efficient, unbiased estimation over all text substrings.
  • The MONO framework optimizes index construction and query retrieval, achieving significant speed and storage improvements for near-duplicate detection and semantic search.

IDF-weighted keyword overlap refers to the quantification and approximation of semantic similarity between texts by weighting n-gram or token overlap according to the inverse document frequency (IDF) of each token. This approach generalizes the classic unweighted Jaccard similarity, integrating term frequency-inverse document frequency (TF-IDF) schemes prominent in information retrieval, and lies at the core of advanced text alignment and near-duplicate detection frameworks. Algorithms that accurately and efficiently estimate this measure for all substrings of large corpora enable robust detection of semantic similarity, down-weighting spurious matches on frequent vocabulary and emphasizing rare, information-carrying terms (Zhang et al., 30 Aug 2025).

1. Definition of IDF-Weighted Jaccard Similarity

IDF-weighted Jaccard similarity extends the classical set-based Jaccard metric by accounting for both token frequency and global discriminativity. Given token sets AA and BB, each token tt is assigned an inverse document frequency

idf(t)=log(NNt)\operatorname{idf}(t) = \log\left(\frac{N}{N_t}\right)

where NN is the corpus size and NtN_t the number of documents containing tt. For a segment AA,

wtA=tf(t,A)idf(t)w_t^A = \operatorname{tf}(t, A) \cdot \operatorname{idf}(t)

with tf(t,A)\operatorname{tf}(t, A) denoting the term frequency of BB0 in BB1. The IDF-weighted Jaccard similarity is then

BB2

This metric smoothly discounts ubiquitous tokens and accentuates rare, content-discriminative vocabulary. Because IDF weights are corpus-level constants, they can be incorporated into precomputed token weightings per segment (Zhang et al., 30 Aug 2025).

2. Consistent-Weighted Sampling (CWS) for Efficient Estimation

Classic min-hash sketches estimate unweighted Jaccard similarity and are insufficient for the weighted case. To extend to BB3, improved consistent-weighted sampling (CWS) [Ioffe '10] is utilized. For each token BB4, CWS associates three shared random variables: BB5, BB6, and BB7. For segment BB8 and BB9,

tt0

The sketch tt1 is taken as the triple tt2 where tt3. With tt4 independent hash sketches,

tt5

tt6

Thus, the CWS-based sketch enables unbiased, sublinear estimation of IDF-weighted overlap in tt7 time per nonzero token (Zhang et al., 30 Aug 2025).

3. Indexing and Querying All Substrings: MONO Framework

Indexing all tt8 substrings under weighted Jaccard is intractable by exhaustive representation. The MONO framework efficiently builds and queries such indices using "compact windows": axis-aligned rectangles tt9 of substring intervals idf(t)=log(NNt)\operatorname{idf}(t) = \log\left(\frac{N}{N_t}\right)0 through idf(t)=log(NNt)\operatorname{idf}(t) = \log\left(\frac{N}{N_t}\right)1 sharing identical CWS hash values.

Active keys are constructed for each token idf(t)=log(NNt)\operatorname{idf}(t) = \log\left(\frac{N}{N_t}\right)2 by processing all pairs idf(t)=log(NNt)\operatorname{idf}(t) = \log\left(\frac{N}{N_t}\right)3, idf(t)=log(NNt)\operatorname{idf}(t) = \log\left(\frac{N}{N_t}\right)4, considering the number of occurrences idf(t)=log(NNt)\operatorname{idf}(t) = \log\left(\frac{N}{N_t}\right)5 in idf(t)=log(NNt)\operatorname{idf}(t) = \log\left(\frac{N}{N_t}\right)6. Only pairs idf(t)=log(NNt)\operatorname{idf}(t) = \log\left(\frac{N}{N_t}\right)7 where the minimal hash is achieved for the first idf(t)=log(NNt)\operatorname{idf}(t) = \log\left(\frac{N}{N_t}\right)8 occurrences are retained. The number of active keys is idf(t)=log(NNt)\operatorname{idf}(t) = \log\left(\frac{N}{N_t}\right)9 in expectation, with NN0 as the maximal token frequency.

Compact windows are generated by sorting active keys and maintaining a 2D skyline to form non-overlapping rectangular partitions. For NN1 hashes, NN2 sets of windows are maintained in inverted indices, mapping hash values to tuples NN3 (Zhang et al., 30 Aug 2025).

4. Optimal Index Construction and Theoretical Bounds

The MONO partitioning algorithm produces an expected NN4 windows per text, which is theoretically tight. Any hash-based method must produce at least NN5 distinct windows in the worst case—demonstrated via coupon-collector arguments on adversarial texts consisting of repeated tokens in blocks of length NN6—to guarantee sensitivity to all distinct weighted min-hash segmentations (Zhang et al., 30 Aug 2025).

This optimality ensures subquadratic space and index construction costs, a substantial improvement over previous approaches requiring NN7 or worse.

5. Threshold Queries and Retrieval

The threshold-query mechanism proceeds in three steps:

  1. Compute the NN8-sketch of query NN9 using CWS.
  2. Retrieve NtN_t0 inverted lists for the corresponding hash values NtN_t1.
  3. Run a two-dimensional plane-sweep (IntervalScan) algorithm over the compact windows to identify all substrings NtN_t2 covered by at least NtN_t3 lists—i.e., substrings whose estimated similarity exceeds threshold NtN_t4.

Each matching substring NtN_t5 is reported with polylogarithmic overhead in NtN_t6, plus the output size, ensuring fast query execution suitable for large-scale duplicate detection and semantic search (Zhang et al., 30 Aug 2025).

6. Empirical Results and Comparative Performance

On real-world corpora (PAN, OpenWebText), MONO achieves up to NtN_t7 faster index construction than the AllAlign MultiSet-MinHash method, yields indices up to NtN_t8 smaller, and improves query latency by up to NtN_t9. The practical tt0 values—maximum local term frequency per text—are typically small, making the extra tt1 factor minor in operational settings (Zhang et al., 30 Aug 2025).

Approach Index Construction Index Size Query Latency
MONO (CWS + windows) up to 26× faster 30% smaller up to 3× faster
MultiSet-MinHash (prev)

7. Context and Applications

IDF-weighted keyword overlap provides a principled, efficiently computable method for near-duplicate alignment and similarity search under realistic IR-weighted metrics. By combining TF-IDF weighting, consistent-weighted sampling sketches, and an optimal partitioning and index scheme, the MONO framework establishes the first guaranteed subquadratic solution for substring alignment in large corpora under weighted Jaccard similarity (Zhang et al., 30 Aug 2025). A plausible implication is broader applicability to tasks in document forensics, plagiarism detection, and semantic clustering, where approximate set similarity under importance-weighted scoring is critical.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to IDF-Weighted Keyword Overlap.