[논문 리뷰] Prompt Stealing Attacks Against Large Language Models
논문은 프롬프트 도용 공격을 LLM에 대해 파라미터 추출기와 프롬프트 재구성기를 사용하여 생성된 답으로부터 원래 프롭제를 추정하고 역설계하는 것을 제안하며, 실험에서 ChatGPT 및 LLaMA에서 강력한 성능을 보임.
The increasing reliance on large language models (LLMs) such as ChatGPT in various fields emphasizes the importance of ``prompt engineering,'' a technology to improve the quality of model outputs. With companies investing significantly in expert prompt engineers and educational resources rising to meet market demand, designing high-quality prompts has become an intriguing challenge. In this paper, we propose a novel attack against LLMs, named prompt stealing attacks. Our proposed prompt stealing attack aims to steal these well-designed prompts based on the generated answers. The prompt stealing attack contains two primary modules: the parameter extractor and the prompt reconstruction. The goal of the parameter extractor is to figure out the properties of the original prompts. We first observe that most prompts fall into one of three categories: direct prompt, role-based prompt, and in-context prompt. Our parameter extractor first tries to distinguish the type of prompts based on the generated answers. Then, it can further predict which role or how many contexts are used based on the types of prompts. Following the parameter extractor, the prompt reconstructor can be used to reconstruct the original prompts based on the generated answers and the extracted features. The final goal of the prompt reconstructor is to generate the reversed prompts, which are similar to the original prompts. Our experimental results show the remarkable performance of our proposed attacks. Our proposed attacks add a new dimension to the study of prompt engineering and call for more attention to the security issues on LLMs.
연구 동기 및 목표
- LLM 사용에서 프롬프트 엔지니어링의 경제적 및 보안 영향 강조.
- 원래 프롬프트를 역설계하기 위한 두 모듈 프레임워크(파라미터 추출기 및 프롬프트 재구성기) 제안.
- 다양한 데이터셋과 모델에서 공격 효과를 평가하고 기준선과 비교.
- 방어 전략과 한계를 논의하고 LLM 시스템의 보안 고려사항을 강조.
제안 방법
- 주 분류기와 두 개의 하위 분류기를 사용하여 프롬프트 유형(직접, 역할 기반, 맥락 내)을 분류한다.
- 생성된 답변을 바탕으로 프롬프트 범주를 예측하도록 분류기를 학습하고, 역할 기반 프롬프트의 경우 특정 역할을, 맥락 내 프롬프트의 경우 맥락의 수를 예측한다.
- 추출된 매개변수와 맥락 정보를 바탕으로 프롬프트를 재구성하기 위해 ChatGPT를 사용하여 역 프롬프트를 생성한다.
- 문장-트랜스포머 임베딩을 사용하여 프롬프트 유사도(PS)와 답변 유사도(AS)를 평가한다.
- 두 개의 데이터셋(RetrievalQA 및 Alpaca-GPT4)과 두 개의 LLM(ChatGPT 및 LLaMA)에 대한 공격을 평가한다.
- 공격 효과를 줄이기 위한 두 가지 방어책을 제안하고 그 영향을 측정한다.

실험 결과
연구 질문
- RQ1생성된 답변으로부터 원래 프롬프트의 유형을 정확하게 추론할 수 있는가?
- RQ2유형과 매개변수가 추론된 후 원래 프롬프트를 얼마나 잘 재구성할 수 있는가?
- RQ3방어책이 프롬프트 도용 공격의 효과를 의미 있게 감소시키며 모델/데이터셋에 걸쳐 견고한가?
주요 결과
- 주 분류기는 RetrievalQA에서 ChatGPT와 함께 0.833 정확도, Alpaca-GPT4에서 0.811을 달성한다.
- LLaMA 기반 주 분류기는 RetrievalQA에서 0.884, Alpaca-GPT4에서 0.855의 정확도를 달성한다.
- 역할 기반 하위 분류기는 ChatGPT와 함께 RetrievalQA에서 0.732 정확도(15-class 작업)에 도달한다.
- 맥락 내 하위 분류기는 맥락 수 예측에서 0.614 정확도(4-클래스)에 도달한다.
- 프롬프트 재구성은 높은 프롬프트 유사도(PS)와 답변 유사도(AS)를 달성한다; ChatGPT를 사용한 직접 프롬프트의 경우 PS=0.832, AS=0.768이다.
- 매개변수 추출기 가이드 도입은 재구성을 개선한다(예: RetrievalQA의 역할 기반 프롬프트에서 PS=0.803, AS=0.703).
- 기준선(매개변수 추출 없음)은 현저히 낮은 성능을 보이며 계층적 예측의 필요성을 보여준다.
- 방어 전략은 유사도 지표를 감소시키지만 공격 효과를 제거하지 못하며 견고함을 시사한다.

더 나은 연구,지금 바로 시작하세요
연구 설계부터 논문 작성까지, 연구 시간을 획기적으로 줄여보세요.
카드 등록 없음 · 무료 플랜 제공
이 리뷰는 AI가 만들고, 인간 에디터가 검토했습니다.