SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2205.16001 · ICLR · 2022

On the Usefulness of Embeddings, Clusters and Strings for Text Generator Evaluation

Ryan Cotterell, Tiago Pimentel, Clara Meister

arXiv · PDF · Open in the Atlas

Code that ran

2 of 2 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, 0 violated it and 0 have no contract verdict; 2 failures of our instrument; 0 no recorded run), measured 2026-11-23; 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/2205.16001.json · badge: /api/ran/2205.16001.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
rycolab/clusters-in-language-evaluation canonical (classifier label)
classifier basis: classifier_2025
2 ran · 0 no recorded run
FunctionStatusWhere it lives
get_clusters Ran
ran; our contract draft was wrong, not the code
rycolab/clusters-in-language-evaluation/src/h01_data/get_clusters.py
code served (permissive licence) · get_code("455b6deac4bf98e6")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned tuple. 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
from sklearn.decomposition import PCA
import torch

torch.manual_seed(0)

# Create a simple stand-in for kmeans with a search method
class MockKMeans:
    def __init__(self, n_clusters=3):
        self.n_clusters = n_clusters
    
    def search(self, data, k):
        # Returns distances and labels
        # data shape: (n_samples, dimensionality)
        n_samples = data.shape[0]
        # Return mock distances and labels
        distances = np.random.rand(n_samples, k).astype(np.float32)
        labels = np.random.randint(0, self.n_clusters, size=(n_samples, k))
        return distances, labels

# Create representations with shape (6, 8) - 6 samples, 8 features
representations = np.random.randn(6, 8).astype(np.float64)

# Create PCA that can transform to at least dimensionality components
pca = PCA(n_components=5)
pca.fit(representations)

# Create kmeans mock
kmeans = MockKMeans(n_clusters=3)

# Dimensionality to use (must be <= pca.n_components)
dimensionality = 3

ARGS = {
    'pca': pca,
    'kmeans': kmeans,
    'dimensionality': dimensionality,
    'representations': representations
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
numpy, sklearn, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is 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
list_subdirs Ran
ran; our contract draft was wrong, not the code
rycolab/clusters-in-language-evaluation/src/h03_analysis/compile_results.py
code served (permissive licence) · get_code("1f93649888ce7457")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) 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

# Create a temporary directory structure for testing
temp_dir = tempfile.mkdtemp()

# Create some subdirectories
os.makedirs(os.path.join(temp_dir, "subdir1"), exist_ok=True)
os.makedirs(os.path.join(temp_dir, "subdir2"), exist_ok=True)
os.makedirs(os.path.join(temp_dir, "subdir3"), exist_ok=True)

# Create some files (not directories) to ensure the function filters correctly
with open(os.path.join(temp_dir, "file1.txt"), "w") as f:
    f.write("test")
with open(os.path.join(temp_dir, "file2.txt"), "w") as f:
    f.write("test")

ARGS = {
    "directory": temp_dir
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
none outside the standard library — 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

Also present in other papers' code

Of 2 samples lifted from this paper's linked repositories, 2 carry a function identity and 0 do not. Of the 2 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 2 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

A good automatic evaluation metric for language generation ideally correlates highly with human judgements of text quality. Yet, there is a dearth of such metrics, which inhibits the rapid and efficient progress of language generators. One exception is the recently proposed MAUVE. In theory, MAUVE measures an informationtheoretic divergence between two probability distributions over strings: one representing the language generator under evaluation and the other representing the true natural language distribution. MAUVE's authors argue that its success comes from the qualitative properties of their proposed divergence. Yet in practice, as this divergence is uncomputable, MAUVE approximates it by measuring the divergence between multinomial distributions over clusters instead, where cluster assignments are attained by grouping strings based on a pre-trained language model's embeddings. As we show, however, this is not a tight approximation-in either theory or practice. This begs the question: why does MAUVE work so well? In this work, we show that MAUVE was right for the wrong reasons, and that its newly proposed divergence is not necessary for its high performance. In fact, classical divergences paired with its proposed cluster-based approximation may actually serve as better evaluation metrics. We finish the paper with a probing analysis; this analysis leads us to conclude that-by encoding syntactic-and coherence-level features of text, while ignoring surface-level features-such cluster-based substitutes to string distributions may simply be better for evaluating state-of-the-art language generators. 1 * Equal contribution. 1 Code available at https://github.com/rycolab/clusters-in-language-evaluation. 2 We define a language generator as a probability distribution qw over strings w. Specifically, we consider this distribution as used during generation. E.g., if decoding is performed with nucleus sampling, we consider the final distribution where every sentence with tokens not in the nucleus is assigned a probability of 0. 3 Most measures we consider are not metrics in a strict sense; we use the term "metric" out of convention.

For agents

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

get_harvested_code_for_paper("2205.16001")
get_code_for_paper("2205.16001")
have("2205.16001")

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

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

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

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

Connect an agent — have() is free.