Papers
Topics
Authors
Recent
2000 character limit reached

Cross-Dataset Deduplication Methods

Updated 28 December 2025
  • Cross-Dataset Deduplication is the process of identifying duplicate records across multiple datasets to prevent data leakage and bias.
  • It employs advanced techniques such as ensemble blocking, LSH, and neural network approaches to efficiently manage large-scale and heterogeneous data.
  • Practical applications include safeguarding machine learning benchmarks, optimizing storage, and ensuring secure deduplication in multi-source environments.

Cross-dataset deduplication is the task of identifying and eliminating duplicate or near-duplicate data records, files, or objects that occur across disparate datasets. This process is distinct from intra-dataset deduplication, which focuses on redundancy within a single dataset or split. The need for cross-dataset deduplication arises in diverse domains, including text corpora curation for machine learning, large-scale code analysis, multi-source entity resolution, and secure image storage, due to the aggregation of data from multiple heterogeneous sources. The operation is central to ensuring the integrity of evaluation pipelines, preventing data leakage, reducing storage costs, and controlling training bias.

1. Problem Definition and Motivation

Cross-dataset deduplication addresses the identification of overlapping or duplicated entities where corpora may have:

  • Distinct schemas, tokenizations, and normalization forms (e.g., resumes, social profiles, Q&A data)
  • Structural noise or sparsity (e.g., missing attributes, OCR artifacts, domain-specific conventions)
  • Massive scale (e.g., billions of documents or images requiring deduplication within production service-level constraints)
  • Variation in the definition of “duplicate,” ranging from exact identity to high semantic similarity, potentially with noise or light edits

Motivations include:

2. Methodological Frameworks and Algorithms

Approaches to cross-dataset deduplication are dependent on both the domain and the definition of duplication:

Blocking and Candidate Generation

In entity resolution with heterogeneous schemas (e.g., career profiles), an ensemble blocking scheme combines:

  • Attribute Clustering (AC) Blocking: Schema-aware tokenization into "AttributeName:ValueToken" pairs, with block purging to discard high-frequency, low-discriminativity tokens. Retained blocks yield all candidate pairs (Balaji et al., 2016).
  • Dynamic Blocking: Hierarchical partitioning via ordered, discriminative attribute sets, iteratively refining blocks and emitting candidate pairs when blocks fall below a size threshold. The ensemble merges SDyn(SACSDyn)S_\text{Dyn} \cup (S_\text{AC} \setminus S_\text{Dyn}) to maximize pair completeness while maintaining computational efficiency.

LSH and MinHash-Based Approaches

For large-scale document or code deduplication:

  • LSHBloom: A memory- and disk-optimal variant of MinHashLSH for document-level deduplication, operating by shingling documents, computing MinHash signatures, splitting into bands, and populating Bloom filters as the index. The deduplication decision for a query document is made by probing corresponding band Bloom filters; if any indicates presence, the document is flagged as a duplicate (Khan et al., 2024).
  • Jaccard Similarity and MinHash: Provides efficient near-duplicate estimation via unbiased sampling; J(A,B)=AB/ABJ(A, B)=|A \cap B| / |A \cup B| is estimated via MinHash collision rates.
  • Bloom Filter Mathematics: Key parameters are sized to control overall false positive rate peffp_\text{eff}, enabling deployment at billions of documents scale with space savings (e.g., a 54× reduction at N=5×109N=5\times10^9 compared to traditional MinHashLSH).

Neural and Hashing Methods

  • Perceptual Hashing (pHash): Used for fast image deduplication and leakage detection, pHash computes a reduced DCT transform and thresholds low-frequency components, facilitating efficient hash-based lookups and cross-indexing. Near-duplicate detection leverages a Hamming distance threshold (Adimoolam et al., 2023).
  • Secure Locality-Sensitive Hashing (SLSH): A secure protocol for near-identical deduplication in untrusted cloud contexts, projecting feature vectors via random projection LSH with cryptographically secure post-processing to prevent data reconstruction by the server (Takeshita et al., 2020).
  • Contrastively Trained Bi-Encoder: For noisy and semantically altered text, neural approaches use contrastively trained document encoders, embedding entire documents for robust semantic similarity search via FAISS. A cross-encoder re-ranking step can further boost precision in smaller datasets (Silcock et al., 2022).

3. Evaluation Metrics and Empirical Results

Relevant metrics for cross-dataset deduplication include:

Metric Definition Range/Notes
Pair Completeness (PC) SblockG/G|S_\text{block} \cap G| / |G| (how many gold duplicates are covered) [0,1][0, 1]; recall analog
Reduction Ratio (RR) 1Sblock/[n(n1)/2]1 - |S_\text{block}| / [n(n-1)/2] (pruning power) Higher means fewer candidates to match
False Positive Rate (FPR) Fraction of pairs incorrectly flagged as duplicates Controlled via Bloom filter parameters or thresholds
Duplication Ratio 100×100 \times (percentage of cross-dataset duplicates/total) Quantifies dataset leakage (López et al., 2024)

Empirically:

  • AC Blocking attains PC0.99PC\approx0.99–$1.00$ on moderate data, RR0.73RR\approx0.73–$0.99$; Dynamic Blocking RR>0.90RR>0.90 but PCPC can drop to $0.89$ on heterogeneity.
  • LSHBloom matches MinHashLSH on F1, FPR 105\approx10^{-5}, with ~0.6% disk space usage; 270–250% faster runtime at billion-scale (Khan et al., 2024).
  • Perceptual hashing yields \simO(N) runtime, and for image datasets, enables detection of >90%>90\% duplicates and 93%93\% leakage rates in large benchmarks (Adimoolam et al., 2023).
  • For neural text deduplication, the bi-encoder approach yields ARI=91.5 vs. 75.0 for N-gram hashing, detecting clusters among millions of articles in practical wall-clock time (Silcock et al., 2022).

4. Domain-Specific Workflows

Text Data

  • Noise-Robust Deduplication: Neural bi-encoder architecture trained on explicit clusters detects edited, OCR-affected, or paraphrased duplicates across news and patent corpora, outperforming traditional N-gram and LSH (Silcock et al., 2022).
  • Extreme-Scale Document Deduplication: For LLM training curation, LSHBloom supports seamless merging of deduplication indices for new corpora and parameter tuning via held-out cross-corpus duplicate sets (Khan et al., 2024).

Code Data

  • Inter-Dataset Code Clone Detection: Tokenization-oriented clone detection based on Jaccard similarity over identifier/literal multisets, with calibrated thresholds for Type-3 clone coverage; duplication ratios as high as 22% found between pretraining and test splits, impacting LLM evaluation validity (López et al., 2024).

Images

  • Perceptual Hashing Pipelines: For remote-sensing imagery, pipelines entail normalization, grayscale conversion, DCT/pHash computation, and bucketed hash indexing; cross-split and cross-dataset deduplication is realized by rapid hash-collision or Hamming-neighborhood lookup (Adimoolam et al., 2023).
  • Secure Deduplication Protocols: SLSH-based schemes permit cross-user deduplication with formal privacy guarantees against malicious or colluding parties and preserve utility for near-duplicate detection via parameter tuning (k, L, c) (Takeshita et al., 2020).

5. Data Leakage and Evaluation Contamination

Identifying and removing inter-dataset duplication is critical for maintaining the integrity of machine learning model evaluation:

  • Duplication between pretraining corpora and evaluation test sets can inflate performance metrics, particularly under parameter-efficient adaptation methods (LoRA, prefix tuning, layer freezing) that retain more “memorized” features (López et al., 2024).
  • Quantitative analysis in (López et al., 2024) shows 22.4% test overlap for CodeTrans, and >13% for several fine-tuned splits; performance gaps between leaky and non-leaky models correlate strongly with the number of frozen layers or adapter use.
  • For large-scale non-ML datasets, test-set leakage as detected by neural deduplication can materially affect benchmarks (e.g., GPT-3 achieves 84% on leaked ReCoRD examples versus 70% on others) (Silcock et al., 2022).
  • Leakage statistics are typically derived via hash index comparison rates (Adimoolam et al., 2023) or graph traversal on overlap graphs (López et al., 2024).

6. Practical Recommendations and Best Practices

  • Blocking strategies: Use ensemble blocking (attribute clustering plus dynamic hierarchical blocking) for heterogeneous profiles, tuning block and purge thresholds on representative samples (Balaji et al., 2016).
  • LSH-based text deduplication: For extreme-scale document corpora, deploy LSHBloom with parameters (k-gram size, MinHash length, bands, false positive threshold) grid-searched on a small labeled dev set. Merge indices to accommodate corpora growth (Khan et al., 2024).
  • Neural bi-encoders for noisy corpora: Apply contrastive bi-encoder architectures for robust semantic deduplication, reserving cross-encoders for high-precision, smaller-scale clusters. Tune only similarity thresholds for new domains (Silcock et al., 2022).
  • Perceptual hashing for images: Normalize resolutions, use parallel hash computation, and shard hash tables for scalability. Employ Hamming thresholds for near-duplicate detection and handle domain heterogeneity by adjusting the DCT/hash parameters (Adimoolam et al., 2023).
  • Secure deduplication: For untrusted cloud contexts, employ privacy-respecting protocols such as SLSH, integrating cryptographically secure hashing and PAKE-based key exchange (Takeshita et al., 2020).
  • Leakage control: Systematically compute and report cross-dataset duplication rates, and remove test items with pretraining exposure to ensure fair assessment (López et al., 2024).

7. Scaling, Efficiency, and Open Challenges

Scaling cross-dataset deduplication to billions of records demands algorithmic and systems-level advances:

  • LSHBloom demonstrates linear scaling in document count with modest constant-factor resource usage, making it feasible for exascale LLM training set curation (Khan et al., 2024).
  • Attribute clustering blocking is highly parallelizable via Map/Reduce or Spark, while dynamic blocking’s sequential refinement can bottleneck distributed workflows (Balaji et al., 2016).
  • Neural bi-encoder approaches scale to tens of millions of documents per GPU day, but cross-encoder re-ranking remains a bottleneck for the largest datasets (Silcock et al., 2022).
  • In high-privacy contexts, computation and bandwidth costs of cryptographic protocols can be tuned via LSH parameter selection, but absolute security remains an open research question (Takeshita et al., 2020).

A plausible implication is that future research will focus on further minimizing leakage risk in open, compositional data ecosystems, improving scalability of neural deduplication for non-text modalities, and formalizing standardized pipelines for reporting and evaluation of cross-dataset deduplication operational metrics.

Whiteboard

Topic to Video (Beta)

Follow Topic

Get notified by email when new papers are published related to Cross-Dataset Deduplication.