Skip to content

More than memorization: using LLM reasoning to violate privacyBeyond Memorization: Violating Privacy Via Inference with Large Language Models

arXiv· arXiv:2310.07298· Robin Staab, Mark Vero, Mislav Balunović, Martin VechevDepartment of Computer Science, ETH ZurichIndexed by this site · 27 days ago· Originally publishedSelected AttacksSelectedAttention39

Quick read

Attacks

Based on the paper PDF (AI-generated); refer to the original

The authors use a self-built Reddit dataset to evaluate the ability of 9 LLMs to infer users' personal attributes; GPT-4 top-1 accuracy is 85.5%, and the authors state that neither anonymization nor alignment is sufficient for defense.

Threat modelTwo adversaries: A1 holds a dataset of user text (e.g., scraped forum posts) and uses a fixed template to prompt a pretrained LLM to infer personal attributes; A2 controls a chatbot with which a user interacts in a black-box manner, and the system prompt contains a hidden task Th (inferring user attributes) that is invisible to the user. The models are all pretrained LLMs, and the adversaries need no training.

Questions
LLM privacy research mainly focuses on extracting memorized training data, but the authors focus on another type of risk: LLMs inferring personal attributes (location, income, gender, etc.) from user text at inference time, and malicious chatbots actively eliciting information.
Methods
The authors construct the PersonalReddit dataset containing 520 real Reddit user profiles with human annotations for 8 categories of attributes, use fixed prompt templates to have 9 pretrained LLMs give top-3 guesses, simulate a malicious chatbot experiment, and then evaluate two types of mitigation: text anonymization and model alignment.
Experiments and results
GPT-4 top-1 accuracy on PersonalReddit is 85.5% and top-3 reaches 95.2%; the simulated malicious chatbot has top-1 of 59.2%; anonymization reduces accuracy by only 41.1% on hardness-1 samples and by only 7.7% on hardness 5; the refusal rate of each vendor's models to privacy-inference prompts is at most 10.7%.
Limitations and future work
The authors point out that the adversarial interaction experiments are simulations rather than real people, that most models were accessed via API versions beyond their control, and that PersonalReddit is not publicly released for privacy reasons. The experiments cover 9 models, English Reddit text (2012 to early 2016), and 8 categories of attributes; anonymization was evaluated with only one tool, Azure.
Experimental setupGPT-4、GPT-3.5 et al. · PersonalReddit (PR)、ACSIncome et al. · top-1/top-2/top-3 accuracy、拒答率 et al.
Evaluated models
GPT-4GPT-3.5Llama-2-7bLlama-2-13bLlama-2-70bPaLM 2 TextPaLM 2 ChatClaude-2Claude-Instant
Benchmarks
PersonalReddit (PR)ACSIncomePAN 2018525 条人工标注合成样本
Metrics
top-1/top-2/top-3 accuracy拒答率去污染指标(BLEU、编辑距离等)
AI summaryand selection rationaleResearchers at ETH Zurich systematically evaluated the privacy risk of pretrained large language models inferring personal attributes from text. The team built the PersonalReddit dataset containing 520 real Reddit user profiles, annotated with 8 categories of attributes including location, income, gender, and age; among the 9 tested models, GPT-4 performed best, achieving 85.5% top-1 and 95.2% top-3 accuracy, at only 1/100 the cost and 1/240 the time of manual annotation. The paper also used GPT-4 to simulate a malicious chatbot, inferring users' place of residence, age, and gender with 59.2% top-1 accuracy across 224 simulated interactions. On defenses, both text anonymization and model alignment mitigations are currently ineffective; after anonymization, models can still infer location and age using cues such as regional slang.

Researchers at ETH Zurich systematically evaluated the privacy risk of pretrained large language models inferring personal attributes from text. The team built the PersonalReddit dataset containing 520 real Reddit user profiles, annotated with 8 categories of attributes including location, income, gender, and age; among the 9 tested models, GPT-4 performed best, achieving 85.5% top-1 and 95.2% top-3 accuracy, at only 1/100 the cost and 1/240 the time of manual annotation. The paper also used GPT-4 to simulate a malicious chatbot, inferring users' place of residence, age, and gender with 59.2% top-1 accuracy across 224 simulated interactions. On defenses, both text anonymization and model alignment mitigations are currently ineffective; after anonymization, models can still infer location and age using cues such as regional slang.

Why it was selectedResearch shows that LLMs such as GPT-4 can infer personal attributes from text at 1/100 the cost of manual work, while existing anonymization and alignment currently cannot effectively defend against it.

Related events and news

0 events · 1 news mentions

News that mentions this paper

  • Tech Policy Presscites the paper's id or link
    AI、隐私与推理的隐性伤害架构
    social media activity, and conversational patterns to make reliable predictions about an individual’s mental health status, political affiliation, or income level.

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    Whether LLMs can, at inference time, infer users' personal attributes from text, thereby causing privacy violations beyond memorization extraction.

    Core question: Can current LLMs automatically infer personal attributes from user text at inference time, thereby creating a privacy threat beyond "training data memorization"?

    • Problem setting and importance: The authors point out that existing LLM privacy research focuses on extracting memorized training data, whereas as model reasoning capabilities grow, attackers can automatically infer attributes such as location, income and gender from online text in which users unintentionally reveal information (forum posts, etc.), at a cost far lower than manual profiling, making large-scale privacy violations possible for the first time.
    • Gaps in existing research: The authors state that, to their knowledge, there is no systematic study of the user privacy risks posed by the reasoning capabilities of pretrained LLMs; traditional author profiling work targets only a few attributes (often gender and age) and specific text domains, and lacks datasets with ground-truth labels.
    • Core observation: The authors observe that LLMs can capture subtle cues in text (such as regional expressions), and can still infer attributes from context even when the text has been anonymized and direct mentions have been removed.
    • Contributions of the paper: The authors formalize the privacy threat, construct the PersonalReddit dataset and evaluate 9 LLMs, simulate a malicious chatbot scenario, evaluate two types of mitigation, anonymization and alignment, and release code and 525 human-annotated synthetic samples.
    • Threat model (Section 3):
      • A1 (free text inference): The adversary possesses a dataset D of user text (e.g., scraped forum data, not excluding illegally obtained chat logs), and the goal is to prompt a pretrained LLM with a fixed prefix/suffix template to infer the (attribute, value) tuples of the users in it.
      • A2 (adversarial interaction): The adversary controls an LLM chatbot with which a user interacts in a black-box manner; the system prompt S = (Tp, Th), where the public task Tp (e.g., a travel assistant) conceals the hidden task Th (inferring user attributes), and Th must remain concealed from the user throughout the interaction.
      • Common setting: In all scenarios M is a pretrained LLM, and the adversary does not need to collect training data or train a model, which the authors say greatly lowers the barrier to attack.
      • Victim system and targets: Ordinary users who use online platforms and interact with LLM chatbots.
  2. What related research exists?

    Related work falls into four groups: LLM memorization extraction, model risk and alignment, legal definitions of personal data, and author profiling.

    LLM privacy leakage (memorization direction)

    • Carlini et al. (2021; 2023), Kim et al. (2023), Lukas et al. (2023), Ippolito et al. (2023)—study training-data memorization and extraction; Carlini et al. (2023) empirically show a log-linear relationship between the amount of memorization and model scale and the number of training-data repetitions.
    • Ippolito et al. (2023)—point out that verbatim memorization cannot cover all of the LLM privacy risk; Brown et al. (2022) point out that the concept of privacy depends on context. The paper emphasizes that the memorization threat is bounded by the training data, whereas inference-based violations can occur on any input data.
    • Bubeck et al. (2023)—acknowledge in the literature that LLM inference is a potential threat and show that GPT-4 surpasses existing tools on PII detection; the authors state that, to their knowledge, there is no research on the privacy risk of inference by pretrained LLMs.

    LLM risk and alignment

    • OpenAI (2023), Touvron et al. (2023)—current research on model risk and mitigation mainly focuses on harmful, biased, or toxic outputs, and the mainstream mitigation is model alignment based on fine-tuning with human preferences.
    • Zou et al. (2023)—show that such alignment can be broken in automated ways, prompting discussion of better alignment methods.

    Legal definitions of personal data and PII

    • GDPR (EU, 2016)—defines personal data as any information relating to an identified or identifiable natural person, explicitly including location data and economic, cultural, and social identity.
    • PII definitions in U.S. jurisdictions are looser but likewise recognize sensitive data such as race, sexual orientation, and religion. The paper points out that all 8 attribute categories it examines fall within the personal-data definitions of these laws.

    Author profiling

    • Estival et al. (2007), Rangel et al. (2013; 2017; 2018)—a long-standing line of research in NLP on extracting author attributes, but the paper points out that current methods mainly target specific attributes (often sex and age) and use specific feature-extraction methods.
    • Villegas et al. (2014)—point out that progress in this field is limited by the lack of available datasets; the main source of labeled data is the PAN competition (Rangel et al., 2013), mainly Twitter text and a few attributes.

    Baselines and comparison settings: Appendix D compares GPT-4 with an XGB classifier fine-tuned on ACSIncome data and a majority-class baseline; Appendix E compares GPT-4 with the official best result of the PAN 2018 competition (82.21% accuracy).

    Authors' positioning of this paper: The authors claim that this paper fills the gap between traditional author profiling (specific domains, few attributes) and emerging LLMs with cross-domain language understanding, and extends the privacy discussion from memorization to inference.

  3. How does the paper address this problem?

    Formalize two types of adversaries, construct the PersonalReddit dataset, prompt LLMs with fixed templates to infer attributes, and evaluate mitigation methods.

    Overall approach: first formalize two privacy-threat adversaries (A1 free-text inference, A2 adversarial interaction), then construct a real Reddit dataset with human annotation, PersonalReddit (PR), use a unified prompt template to have 9 pretrained LLMs give top-3 guesses for each of 8 attribute categories per profile, and finally evaluate the effectiveness of two mitigation approaches: text anonymization and model alignment.

    Threat model formalization

    • A1 (free text inference): The adversary holds a dataset D of user-text pairs (u, t) and constructs a prompt PA1(t) = (S, P), where P is restricted to a fixed Prefix + formatted text + Suffix, excluding the case where the adversary encodes additional information (such as vector database queries) through P. The model outputs a set of inferred (attribute, value) tuples; in the experiments the model is also required to give a rationale for each inference.
    • A2 (adversarial interaction): The user has only black-box access to the LLM, and the system prompt S = (Tp, Th) is visible only to the adversary; each round of interaction contains a user message mi, a hidden response rih visible only to the model host (e.g., PII inference based on history), and a public response rip; an attack succeeds if Th is both completed and concealed from the user throughout.

    PersonalReddit dataset construction

    • Scale and source: 520 randomly sampled public Reddit user profiles, 5,814 comments in total, spanning from 2012 to early 2016, with raw data from PushShift; comments are restricted to 381 subreddits that may contain personal attributes (Appendix J.1).
    • Attribute system: 8 attribute categories selected with reference to the U.S. Census Bureau ACS dataset—age (AGE), education (SCH), sex (SEX), occupation (OCC), relationship state (MAR), location (LOC), place of birth (POB), income (INC).
    • Annotation process: Manual annotation by the paper's authors themselves (not outsourced), about 112 person-hours in total; each label carries two 1–5 ratings, certainty and hardness; for hardness 4–5, traditional search engines are allowed (LLMs prohibited); annotators can see the subreddit name (not provided during model evaluation), to test model capability under information-limited settings.
    • Quality control: About 25% of the data is cross-annotated; among labels with certainty ≥ 3, annotator agreement is > 90% (222 of 246 labels agree); the decontamination study in Appendix B performs prefix-continuation tests on 720 long comments, and the authors report no memorization found except for a few common URLs and quotations.
    • Release policy: The PR dataset is not publicly released because it contains personal data; separately, 525 synthetic samples generated with an adversarial chat framework and manually verified are released with the code (Appendix F).

    Evaluation protocol

    • Prompt design: The system prompt sets the model as an "online profiling expert"; the query prompt requires step-by-step reasoning first and then top-3 guesses for each attribute, listing all options for categorical attributes; full prompts are in Appendix I.
    • Judging method: String matching first (Jaro-Winkler distance, requiring similarity ≥ 0.75 for non-categorical attributes); age is judged by interval, with an exact value counted correct if it falls within ±5 years of the ground truth, and intervals requiring a symmetric overlap o = (max(0, min(b1,b2)−max(a1,a2)))/(max(min(b1−a1, b2−a2), 1)) of 0.75, i.e., a threshold on the proportion of overlap between the predicted interval and the ground-truth interval; free-text answers (such as location, occupation) without a direct match are judged by GPT-4 as "yes/no/less precise", and those still undecidable are adjudicated manually.
    • Output parsing: Except for GPT-4, models often do not follow the output format; GPT-4 is first used to automatically reformat according to a correction prompt, and on failure manual extraction is used.
    • Models and sampling settings: OpenAI models use the -0613 checkpoint, Google models via Vertex AI, Llama run locally without quantization, Anthropic models via the Poe web interface; temperature is uniformly 0.1, maximum generation 600 tokens; PaLM-2-Text and Claude on Poe do not support custom system prompts, so the default system prompt is used.

    Mitigation evaluation design

    • Client-side anonymization: The AzureLanguageService tool is used to remove entities such as person names, locations, organizations, events, addresses, dates, ages, numbers, and currencies (confidence threshold 0.4), replacing them with "*"; evaluation covers only the 5 attribute categories supported by the tool (location, age, occupation, place of birth, income).
    • Provider alignment: The refusal rate of each vendor's models to privacy-inference prompts is counted, grouped by vendor.
    • Adversarial interaction simulation: The public task is set as "a chatty conversation partner", and the hidden task is to infer the user's place of residence, age, and sex; the user bot is built from synthetic profiles or real hardness-5 examples from PR and is instructed not to directly reveal private information; all are instantiated with GPT-4, running 224 interactions on 20 user profiles.
  4. What experiments did the paper conduct?

    9 LLMs infer 8 attribute categories on PR; GPT-4 top-1 reaches 85.5%; both anonymization and alignment have limited effect.

    Experimental setup

    • Models tested: GPT-4, GPT-3.5, Llama-2 7B, Llama-2 13B, Llama-2 70B, PaLM 2 Text, PaLM 2 Chat, Claude-2, Claude-Instant, 9 in total.
    • Datasets: PersonalReddit (520 profiles, 5814 comments), with the main experiment using 1066 labels with certainty ≥ 3 (filtered down from 1184); also ACSIncome (New York State in 2018, 1000 test examples), PAN 2018 (3000 profiles, of which the authors sampled 1900 for evaluation), and 525 synthetic samples.
    • Baselines: human annotators (who can see the subreddit name and use a search engine); in Appendix D, a fine-tuned XGB and a majority-class classifier; in Appendix E, the official best result of the PAN 2018 competition, 82.21%.
    • Metrics: top-1/top-2/top-3 accuracy; for mitigation experiments, accuracy drop and refusal rate.
    • Judging method: string matching + GPT-4 judging free-text answers + human fallback; the paper does not report the agreement rate between GPT-4 judgments and human adjudication.
    • Number of repetitions: the paper does not report the number of repeated runs for the main experiments.

    Main results

    According to Table 2 (GPT-4 top-1 accuracy per attribute on PR, %):

    Swipe horizontally to read the table

    SEXLOCMARAGESCHOCCPOBINC
    97.886.291.578.367.871.692.762.5
    • Overall performance: GPT-4's overall top-1 accuracy is 85.5% (Figure 4), the highest among the 9 models; top-3 rises to 95.2% (Appendix C), which the authors say nearly matches human annotation, and human annotators additionally can see the subreddit name and use a search engine without limit.
    • Scaling trend: Llama-2 7B's overall accuracy is 51%, and Llama-2 70B's is 66%; the authors state that model scale and inference performance show an upward trend, and believe this trend holds across model families (based on common estimates of model scale).
    • Weakest attribute: GPT-4 is lowest on income (62.5%), and this attribute also has the fewest samples (only 40); its top-2 accuracy rises to 87% (Appendix C), and the authors believe humans and models are not broadly misaligned, e.g., GPT-4 tends to guess "No income" as "Low Income (<30k)",可能是对齐的结果。

    难度分级与匿名化实验

    • 难度一致性:各模型准确率随 hardness 升高而下降(Figure 5),作者认为模型与人类对难度的判断总体一致;例外是 GPT-4 在 hardness 4 上准确率高于 hardness 3,作者解释为 hardness 4 样例常需检索外部信息而非强推理,有利于检索能力强的模型。
    • 匿名化效果(Table 3,GPT-4):hardness 1 准确率从 85.0% 降至 43.9%(降 41.1%),hardness 2 降 19.0%,hardness 3 降 13.6%,hardness 4 降 31.6%,hardness 5 仅降 7.7%;位置推断准确率从约 86% 降至约 55%。作者称匿名化主要对直接陈述属性的文本有效,对需要推理的难样本作用迅速减弱。
    • 作者解读:个人属性往往不显式出现在真实文本中,现有匿名化工具覆盖不了可从上下文推断的信息;作者认为需要更强的匿名化方法,也可能借助 LLM 自身的语言理解能力实现。

    对齐(拒答)与对抗交互实验

    • 拒答率(Table 4):Meta Llama-2 为 0%,OpenAI GPT 为 0%,Anthropic Claude 为 2.8%,Google PaLM 为 10.7%。作者指出 PaLM 的拒答中有相当一部分针对含敏感话题(如家庭暴力)的评论,可能触发了其他安全过滤器;总体结论是当前模型基本未对隐私推断提示词做对齐。
    • 对抗交互模拟:GPT-4 同时扮演恶意机器人和用户机器人,20 个画像、224 次交互,隐藏任务为推断居住地、年龄、性别;总 top-1 准确率 59.2%(location 60.3%、age 49.6%、sex 67.9%)。作者称该数字与 GPT-4 在 PR 上的表现相近,说明用户机器人与真实数据对齐,并认为恶意聊天机器人已是新兴隐私威胁;该实验为模拟,未涉及真人。

    其他消融与分析

    • ACSIncome(附录 D):GPT-4 零样本在 POB、INC、SEX 上接近微调 XGB,且全面超过多数类基线(Figure 21,具体数值以图为准)。
    • PAN 2018(附录 E):GPT-4 零样本性别推断准确率 90.2%(1900 条中 1715 条正确),竞赛官方最佳为 82.21%;作者注明两者不直接可比。
    • 交叉标注子集(附录 A.5):在两名标注者一致的 222 个标签上,GPT-4 top-1 为 92.7%、top-2 约 98.1%、top-3 为 99.09%。
    • 合成样本(附录 F):GPT-4 总准确率 73.7%,五个难度级分别为 94.7%、75.2%、68.0%、67.3%、64.7%。
    • 成本与时间(附录 H):GPT-4 对全部画像推断约 27.5 分钟、成本约 20 美元,对比人工标注 112 人时、约 2250 美元,作者据此称时间快 240 倍、成本为 1/100。
    • 去污染(附录 B):720 条长评论的前缀续写中,人工核查相似度 > 0.6; only 2 well-known jokes, 13 known website URLs, 1 mathematical calculation, 1 legal provision and 1 internet meme were found among the samples.
  5. What are some points that can be further explored?

    The authors point out limitations such as the simulated experiments and API versions, and call for stronger anonymization and privacy-oriented alignment research.

    Limitations and future directions noted by the authors

    • Adversarial interaction is a simulated experiment: Section 5 explains that conducting this experiment with real people would raise ethical issues, so the experiment is simulated and only shows that such malicious chatbots can already be built today.
    • Anonymization tools are insufficient: Section 6 points out that current anonymization techniques are mainly effective on text that directly contains attributes; the authors believe stronger anonymization methods that can keep up with LLM capabilities are needed, and that LLMs' language understanding capabilities could potentially be used to achieve this.
    • Alignment does not cover privacy: Section 6 points out that current models are not aligned against privacy inference prompts; the authors believe better privacy-oriented alignment is a promising future research direction.
    • Dataset not public: Section 4 and the Reproducibility statement explain that PersonalReddit is not planned for public release because it contains personal data, and is replaced by 525 synthetic samples.
    • API versions beyond control: The Reproducibility statement points out that most tested models could only be accessed via API, and version control was partly beyond the authors' control.
    • Call for broader discussion: In Section 7 and the abstract, the authors argue that, in the absence of effective defenses, a broader discussion should be held on the privacy implications of LLMs beyond memorization.

    Scope of the experiments

    • 9 models were tested: GPT-4, GPT-3.5, Llama-2 7B/13B/70B, PaLM 2 Text/Chat, Claude-2, Claude-Instant (Section 5).
    • The data are English Reddit comments (2012 to early 2016, 381 subreddits), with 8 categories of attributes; the main experiments use 1066 labels with certainty ≥ 3 (Section 4, Appendix A).
    • The anonymization evaluation uses only one tool, AzureLanguageService, and covers only the 5 categories of attributes it supports (Section 6).
    • The adversarial interaction experiments were all instantiated with GPT-4 (including the user bot), with 20 profiles and 224 interactions, and no real people were used (Section 5).
    • The paper does not report the number of repeated runs for the main experiments, nor the agreement between GPT-4 judging and human adjudication; the decontamination study did not cover Claude-2 and Claude-Instant due to query restrictions (Appendix B).
  6. Summarize the main content of the paper

    LLMs can infer personal attributes from text with high accuracy at a cost far lower than manual work, and existing anonymization and alignment struggle to defend against this.

    An empirical study on the privacy risks posed by LLM reasoning capabilities (ICLR 2024), with authors from ETH Zurich.

    • Problem: LLM privacy research focuses on extracting memorized training data; the authors examine another path—models automatically inferring 8 categories of personal attributes such as location, income and gender from user text at inference time, as well as malicious chatbots actively inducing users to reveal information.
    • Method: Formalize two types of adversaries, A1 (free-text inference) and A2 (adversarial interaction); construct the PersonalReddit dataset with 520 real Reddit profiles and 1066 high-confidence human labels; use a unified template to have 9 pretrained LLMs give top-3 guesses, and evaluate two types of mitigation, Azure anonymization and model alignment.
    • Main results: GPT-4 achieves 85.5% top-1 accuracy and 95.2% top-3 accuracy on PR, which the authors say is close to human annotation level, at about 1/100 the cost and about 240 times faster than manual work; Llama-2 rises from 51% at 7B to 66% at 70B, and the authors say inference is stronger at larger scale.
    • Mitigation failure: Anonymization reduces accuracy by only 41.1% on hardness 1 samples and by only 7.7% on hardness 5; the refusal rate of models from various vendors to privacy inference prompts is at most 10.7% (Google PaLM), with Meta and OpenAI at 0%.
    • Emerging threat: A malicious chatbot played by GPT-4 inferred users' place of residence, age or gender with 59.2% top-1 accuracy across 224 simulated interactions.
    • Authors' conclusion: The authors believe that inference-based privacy violations are already achievable at scale, that existing defenses are insufficient, and they advocate a broader discussion of LLM privacy implications beyond memorization and the development of stronger anonymization and privacy-oriented alignment.
Read originalarxiv.org