mlsanityData to 24 Nov 2026

SWHForest: A Structural Curation and Search Layer for Large-Scale Code Corpora

arXiv 2611.11439 ↗Submitted 8 Nov 2026cs.SE cs.LGcited by 0

Not on the map. Why?

Abstract (arXiv)

Pre-training code language models relies on massive code corpora usually streamed over the internet. However, researchers rarely need a multi-terabyte archive in its entirety; instead, their workflow centers on curated subsets: selecting well-documented files, filtering out repetitive boilerplate, auditing for benchmark contamination, or retrieving specific code patterns. Yet, because modern corpora are typically published as file pointers and basic attributes rather than source text, no general structural layer exists to select which files to download: curating a subset requires downloading and parsing millions of files first just to discard most of them. We present SWHForest, an open-source framework and public dataset that provides this missing structural layer for any pointer-based corpus without redistributing source code. A single pass over the archive parses each file into an AST and immediately discards the source text, keeping only its structural summary. Queried locally or exposed by archive providers as a server-side filtering API, SWHForest selects matching files first (via SQL or index intersection) and downloads only surviving candidates. Across the ten largest languages of Stack-Edu (52.1M unique files, 341M definitions), SWHForest answers curation queries in milliseconds while cutting downloads by 46-72%, reducing live structural searches from hours of per-language streaming to seconds or minutes.

Key facts. No citing papers in the map yet (data through 24 Nov 2026). Builds on 16 of its 40 references that are in the map. Submitted 8 Nov 2026.

Builds on

16 of 40 references.

References · 16

  1. 2021Evaluating Large Language Models Trained on Codecited by 8,938
  2. 2021Program Synthesis with Large Language Modelscited by 3,972
  3. 2021Deduplicating Training Data Makes Language Models Bettercited by 762
  4. 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 684
  5. 2024StarCoder 2 and The Stack v2: The Next Generationcited by 544
  6. 2025SmolLM2: When Smol Goes Big -- Data-Centric Training of a Small Language Modelcited by 415
  7. 2022The Stack: 3 TB of permissively licensed source codecited by 380
  8. 2018The Adverse Effects of Code Duplication in Machine Learning Models of Codecited by 131
  9. 2024Quantifying Contamination in Evaluating Code Generation Capabilities of Language Modelscited by 72
  10. 2015SourcererCC: Scaling Code Clone Detection to Big Codecited by 42
  11. 2023The Vault: A Comprehensive Multilingual Dataset for Advancing Code Understanding and Generationcited by 22
  12. 2024An Exploratory Investigation into Code License Infringements in Large Language Model Training Datasetscited by 10
4 more
  1. 2025Cracks in The Stack: Hidden Vulnerabilities and Licensing Risks in LLM Pre-Training Datasetscited by 6
  2. 2020Referencing Source Code Artifacts: a Separate Concern in Software Citationcited by 2
  3. 2023Dataset: Copy-based Reuse in Open Source Softwarecited by 2
  4. 2023The Software Heritage License Dataset (2022 Edition)cited by 1

Built on by

Not cited yet.