The Unreasonable Ineffectiveness of Nucleus Sampling on Mitigating Text Memorization

Fuente: arXiv
Guardado en:
Detalles Bibliográficos
Autores principales: Borec, Luka, Sadler, Philipp, Schlangen, David
Formato: Preprint
Publicado: 2024
Materias:
Acceso en línea:
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
_version_ 1866929478523944960
author Borec, Luka
Sadler, Philipp
Schlangen, David
author_facet Borec, Luka
Sadler, Philipp
Schlangen, David
contents This work analyses the text memorization behavior of large language models (LLMs) when subjected to nucleus sampling. Stochastic decoding methods like nucleus sampling are typically applied to overcome issues such as monotonous and repetitive text generation, which are often observed with maximization-based decoding techniques. We hypothesize that nucleus sampling might also reduce the occurrence of memorization patterns, because it could lead to the selection of tokens outside the memorized sequence. To test this hypothesis we create a diagnostic dataset with a known distribution of duplicates that gives us some control over the likelihood of memorization of certain parts of the training data. Our analysis of two GPT-Neo models fine-tuned on this dataset interestingly shows that (i) an increase of the nucleus size reduces memorization only modestly, and (ii) even when models do not engage in "hard" memorization -- a verbatim reproduction of training samples -- they may still display "soft" memorization whereby they generate outputs that echo the training data but without a complete one-by-one resemblance.
format Preprint
id arxiv_https___arxiv_org_abs_2408_16345
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle The Unreasonable Ineffectiveness of Nucleus Sampling on Mitigating Text Memorization
Borec, Luka
Sadler, Philipp
Schlangen, David
Computation and Language
This work analyses the text memorization behavior of large language models (LLMs) when subjected to nucleus sampling. Stochastic decoding methods like nucleus sampling are typically applied to overcome issues such as monotonous and repetitive text generation, which are often observed with maximization-based decoding techniques. We hypothesize that nucleus sampling might also reduce the occurrence of memorization patterns, because it could lead to the selection of tokens outside the memorized sequence. To test this hypothesis we create a diagnostic dataset with a known distribution of duplicates that gives us some control over the likelihood of memorization of certain parts of the training data. Our analysis of two GPT-Neo models fine-tuned on this dataset interestingly shows that (i) an increase of the nucleus size reduces memorization only modestly, and (ii) even when models do not engage in "hard" memorization -- a verbatim reproduction of training samples -- they may still display "soft" memorization whereby they generate outputs that echo the training data but without a complete one-by-one resemblance.
title The Unreasonable Ineffectiveness of Nucleus Sampling on Mitigating Text Memorization
topic Computation and Language
url https://arxiv.org/abs/2408.16345