Gotcha! This Model Uses My Code! Evaluating Membership Leakage Risks in Code Models

Fuente: arXiv
Guardado en:
Detalles Bibliográficos
Autores principales: Yang, Zhou, Zhao, Zhipeng, Wang, Chenyu, Shi, Jieke, Kim, Dongsum, Han, Donggyun, Lo, David
Formato: Preprint
Publicado: 2023
Materias:
Acceso en línea:
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
_version_ 1866909348534419456
author Yang, Zhou
Zhao, Zhipeng
Wang, Chenyu
Shi, Jieke
Kim, Dongsum
Han, Donggyun
Lo, David
author_facet Yang, Zhou
Zhao, Zhipeng
Wang, Chenyu
Shi, Jieke
Kim, Dongsum
Han, Donggyun
Lo, David
contents Given large-scale source code datasets available in open-source projects and advanced large language models, recent code models have been proposed to address a series of critical software engineering tasks, such as program repair and code completion. The training data of the code models come from various sources, not only the publicly available source code, e.g., open-source projects on GitHub but also the private data such as the confidential source code from companies, which may contain sensitive information (for example, SSH keys and personal information). As a result, the use of these code models may raise new privacy concerns. In this paper, we focus on a critical yet not well-explored question on using code models: what is the risk of membership information leakage in code models? Membership information leakage refers to the risk that an attacker can infer whether a given data point is included in (i.e., a member of) the training data. To answer this question, we propose Gotcha, a novel membership inference attack method specifically for code models. We investigate the membership leakage risk of code models. Our results reveal a worrying fact that the risk of membership leakage is high: although the previous attack methods are close to random guessing, Gotcha can predict the data membership with a high true positive rate of 0.95 and a low false positive rate of 0.10. We also show that the attacker's knowledge of the victim model (e.g., the model architecture and the pre-training data) impacts the success rate of attacks. Further analysis demonstrates that changing the decoding strategy can mitigate the risk of membership leakage. This study calls for more attention to understanding the privacy of code models and developing more effective countermeasures against such attacks.
format Preprint
id arxiv_https___arxiv_org_abs_2310_01166
institution arXiv
publishDate 2023
record_format arxiv
spellingShingle Gotcha! This Model Uses My Code! Evaluating Membership Leakage Risks in Code Models
Yang, Zhou
Zhao, Zhipeng
Wang, Chenyu
Shi, Jieke
Kim, Dongsum
Han, Donggyun
Lo, David
Software Engineering
Cryptography and Security
Given large-scale source code datasets available in open-source projects and advanced large language models, recent code models have been proposed to address a series of critical software engineering tasks, such as program repair and code completion. The training data of the code models come from various sources, not only the publicly available source code, e.g., open-source projects on GitHub but also the private data such as the confidential source code from companies, which may contain sensitive information (for example, SSH keys and personal information). As a result, the use of these code models may raise new privacy concerns. In this paper, we focus on a critical yet not well-explored question on using code models: what is the risk of membership information leakage in code models? Membership information leakage refers to the risk that an attacker can infer whether a given data point is included in (i.e., a member of) the training data. To answer this question, we propose Gotcha, a novel membership inference attack method specifically for code models. We investigate the membership leakage risk of code models. Our results reveal a worrying fact that the risk of membership leakage is high: although the previous attack methods are close to random guessing, Gotcha can predict the data membership with a high true positive rate of 0.95 and a low false positive rate of 0.10. We also show that the attacker's knowledge of the victim model (e.g., the model architecture and the pre-training data) impacts the success rate of attacks. Further analysis demonstrates that changing the decoding strategy can mitigate the risk of membership leakage. This study calls for more attention to understanding the privacy of code models and developing more effective countermeasures against such attacks.
title Gotcha! This Model Uses My Code! Evaluating Membership Leakage Risks in Code Models
topic Software Engineering
Cryptography and Security
url https://arxiv.org/abs/2310.01166