SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1903.06059 · 2019

Stochastic Beams and Where to Find Them: The Gumbel-Top-k Trick for Sampling Sequences Without Replacement

arXiv · PDF · Open in the Atlas

Code that ran

14 of 17 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; 2 honoured the contract we drafted, 1 violated it and 9 have no contract verdict; 2 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/1903.06059.json · badge: /api/ran/1903.06059.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
manueldeprada/decoders community (classifier label)
classifier basis not recorded on the link
9 ran · 1 no recorded run
evanthebouncy/stoicastic_beam reimplementation (classifier label)
classifier basis: classifier_2025
5 ran · 2 no recorded run
FunctionStatusWhere it lives
compute_logprobs_from_scores Ran
ran on a synthesized input
manueldeprada/decoders/src/decoders/toolbox.py
pointer only (licence: Apache-2.0) · get_code("5318e71a079395fc")
How it ran

The body of this sample is withheld: Apache-2.0, as GitHub detects it on this paper's repository, manueldeprada/decoders, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with it. 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.

compute_transition_scores_nonbeam Ran
ran on a synthesized input
manueldeprada/decoders/src/decoders/toolbox.py
pointer only (licence: Apache-2.0) · get_code("887fa7fd3a8a0e90")
How it ran

The body of this sample is withheld: Apache-2.0, as GitHub detects it on this paper's repository, manueldeprada/decoders, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with it. 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.

compute_true_logprobs Ran
ran on a synthesized input
manueldeprada/decoders/src/decoders/toolbox.py
pointer only (licence: Apache-2.0) · get_code("a42599a4d43260f4")
How it ran

The body of this sample is withheld: Apache-2.0, as GitHub detects it on this paper's repository, manueldeprada/decoders, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with it. 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.

decimal_to_bin_vec Ran
ran on a synthesized input
manueldeprada/decoders/src/decoders/binary_transformer.py
pointer only (licence: Apache-2.0) · get_code("5a227174a2c67965")
How it ran

The body of this sample is withheld: Apache-2.0, as GitHub detects it on this paper's repository, manueldeprada/decoders, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with it. 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.

drop_blocks Ran
ran, violated the contract we drafted
evanthebouncy/stoicastic_beam/env.py
pointer only (licence: NONE) · get_code("8409b65e19e7556b")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, evanthebouncy/stoicastic_beam 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.

f_experiment Ran
ran on a synthesized input
manueldeprada/decoders/src/decoders/small_prob_transformer.py
pointer only (licence: Apache-2.0) · get_code("cb389fa56b7724b7")
How it ran

The body of this sample is withheld: Apache-2.0, as GitHub detects it on this paper's repository, manueldeprada/decoders, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with it. 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.

get_bigram Ran
ran; our contract draft was wrong, not the code
evanthebouncy/stoicastic_beam/policy.py
pointer only (licence: NONE) · get_code("698bb1dd63143c23")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, evanthebouncy/stoicastic_beam 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.

get_binary_completions Ran
ran on a synthesized input
manueldeprada/decoders/src/decoders/binary_transformer.py
pointer only (licence: Apache-2.0) · get_code("42dff7fcdf075def")
How it ran

The body of this sample is withheld: Apache-2.0, as GitHub detects it on this paper's repository, manueldeprada/decoders, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with it. 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.

get_spec Ran
ran, honoured the contract we drafted
evanthebouncy/stoicastic_beam/env.py
pointer only (licence: NONE) · get_code("c27e7c7d0429cf3a")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, evanthebouncy/stoicastic_beam 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.

pad_tensors Ran
ran on a synthesized input
manueldeprada/decoders/src/decoders/simple/simple_beam_utils.py
pointer only (licence: Apache-2.0) · get_code("e2f7ccfbe5b7cadd")
How it ran

The body of this sample is withheld: Apache-2.0, as GitHub detects it on this paper's repository, manueldeprada/decoders, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with it. 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.

random_rollout Ran
ran, honoured the contract we drafted
evanthebouncy/stoicastic_beam/inference.py
pointer only (licence: NONE) · get_code("e7f3eac1d9074f71")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, evanthebouncy/stoicastic_beam 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.

route2length Ran
ran on a synthesized input
manueldeprada/decoders/src/decoders/small_prob_transformer.py
pointer only (licence: Apache-2.0) · get_code("14699971d77c31de")
How it ran

The body of this sample is withheld: Apache-2.0, as GitHub detects it on this paper's repository, manueldeprada/decoders, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with it. 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.

sample_program Ran
ran; our contract draft was wrong, not the code
evanthebouncy/stoicastic_beam/env.py
pointer only (licence: NONE) · get_code("48fbdb9b7b3a7e1a")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, evanthebouncy/stoicastic_beam 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.

stack_model_outputs Ran
ran on a synthesized input
manueldeprada/decoders/src/decoders/strategies/beam_decoder.py
pointer only (licence: Apache-2.0) · get_code("2644babce129f019")
How it ran

The body of this sample is withheld: Apache-2.0, as GitHub detects it on this paper's repository, manueldeprada/decoders, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with it. 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_bin_vec_to_decimal Not yet run
unverified (harvested, no recorded run)
manueldeprada/decoders/src/decoders/binary_transformer.py
pointer only (licence: Apache-2.0) · get_code("7d28841f30ab263f")
How it ran

The body of this sample is withheld: Apache-2.0, as GitHub detects it on this paper's repository, manueldeprada/decoders, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with it. 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.

beam_k Not yet run
unverified (harvested, no recorded run)
evanthebouncy/stoicastic_beam/inference.py
pointer only (licence: NONE) · get_code("382342955f67f3f5")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, evanthebouncy/stoicastic_beam 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.

random_rollout_k Not yet run
unverified (harvested, no recorded run)
evanthebouncy/stoicastic_beam/inference.py
pointer only (licence: NONE) · get_code("f7417c6b895e0503")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, evanthebouncy/stoicastic_beam 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 17 samples lifted from this paper's linked repositories, 17 carry a function identity and 0 do not. Of the 17 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 17 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.

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

The well-known Gumbel-Max trick for sampling from a categorical distribution can be extended to sample $k$ elements without replacement. We show how to implicitly apply this 'Gumbel-Top-$k$' trick on a factorized distribution over sequences, allowing to draw exact samples without replacement using a Stochastic Beam Search. Even for exponentially large domains, the number of model evaluations grows only linear in $k$ and the maximum sampled sequence length. The algorithm creates a theoretical connection between sampling and (deterministic) beam search and can be used as a principled intermediate alternative. In a translation task, the proposed method compares favourably against alternatives to obtain diverse yet good quality translations. We show that sequences sampled without replacement can be used to construct low-variance estimators for expected sentence-level BLEU score and model entropy.

For agents

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

get_harvested_code_for_paper("1903.06059")
get_code_for_paper("1903.06059")
have("1903.06059")

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

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

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

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

Connect an agent — have() is free.