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)|2023. 10. 02.
Software Engineering ResearchComputer Science인용 수 3
한 줄 요약

이 논문은 공개 및 기업 내부 소스 코드를 포함한 민감한 코드 데이터로 훈련된 코드 모델에 대한 멤버십 유출 공격을 위해 설계된 새로운 멤버십 유출 공격 기법인 Gotcha를 제안한다. 이 기법은 주어진 코드 스니펫이 훈련 데이터에 포함되었는지 여부를 예측하기 위해 서rogate 모델을 활용한다. 이 방법은 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.

연구 동기 및 목표

  • 공개 및 기업 내부 소스 코드를 포함한 데이터로 훈련된 코드 모델에서 멤버십 정보 유출 위험을 조사하는 것.
  • 특히 데이터 멤버십 유추에 대한 개인정보 취약성에 대한 이해 부족을 보완하고, 코드 생성 모델에 특화된 개인정보 위협을 규명하는 것.
  • 코드 데이터와 모델 행동의 고유한 특성을 고려해, 코드 모델을 대상으로 한 타겟 멤버십 유출 공격 기법을 개발하고 평가하는 것.
  • 공격자가 타겟 모델의 아키텍처나 사전 훈련 데이터를 얼마나 잘 알고 있는지에 따라 멤버십 유출 공격의 성공 여부가 어떻게 영향을 받는지 분석하는 것.
  • 멤버십 유출 위험을 줄이기 위한 완화 전략(예: 디코딩 전략 수정)을 탐색하는 것.

제안 방법

  • 공격자는 타겟 코드 모델의 입력 코드 스니펫에 대한 신뢰도 점수를 모방하는 서rogate 모델을 훈련한다.
  • 서rogate 모델의 신뢰도 점수를 활용해 이진 분류 작업을 통해 훈련 데이터와 비훈련 데이터를 구분한다.
  • 공격는 모델의 예측 신뢰도를 신호로 활용한다—훈련 예제에서 높은 신뢰도는 멤버십 가능성을 시사한다.
  • 이 방법은 공개 및 기업 내부 소스에서 유래한 다양한 코드 스니펫을 사용해 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가 만들고, 인간 에디터가 검토했습니다.