Scale-Dependent Semantic Deduplication

Open
#1,758 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
python

Research direction

Start by locating the existing SemDeDup stage and SemDeDupConfig, then review the linked paper's power-law and collision-rate formulas. Map the required configuration, threshold defaults, SemanticCollisionAudit utility, warning, documentation table, and integration test to the existing project structure. Done means all listed Definition of Done items are implemented and the large-scale simulated test verifies tighter thresholds reduce near-duplicates.

Written by the indexing model from the issue text.

Description

enhancement

What:
Add scale-dependent threshold adjustment to the existing SemDeDup stage, where semantic similarity thresholds tighten as corpus size (or target model size) increases. Based on the empirical finding that gradient alignment for semantically equivalent documents increases with model capability, causing accelerated "semantic collisions" at hundreds of billions of tokens.

Why:
arXiv:2603.06603 (Feb 2026) demonstrates that semantic duplication disrupts standard scaling laws — causing mild degradation in small models but rapidly increasing loss penalties in larger models. Fixed similarity thresholds calibrated on small runs systematically over-retain semantic duplicates at production scale, corrupting scaling predictions. This is a silent bug in every large-scale pretraining pipeline using SemDeDup with fixed thresholds.

Definition of Done:

  • Extend SemDeDupConfig with scale_aware: bool and target_model_params: int fields
  • Implement threshold scaling function: ε(N_corpus, N_model) derived from the power law + collision rate formula in the paper
  • Ships with recommended default thresholds at 1B / 10B / 100B / 1T token scales (table in docs)
  • SemanticCollisionAudit utility: samples the corpus at target scale, reports estimated semantic collision rate before dedup
  • Integration test: verify tighter thresholds reduce semantic near-duplicate count at simulated large scale
  • Warning logged when target_model_params is unset and corpus size exceeds 100B tokens
Dominant language
Python
Stars
1.8k
Forks
328
Avg merge
4d 5h
Merged PRs (30d)
30

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from NVIDIA-NeMo/Curator

All issues in NVIDIA-NeMo/Curator

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.