Train in Vain: Functionality-Preserving Poisoning to Prevent Unauthorized Use of Code Datasets
Fuente:
arXiv
Saved in:
| Main Authors: | , , , , , , , , , , |
|---|---|
| Format: | Preprint |
| Published: |
2026
|
| Subjects: | |
| Online Access: | |
| Tags: |
Add Tag
No Tags, Be the first to tag this record!
|
| _version_ | 1866908990923866112 |
|---|---|
| author | Xiao, Yuan Wang, Jiaming Chen, Yuchen Song, Wei Sun, Jun Ma, Shiqing Mu, Yanzhou Zhai, Juan Fang, Chunrong Dong, Jin Song Chen, Zhenyu |
| author_facet | Xiao, Yuan Wang, Jiaming Chen, Yuchen Song, Wei Sun, Jun Ma, Shiqing Mu, Yanzhou Zhai, Juan Fang, Chunrong Dong, Jin Song Chen, Zhenyu |
| contents | The widespread availability of large-scale code datasets has accelerated the development of code large language models (CodeLLMs), raising concerns about unauthorized dataset usage. Dataset poisoning offers a proactive defense by reducing the utility of such unauthorized training. However, existing poisoning methods often require full dataset poisoning and introduce transformations that break code compilability. In this paper, we introduce FunPoison, a functionality-preserving poisoning approach that injects short, compilable weak-use fragments into executed code paths. FunPoison leverages reusable statement-level templates with automatic repair and conservative safety checking to ensure side-effect freedom, while a type-aware synthesis module suppresses static analysis warnings and enhances stealth. Extensive experiments show that FunPoison achieves effective poisoning by contaminating only 10% of the dataset, while maintaining 100% compilability and functional correctness, and remains robust against various advanced code sanitization techniques. |
| format | Preprint |
| id |
arxiv_https___arxiv_org_abs_2604_22291 |
| institution | arXiv |
| publishDate | 2026 |
| record_format | arxiv |
| spellingShingle | Train in Vain: Functionality-Preserving Poisoning to Prevent Unauthorized Use of Code Datasets Xiao, Yuan Wang, Jiaming Chen, Yuchen Song, Wei Sun, Jun Ma, Shiqing Mu, Yanzhou Zhai, Juan Fang, Chunrong Dong, Jin Song Chen, Zhenyu Cryptography and Security Software Engineering The widespread availability of large-scale code datasets has accelerated the development of code large language models (CodeLLMs), raising concerns about unauthorized dataset usage. Dataset poisoning offers a proactive defense by reducing the utility of such unauthorized training. However, existing poisoning methods often require full dataset poisoning and introduce transformations that break code compilability. In this paper, we introduce FunPoison, a functionality-preserving poisoning approach that injects short, compilable weak-use fragments into executed code paths. FunPoison leverages reusable statement-level templates with automatic repair and conservative safety checking to ensure side-effect freedom, while a type-aware synthesis module suppresses static analysis warnings and enhances stealth. Extensive experiments show that FunPoison achieves effective poisoning by contaminating only 10% of the dataset, while maintaining 100% compilability and functional correctness, and remains robust against various advanced code sanitization techniques. |
| title | Train in Vain: Functionality-Preserving Poisoning to Prevent Unauthorized Use of Code Datasets |
| topic | Cryptography and Security Software Engineering |
| url | https://arxiv.org/abs/2604.22291 |