Uncovering Pretraining Code in LLMs: A Syntax-Aware Attribution Approach
Yuanheng Li, Zhuoyang Chen, Xiaoyun Liu, Yuhao Wang, Mingwei Liu, Yang Shi, Kaifeng Huang, Shengjie Zhao
摘要
As large language models (LLMs) become increasingly capable, concerns over the unauthorized use of copyrighted and licensed content in their training data have grown, especially in the context of code. Open-source code, often protected by open source licenses (e.g, GPL), poses legal and ethical challenges when used in pretraining. Detecting whether specific code samples were included in LLM training data is thus critical for transparency, accountability, and copyright compliance.
We propose SynPrune, a syntax-pruned membership inference attack method tailored for code. Unlike prior MIA approaches that treat code as plain text, SynPrune leverages the structured and rule-governed nature of programming languages. Specifically, it identifies and excludes consequent tokens that are syntactically required and not reflective of authorship, from attribution when computing membership scores. Experimental results show that SynPrune consistently outperforms the state-of-the-arts. Our method is also robust across varying function lengths and syntax categories.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
脉络
- Comprehensive Privacy Analysis of Deep Learning: Passive and Active White-box Inference Attacks against Centralized and Federated Learning 引用了 Membership Inference Attacks Against Machine Learning Models
- Comprehensive Privacy Analysis of Deep Learning: Passive and Active White-box Inference Attacks against Centralized and Federated Learning 引用了 ML-Leaks: Model and Data Independent Membership Inference Attacks and Defenses on Machine Learning Models
- ML-Leaks: Model and Data Independent Membership Inference Attacks and Defenses on Machine Learning Models 引用了 Membership Inference Attacks Against Machine Learning Models
- Membership Inference Attacks From First Principles 引用了 Membership Inference Attacks Against Machine Learning Models
- Membership Inference Attacks From First Principles 引用了 Comprehensive Privacy Analysis of Deep Learning: Passive and Active White-box Inference Attacks against Centralized and Federated Learning
- Membership Inference Attacks From First Principles 引用了 ML-Leaks: Model and Data Independent Membership Inference Attacks and Defenses on Machine Learning Models
它引用的 Paper20
- Membership Inference Attacks Against Machine Learning ModelsReza Shokri, Marco Stronati, Congzheng Song, Vitaly ShmatikovS&P 2017 · 5,137 次引用
- Pythia: A Suite for Analyzing Large Language Models Across Training and ScalingStella Biderman, Hailey Schoelkopf, Quentin Gregory Anthony, Herbie Bradley 等ICML 2023 · 1,822 次引用
- Comprehensive Privacy Analysis of Deep Learning: Passive and Active White-box Inference Attacks against Centralized and Federated LearningMilad Nasr, Reza Shokri, Amir HoumansadrS&P 2019 · 1,778 次引用
- ML-Leaks: Model and Data Independent Membership Inference Attacks and Defenses on Machine Learning ModelsAhmed Salem, Yang Zhang, Mathias Humbert, Pascal Berrang 等NDSS 2019 · 1,141 次引用
- Membership Inference Attacks From First PrinciplesNicholas Carlini, Steve Chien, Milad Nasr, Shuang Song 等S&P 2022 · 1,049 次引用
相关 Paper
- Code Membership Inference for Detecting Unauthorized Data Use in Code Pre-trained Language ModelsSheng Zhang, Hui Li, Rongrong JiEMNLP Findings 2024 · 6 次引用
- Sampling-based Pseudo-Likelihood for Membership Inference AttacksMasahiro Kaneko, Youmi Ma, Yuki Wata, Naoaki OkazakiACL Findings 2025 · 6 次引用
- How Do Semantically Equivalent Code Transformations Impact Membership Inference on LLMs for Code?Hua Yang, Alejandro Velasco, Thanh Le-Cong, Md Nazmul Haque 等ICSE 2026
- Can Watermarking Large Language Models Prevent Copyrighted Text Generation and Hide Training Data?Michael-Andrei Panaitescu-Liess, Zora Che, Bang An, Yuancheng Xu 等AAAI 2025 · 21 次引用
- DPDLLM: A Black-box Framework for Detecting Pre-training Data from Large Language ModelsBaohang Zhou, Zezhong Wang, Lingzhi Wang, Hongru Wang 等ACL Findings 2024 · 8 次引用
