Unlocking Memorization in Large Language Models with Dynamic Soft Prompting

Zhepeng Wang, Runxue Bao, Yawen Wu, Jackson Taylor, Cao Xiao +4 more
9/20/2024
cs.CLcs.AIcs.CR

No confident code implementation found for this paper. 4 possible matches can be shown below.

Abstract

Pretrained large language models (LLMs) have revolutionized natural language processing (NLP) tasks such as summarization, question answering, and translation. However, LLMs pose significant security risks due to their tendency to memorize training data, leading to potential privacy breaches and copyright infringement. Accurate measurement of this memorization is essential to evaluate and mitigate these potential risks. However, previous attempts to characterize memorization are constrained by either using prefixes only or by prepending a constant soft prompt to the prefixes, which cannot react to changes in input. To address this challenge, we propose a novel method for estimating LLM memorization using dynamic, prefix-dependent soft prompts. Our approach involves training a transformer-based generator to produce soft prompts that adapt to changes in input, thereby enabling more accurate extraction of memorized data. Our method not only addresses the limitations of previous methods but also demonstrates superior performance in diverse experimental settings compared to state-of-the-art techniques. In particular, our method can achieve the maximum relative improvement of 112.75% and 32.26% over the vanilla baseline in terms of discoverable memorization rate for the text generation task and code generation task respectively.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 4 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{wang2024unlocking,
  title  = {Unlocking Memorization in Large Language Models with Dynamic Soft Prompting},
  author = {Zhepeng Wang and Runxue Bao and Yawen Wu and Jackson Taylor and Cao Xiao and Feng Zheng and Weiwen Jiang and Shangqian Gao and Yanfu Zhang},
  year   = {2024},
  eprint = {2409.13853},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2409.13853v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2409.13853.svg)](https://codeofpaper.com/paper/2409.13853)

Discussion