Beyond Natural Language Perplexity: Detecting Dead Code Poisoning in Code Generation Datasets
Chi-Chien Tsai, Chia-Mu Yu, Ying-Dar Lin, Yu-Sung Wu, Wei-Bin Lee · 2025
Read Beyond Natural Language Perplexity: Detecting Dead Code Poisoning in Code Generation Datasets by Chi-Chien Tsai, Chia-Mu Yu, Ying-Dar Lin, Yu-Sung Wu, Wei-Bin Lee (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2502-20246.txt.
Description
Chi-Chien Tsai and co-authors present a 2025 defense for code training data sets. Language models that write code learn from huge public collections. Attackers can poison those collections with dead code: valid code that does nothing. The junk skews what models learn and can degrade code search tools. Standard detection reads how surprising each token is to a model. That fails on code, whose structure differs from plain language.
Their method, DePA, scores each line instead of each token. It uses the lines around a line as context, then flags lines whose scores stray far from the file's overall pattern. On benchmark data sets, DePA beat existing methods by a clear margin on detection scores. It also located poisoned segments far more precisely and ran much faster. The authors offer it as a practical cleaner for large code collections.
Catalog record
| CREATOR | Chi-Chien Tsai, Chia-Mu Yu, Ying-Dar Lin, Yu-Sung Wu, Wei-Bin Lee |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 30 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2502-20246