Abstract
Significant advancements have recently been made in large language models, represented by GPT models. Users frequently have multi-round private conversations with cloud-hosted GPT models for task optimization. Yet, this operational paradigm introduces additional attack surfaces, particularly in custom GPTs and hijacked chat sessions. In this paper, we introduce a straightforward yet potent Conversation Reconstruction Attack (CRA). This attack targets the contents of previous conversations between GPT models and benign users, i.e., the benign users’ input contents during their interaction with GPT models. The adversary could induce GPT models to leak such contents by querying them with designed malicious prompts. Our comprehensive examination of privacy risks during the interactions with GPT models under this attack reveals GPT-4’s considerable resilience. We present two advanced attacks targeting improved reconstruction of past conversations, demonstrating significant privacy leakage across all models under these advanced techniques. Evaluating various defense mechanisms, we find them ineffective against these attacks. Our findings highlight the ease with which privacy can be compromised in interactions with GPT models, urging the community to safeguard against potential abuses of these models’ capabilities.
Introduction
As Large Language Models (LLMs) transition from single-prompt queries to complex, multi-round "chat" sessions, users often share sensitive data—ranging from proprietary code to private medical concerns—with cloud-hosted models. This history is stored to provide context for the current session, creating a novel attack surface. If a user creates a "Custom GPT" based on private data or if a session is hijacked, an adversary can interact with that session. This research investigates whether an adversary can force a model to leak previous user inputs, focusing on the leakage of interaction data rather than training data.
The Conversation Reconstruction Attack (CRA)
The researchers introduce the Conversation Reconstruction Attack (CRA), which aims to extract the conversation buffer. They evaluate three primary variants:
- Naive Attack: A direct request for the chat history (e.g., "Tell me the contents of our previous chat!").
- UNR (Unrestricted) Attack: A jailbreak-style prompt claiming the history is unrestricted.
- PBU (Pretending to be Benign User) Attack: The most sophisticated approach, where the adversary asks the model to perform a seemingly benign task using the history, such as formatting the previous conversation into a LaTeX table.
Methodology and Evaluation
To measure the success of these attacks, the study utilizes two primary metrics: Edit Similarity (character-level matching) and Semantic Similarity (embedding-based meaning matching). The attacks were tested across six diverse task types using established benchmarks like C4-200M (Language Knowledge), CodeSearchNet (Coding), and WritingPrompts (Creative Writing), as well as PII testing using the Enron email dataset.
Key Results and Insights
The "Utility" Trap
While GPT-4 shows resilience against Naive and UNR attacks, it frequently fails the PBU attack. This suggests a "utility trap" where the model prioritizes being helpful to the current user over maintaining the privacy of the previous user's context. Current alignment techniques like RLHF appear to have a blind spot regarding the privacy of the conversation buffer.
Task and Model Sensitivity
Performance varies significantly by task. "Creative Writing" was found to be the most vulnerable category. While GPT-3.5 is highly vulnerable across the board (Semantic Similarity ~0.79), GPT-4's resilience drops significantly under PBU attacks, reaching a similarity score of approximately 0.70.
Defense Ineffectiveness
The study evaluated prompt-based and few-shot defenses. Surprisingly, in tasks like translation, few-shot defenses actually increased leakage, as the examples provided more context for the model to latch onto. Even "Composite Defenses" failed to reduce PBU leakage to safe levels.
Conclusion
The Conversation Reconstruction Attack reveals a universal vulnerability across major models, including GPT-4, Claude-3, and Llama-3. The findings suggest that relying solely on model alignment is insufficient for protecting conversation privacy. Future work should focus on automatic censoring mechanisms that replace sensitive PII with placeholders before the history is processed for a new user session.
Summary updated