SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2408.16345 · 2024

The Unreasonable Ineffectiveness of Nucleus Sampling on Mitigating Text Memorization

arXiv · PDF · Open in the Atlas

Code that ran

8 of 11 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 2 violated it and 0 have no contract verdict; 6 failures of our instrument; 3 no recorded run), measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2408.16345.json · badge: /api/ran/2408.16345.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
lukaborec/memorization-nucleus-sampling canonical (classifier label)
classifier basis: census
8 ran · 3 no recorded run
FunctionStatusWhere it lives
attention Ran
ran; our contract draft was wrong, not the code
lukaborec/memorization-nucleus-sampling/memorization/models/transformer.py
pointer only (licence: NONE) · get_code("36da153ced354d5d")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, lukaborec/memorization-nucleus-sampling when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

check_if_memorized Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
lukaborec/memorization-nucleus-sampling/memorization/core/running_experiments.py
pointer only (licence: NONE) · get_code("e5ab7da14af15648")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, lukaborec/memorization-nucleus-sampling when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

check_if_memorized Ran
ran, violated the contract we drafted
lukaborec/memorization-nucleus-sampling/memorization/helper_scripts/check_for_coherence.py
pointer only (licence: NONE) · get_code("a39d815217b8ba86")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, lukaborec/memorization-nucleus-sampling when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

clones Ran
ran; our contract draft was wrong, not the code
lukaborec/memorization-nucleus-sampling/memorization/models/transformer.py
pointer only (licence: NONE) · get_code("89872027cb37ab15")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, lukaborec/memorization-nucleus-sampling when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

create_target_paths Ran
ran; our contract draft was wrong, not the code
lukaborec/memorization-nucleus-sampling/memorization/core/sampling.py
pointer only (licence: NONE) · get_code("991160fd10ff390f")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, lukaborec/memorization-nucleus-sampling when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

parse_json_file Ran
ran; our contract draft was wrong, not the code
lukaborec/memorization-nucleus-sampling/memorization/helper_scripts/check_for_coherence.py
pointer only (licence: NONE) · get_code("df4dab3d227aecf8")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, lukaborec/memorization-nucleus-sampling when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

run_memorization_test Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
lukaborec/memorization-nucleus-sampling/memorization/helper_scripts/check_for_coherence.py
pointer only (licence: NONE) · get_code("502b7864ccf325a7")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, lukaborec/memorization-nucleus-sampling when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

subsequent_mask Ran
ran, violated the contract we drafted
lukaborec/memorization-nucleus-sampling/memorization/models/transformer.py
pointer only (licence: NONE); the stored copy get_code serves, from fudanvi/fudanocr, is pointer only (licence: NONE) · get_code("9cd02a85b4800229")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, lukaborec/memorization-nucleus-sampling when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

batched_perplexity Not yet run
unverified (harvested, no recorded run)
lukaborec/memorization-nucleus-sampling/memorization/core/evaluate.py
pointer only (licence: NONE) · get_code("d97cfaeef6e40fef")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, lukaborec/memorization-nucleus-sampling when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

tokenize Not yet run
unverified (harvested, no recorded run)
lukaborec/memorization-nucleus-sampling/memorization/core/running_experiments.py
pointer only (licence: NONE) · get_code("23c893fd630bb704")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, lukaborec/memorization-nucleus-sampling when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

tokenize_inference Not yet run
unverified (harvested, no recorded run)
lukaborec/memorization-nucleus-sampling/memorization/core/evaluate.py
pointer only (licence: NONE) · get_code("8310944d881a6af0")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, lukaborec/memorization-nucleus-sampling when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 distinct functions with an identity, 2 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 1 later) and 9 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
clones 79 other papers
65 dated earlier, 13 later, 1 same year, order not determinable · 11 only as an assembly brick
1411.4555 (2014-11)
Show and Tell: A Neural Image Caption Generator
1612.00563 (2016-12)
Self-critical Sequence Training for Image Captioning
1706.03762 (2017-06)
Attention Is All You Need
and 76 more not named here
subsequent_mask 21 other papers
20 dated earlier, 1 same year, order not determinable
1411.4555 (2014-11)
Show and Tell: A Neural Image Caption Generator
1612.00563 (2016-12)
Self-critical Sequence Training for Image Captioning
1707.07998 (2017-07)
Bottom-Up and Top-Down Attention for Image Captioning and Visual Question Answering
and 18 more not named here

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

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.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2408.16345")
get_code_for_paper("2408.16345")
have("2408.16345")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2408.16345.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2408.16345.svg)](https://syntology.ai/paper/2408.16345)

Connect an agent — have() is free.