Skip to main content
QUICK REVIEW

[論文レビュー] Gotcha! This Model Uses My Code! Evaluating Membership Leakage Risks in Code Models

Zhou Yang, Zhipeng Zhao|arXiv (Cornell University)|Oct 2, 2023
Software Engineering ResearchComputer Science被引用数 3
ひとこと要約

本稿では、特定のコードスニペットが訓練データに含まれていたかどうかを予測するためのサーヴィレートモデルを活用した、コードモデル向けに特化した新しいメンバー情報推定攻撃「Gotcha」を提案する。この手法は、0.95の高い真正陽性率と0.10の低い偽陽性率を達成し、特にプライベートな企業コードを含む機密性の高いコードで訓練されたコードモデルにおける深刻なメンバー情報漏洩リスクを明らかにした。

ABSTRACT

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.

研究の動機と目的

  • 公開および非公開のソースコードで訓練されたコードモデルにおけるメンバー情報漏洩リスクを調査すること。
  • 特にデータ所属情報推定に関する特異なプライバシー脆弱性を解明するという、コード生成モデル特有の理解の空白を埋めること。
  • コードデータおよびモデル動作の特徴を踏まえた、コードモデル向けの標的型メンバー情報推定攻撃手法の開発および評価すること。
  • 攻撃者が被害モデル(例:アーキテクチャ、事前学習データ)に関する知識をどの程度持っているかが、メンバー情報推定攻撃の成功に与える影響を検討すること。
  • デコード戦略の変更などの緩和戦略を検討し、コードモデルにおけるメンバー情報漏洩リスクを低減すること。

提案手法

  • 攻撃者は、被害コードモデルの入力コードスニペットに対する信頼度スコアを模倣するためのサーヴィレートモデルを訓練する。
  • サーヴィレートモデルの信頼度スコアを用いて、二値分類タスクとして訓練データと非訓練データを区別する。
  • 攻撃は、モデルの予測信頼度をシグナルとして利用する—訓練例に対して高い信頼度が得られれば、それがメンバーである可能性が高まる。
  • 本手法は、CodeGPT(コード補完モデル)を対象とし、公開および非公開のソースから得た多様なコードスニペットを用いて評価した。
  • 攻撃者の知識レベル(モデルアーキテクチャおよび事前学習データの完全な知識を含む)を変化させた状況でも攻撃をテストした。
  • 温度サンプリングやtop-kサンプリングなどのデコード戦略を変更し、それらがメンバー情報漏洩に与える影響を評価した。
Figure 1 . Splitting the datasets to train and evaluate surrogate models as well as the membership inference classifiers.
Figure 1 . Splitting the datasets to train and evaluate surrogate models as well as the membership inference classifiers.

実験結果

リサーチクエスチョン

  • RQ1公開および非公開コードの混合データで訓練されたコードモデルにおける、メンバー情報漏洩の程度はどの程度か?
  • RQ2ランダムな推測や既存の手法と比較して、コードモデルに対するメンバー情報推定攻撃はどの程度有効か?
  • RQ3攻撃者が被害モデルのアーキテクチャおよび事前学習データに関する知識をどの程度持っているかが、メンバー情報推定の成功に与える影響は?
  • RQ4コード生成モデルにおけるデコード戦略の変更は、メンバー情報漏洩リスクを低減できるか?
  • RQ5工業的現場で使用されるコードモデルにおけるメンバー情報推定の影響は何か?

主な発見

  • Gotchaは、真正陽性率0.95、偽陽性率0.10を達成し、ランダムな推測や先行手法を著しく上回った。
  • 攻撃者が被害モデルのアーキテクチャおよび事前学習データに関する詳細な知識を持つ場合、攻撃の成功率が顕著に向上した。
  • CodeGPTのような大規模なコード生成モデルに対しても、メンバー情報推定が可能であることが示され、深刻なプライバシーリスクを示した。
  • デコード戦略の変更(例:高い温度やtop-kサンプリングの使用)により、モデルの信頼度漏洩が効果的に抑制され、メンバー情報推定リスクの緩和が可能である。
  • 本研究は、プライベートまたは機密性の高いコードで訓練されたコードモデルがメンバー情報推定攻撃に対して脆弱であることを明らかにした。これは、産業界および企業利用における深刻なプライバシー懸念を示唆している。
  • 本研究は、コードモデルに対するメンバー情報推定攻撃を体系的かつ包括的に評価した最初の研究であり、コード生成システムにおける以前に無視されていた重大なプライバシー脅威を浮き彫りにした。
Figure 2 . The impact of different choices of surrogate models on the attack performance.
Figure 2 . The impact of different choices of surrogate models on the attack performance.

より良い研究を、今すぐ始めましょう

論文の読解から最終レビューまで、研究時間を劇的に削減しましょう。

クレジットカード登録不要

このレビューはAIが作成し、人間の編集者が確認しました。