SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2401.05054 · 2024

Generating Diverse and High-Quality Texts by Minimum Bayes Risk Decoding

arXiv · PDF · Open in the Atlas

Code that ran

11 of 14 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; 3 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 7 failures of our instrument; 3 no recorded run), measured 2026-11-22; 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/2401.05054.json · badge: /api/ran/2401.05054.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
CyberAgentAILab/diverse-mbr canonical (classifier label)
classifier basis: census
11 ran · 3 no recorded run
FunctionStatusWhere it lives
compute_kmbr Ran
ran; our contract draft was wrong, not the code
CyberAgentAILab/diverse-mbr/mbr/policy/mbr.py
code served (permissive licence) · get_code("1c6afd70c3763799")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 1, dtype family int, shape (2,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# Define a simple score function that computes similarity between hypotheses and references
def mock_score_function(hyp, ref, src):
    """
    Mock scoring function that returns a score matrix.
    hyp: array of shape (n_samples,) - repeated hypothesis
    ref: array of shape (n_samples,) - reference samples
    src: source input (unused in this mock)
    Returns: array of scores of shape (n_samples,)
    """
    # Simple mock: return dot product-like scores
    scores = np.array([np.sum(h * r) for h in hyp for r in ref]).reshape(len(hyp), len(ref))
    return np.sum(scores, axis=1)

# Create small sample data
np.random.seed(0)
n_samples = 3
sample_dim = 4

# Generate simple numeric samples
samples = np.random.randn(n_samples, sample_dim).astype(np.float32)

# Pre-computed score matrix (3x3)
score_matrix = np.random.randn(n_samples, n_samples).astype(np.float32)

# Hypotheses (same shape as samples for consistency)
hyp = np.random.randn(n_samples, sample_dim).astype(np.float32)

# Optional weights for weighted MBR
weights = np.random.rand(n_samples).astype(np.float32)

# Source input
src = "mock_source"

# Define all arguments for compute_kmbr
ARGS = {
    "hyp": hyp,
    "compute_similatiy": mock_score_function,
    "matrix": score_matrix,
    "weights": weights,
    "src": src,
    "k": 2
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family int, shape (2,) — shape (2,) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
compute_probability_lm Ran
ran, honoured the contract we drafted
CyberAgentAILab/diverse-mbr/mbr/sample.py
code served (permissive licence) · get_code("2f471e4ae87cabfe")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 1, dtype family float, shape (2,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
import numpy as np

torch.manual_seed(0)

class MockLanguageModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 8)
    
    def compute_transition_scores(self, sequences, scores, normalize_logits=True):
        """
        Mock implementation that returns transition scores.
        sequences shape: (batch_size, seq_len)
        scores: tuple of logits per position
        Returns: (batch_size, seq_len-1) tensor of transition scores
        """
        batch_size = sequences.shape[0]
        seq_len = sequences.shape[1]
        # Return transition scores of shape (batch_size, seq_len-1)
        transition_scores = torch.randn(batch_size, seq_len - 1)
        return transition_scores

class MockOutputs:
    def __init__(self, batch_size=2, seq_len=5, vocab_size=100):
        self.sequences = torch.randint(0, vocab_size, (batch_size, seq_len))
        # scores is a tuple of tensors, one per generated token position
        self.scores = tuple(torch.randn(batch_size, vocab_size) for _ in range(seq_len - 1))

model = MockLanguageModel()
outputs = MockOutputs(batch_size=2, seq_len=5, vocab_size=100)

ARGS = {
    "model": model,
    "outputs": outputs
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (2,) — shape (2,) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
compute_score Ran
ran, honoured the contract we drafted
CyberAgentAILab/diverse-mbr/mbr/mbr_engine.py
code served (permissive licence) · get_code("c0f020db5ebab266")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import pandas as pd
import torch
import torch.nn as nn

torch.manual_seed(0)

# Create a small DataFrame with a 'text' column
df = pd.DataFrame({
    'text': ['This is hypothesis 1', 'This is hypothesis 2', 'This is hypothesis 3'],
    'id': [0, 1, 2]
})

# d_best is an index into the DataFrame
d_best = 0

# Target reference text
trg = 'This is the reference translation'

# Source text (optional)
src = 'Ceci est le texte source'

# compute_evaluate is a callable that takes (hypothesis, target, source) and returns a score
def compute_evaluate(d_hyp, trg, src):
    """Mock evaluation function that returns a score"""
    # Simple mock: return a float score based on string similarity
    score = float(len(set(d_hyp) & set(trg))) / max(len(set(d_hyp)), len(set(trg)))
    return score

ARGS = {
    'df': df,
    'd_best': d_best,
    'trg': trg,
    'compute_evaluate': compute_evaluate,
    'src': src
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pandas, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
compute_score_matrix Ran
ran; our contract draft was wrong, not the code
CyberAgentAILab/diverse-mbr/mbr/policy/mbr.py
code served (permissive licence) · get_code("f2562be9fc8bf800")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 2, dtype family float, shape (2, 2) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

def score_function(hyp, ref, src):
    """
    Stand-in score function that computes some metric.
    Takes hyp (hypothesis), ref (reference), and src (source) arrays.
    Returns a score array.
    """
    # Simple mock scoring: compute some metric across samples
    # hyp shape: (n_samples, ...), ref shape: (n_samples, ...), src: optional
    if isinstance(hyp, np.ndarray) and isinstance(ref, np.ndarray):
        # Return a score for each sample
        scores = np.mean(np.abs(hyp - ref), axis=tuple(range(1, hyp.ndim)))
        return scores
    return np.array([0.0] * len(hyp))

# Create sample data
samples = [
    np.array([1.0, 2.0, 3.0]),
    np.array([4.0, 5.0, 6.0])
]

ARGS = {
    "samples": samples,
    "score_function": score_function,
    "src_input": None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (2, 2) — shape (2, 2) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
gbfs Ran
ran, honoured the contract we drafted
CyberAgentAILab/diverse-mbr/mbr/policy/diverse_mbr.py
code served (permissive licence) · get_code("6b4c36da3fe89fd4")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 1, dtype family int, shape (5,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# Define a simple objective function that takes a binary vector
# and returns a scalar score based on the number and positions of 1s
def objective_func(node):
    """
    Simple objective: sum of weighted positions where node[i] == 1
    This encourages selecting indices with higher weights
    """
    weights = np.array([0.5, 1.5, 2.0, 3.0, 1.2], dtype=float)
    return float(np.sum(node * weights))

ARGS = {
    "func": objective_func,
    "n": 5,
    "k": 3,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family int, shape (5,) — shape (5,) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
generate_objective Ran
ran; our contract draft was wrong, not the code
CyberAgentAILab/diverse-mbr/mbr/policy/diverse_mbr.py
code served (permissive licence) · get_code("c896a215f411040c")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned function. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# Analyze the function to understand what parameters are needed:
# - k: used as divisor in calculations, should be a positive integer
# - div_pen: diversity penalty, used as multiplier
# - matrix: numpy array with shape (n, n), used with np.fill_diagonal and matrix operations

# Set up parameters
k = 3  # number of items to select
div_pen = 0.5  # diversity penalty weight

# Create a small similarity matrix (n x n)
# The function uses matrix.shape[0] to get n, and performs operations like @ X
# X should be (n, k) based on the operations: (1, n) @ (n, n) @ (n, k)
n = 4
matrix = np.array([
    [0.9, 0.7, 0.5, 0.3],
    [0.7, 0.9, 0.6, 0.4],
    [0.5, 0.6, 0.9, 0.8],
    [0.3, 0.4, 0.8, 0.9]
], dtype=np.float64)

ARGS = {
    'k': k,
    'div_pen': div_pen,
    'matrix': matrix
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_texts Ran
ran; our contract draft was wrong, not the code
CyberAgentAILab/diverse-mbr/mbr/sample.py
code served (permissive licence) · get_code("03305d741386ebfc")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# Create a minimal tokenizer with decode method
class MinimalTokenizer:
    def decode(self, token_ids, skip_special_tokens=False):
        # Simple mock: convert token ids to text
        text_map = {
            0: "hello",
            1: "world",
            2: "test",
            3: "output",
            4: "sample",
            5: "text"
        }
        words = [text_map.get(int(tid), f"token_{tid}") for tid in token_ids]
        return " ".join(words)

# Create a mock outputs object with sequences attribute
class MockOutputs:
    def __init__(self, sequences):
        self.sequences = sequences

# Create tokenizer instance
tokenizer = MinimalTokenizer()

# Create sequences tensor: shape (batch_size=2, seq_length=8)
# Each row represents a sequence of token ids
sequences = torch.tensor([
    [10, 11, 0, 1, 2, 3, 4, 5],
    [10, 11, 1, 2, 3, 4, 5, 0]
], dtype=torch.long)

# Create outputs object
outputs = MockOutputs(sequences=sequences)

# Input length is where the generated tokens start (skip first N tokens)
input_length = 2

ARGS = {
    "tokenizer": tokenizer,
    "outputs": outputs,
    "input_length": input_length
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
load_dataset Ran
ran on a synthesized input
CyberAgentAILab/diverse-mbr/mbr/utils.py
code served (permissive licence) · get_code("b10b83cb73fd5abc")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import os
import tempfile
import shutil
from collections.abc import Iterable

# Create a temporary dataset directory structure
dataset_dir = './dataset'
os.makedirs(dataset_dir, exist_ok=True)

# Create subdirectories
for subdir in ['wmt19-text', 'iwslt17-text', 'wmt21', 'xsum', 'cnn_cln']:
    os.makedirs(os.path.join(dataset_dir, subdir), exist_ok=True)

# Create sample dataset files for non-HF datasets
# WMT19 example
wmt19_path = os.path.join(dataset_dir, 'wmt19-text', 'wmt19.de-en.de')
os.makedirs(os.path.dirname(wmt19_path), exist_ok=True)
with open(wmt19_path, 'w') as f:
    f.write('Das ist ein Test.\n')
    f.write('Hallo Welt.\n')

# IWSLT17 example
iwslt17_path = os.path.join(dataset_dir, 'iwslt17-text', 'iwslt17.de-en.de')
os.makedirs(os.path.dirname(iwslt17_path), exist_ok=True)
with open(iwslt17_path, 'w') as f:
    f.write('Test Satz.\n')
    f.write('Beispiel.\n')

# WMT21 example
wmt21_path = os.path.join(dataset_dir, 'wmt21', 'wmt21.de-en.de')
os.makedirs(os.path.dirname(wmt21_path), exist_ok=True)
with open(wmt21_path, 'w') as f:
    f.write('Welt.\n')

# XSUM example
xsum_path = os.path.join(dataset_dir, 'xsum', 'test.source')
os.makedirs(os.path.dirname(xsum_path), exist_ok=True)
with open(xsum_path, 'w') as f:
    f.write('This is a long source document.\n')
    f.write('Another source.\n')

# CNNDM example
cnndm_path = os.path.join(dataset_dir, 'cnn_cln', 'test.source')
os.makedirs(os.path.dirname(cnndm_path), exist_ok=True)
with open(cnndm_path, 'w') as f:
    f.write('CNN article text.\n')

# Define ARGS with valid dataset parameter options
ARGS = {
    'dataset': 'wmt19.de-en',
    'ref': False,
    'raw_text': False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
datasets, pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
load_distance Ran
ran; our contract draft was wrong, not the code
CyberAgentAILab/diverse-mbr/mbr/utility_func.py
code served (permissive licence) · get_code("1154b95f0f185c96")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned function. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# The function takes two parameters:
# 1. sim: a string that determines behavior (checked against 'sacrebleu')
# 2. compute_similarity: a callable that takes (hyp, ref, src) and returns a list of similarity scores

# Create a mock compute_similarity function that returns similarity scores
def mock_compute_similarity(hyp, ref, src):
    # Return a list of similarity scores (floats between 0 and 1)
    return [0.8, 0.9, 0.7]

# Test case 1: sim is not 'sacrebleu'
sim_value = 'cosine'

ARGS = {
    'sim': sim_value,
    'compute_similarity': mock_compute_similarity
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
load_kwargs Ran
ran; our contract draft was wrong, not the code
CyberAgentAILab/diverse-mbr/mbr/utils.py
code served (permissive licence) · get_code("a70d1d2d5ad63795")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

# The function load_kwargs takes a single parameter: dataset (a string)
# It checks the dataset name against various conditions and returns appropriate kwargs

# Test with a simple dataset name
ARGS = {
    "dataset": "xsum"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
local_search Ran
ran; our contract draft was wrong, not the code
CyberAgentAILab/diverse-mbr/mbr/policy/diverse_mbr.py
code served (permissive licence) · get_code("08e4f8f26573b576")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 1, dtype family int, shape (6,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

def simple_objective(node):
    """
    A simple objective function that rewards having 1s in certain positions.
    Takes a binary array and returns a scalar score.
    """
    # Reward positions 0, 2, 4 having 1s
    weights = np.array([2.0, 0.5, 1.5, 0.3, 2.2, 1.0])
    return np.sum(node * weights)

# Create initial solution: binary array with some 1s
init = np.array([1, 0, 1, 0, 1, 0], dtype=int)

ARGS = {
    "func": simple_objective,
    "init": init,
    "iterations": 10,
    "neighbor": 2
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family int, shape (6,) — shape (6,) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
compute_mbr Not yet run
unverified (harvested, no recorded run)
CyberAgentAILab/diverse-mbr/mbr/policy/mbr.py
code served (permissive licence) · get_code("de665fbeba8102ec")
How it ran

no invocation recorded.

compute_probability_s2s Not yet run
unverified (harvested, no recorded run)
CyberAgentAILab/diverse-mbr/mbr/sample.py
code served (permissive licence) · get_code("4e4c9f273c11c32a")
How it ran

no invocation recorded.

load_model Not yet run
unverified (harvested, no recorded run)
CyberAgentAILab/diverse-mbr/mbr/utils.py
code served (permissive licence) · get_code("976148b6f8d28404")
How it ran

no invocation recorded.

Also present in other papers' code

Of 14 samples lifted from this paper's linked repositories, 14 carry a function identity and 0 do not. Of the 14 distinct functions with an identity, 5 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 5 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
compute_mbr 1 other paper
1 later
2404.01054 (2024-04)
Regularized Best-of-N Sampling with Minimum Bayes Risk Objective for Language Model Alignment
compute_probability_lm 1 other paper
1 later
2404.01054 (2024-04)
Regularized Best-of-N Sampling with Minimum Bayes Risk Objective for Language Model Alignment
compute_probability_s2s 1 other paper
1 later
2404.01054 (2024-04)
Regularized Best-of-N Sampling with Minimum Bayes Risk Objective for Language Model Alignment
compute_score_matrix 1 other paper
1 later
2404.01054 (2024-04)
Regularized Best-of-N Sampling with Minimum Bayes Risk Objective for Language Model Alignment
get_texts 1 other paper
1 later
2404.01054 (2024-04)
Regularized Best-of-N Sampling with Minimum Bayes Risk Objective for Language Model Alignment

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-22.

Repositories linked to this paper

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

Abstract

One of the most important challenges in text generation systems is to produce outputs that are not only correct but also diverse. Recently, Minimum Bayes-Risk (MBR) decoding has gained prominence for generating sentences of the highest quality among the decoding algorithms. However, existing algorithms proposed for generating diverse outputs are predominantly based on beam search or random sampling, thus their output quality is capped by these underlying methods. In this paper, we investigate an alternative approach -- we develop diversity-promoting decoding algorithms by enforcing diversity objectives to MBR decoding. We propose two variants of MBR, Diverse MBR (DMBR) and $k$-medoids MBR (KMBR), methods to generate a set of sentences with high quality and diversity. We evaluate DMBR and KMBR on a variety of directed text generation tasks using encoder-decoder models and a large language model with prompting. The experimental results show that the proposed method achieves a better trade-off than the diverse beam search and sampling algorithms.

For agents

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

get_harvested_code_for_paper("2401.05054")
get_code_for_paper("2401.05054")
have("2401.05054")

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

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

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

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

Connect an agent — have() is free.