SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2501.19383 · 2025

Decoding-based Regression

arXiv · PDF · Open in the Atlas

Code that ran

8 of 8 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 8 have no contract verdict; 0 failures of our instrument; 0 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/2501.19383.json · badge: /api/ran/2501.19383.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
google-research/optformer canonical (classifier label)
classifier basis not recorded on the link
8 ran · 0 no recorded run
FunctionStatusWhere it lives
extract_all_tokens Ran
ran on a synthesized input
google-research/optformer/optformer/decoding_regression/vocabs.py
code served (permissive licence) · get_code("c048569811ccb8df")
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 re

def extract_all_tokens(input_string):
    """Extracts all elements from a string of the form <...><...><...>..."""
    pattern = '<[^>]+>'
    matches = re.findall(pattern, input_string)
    return matches

ARGS = {
    "input_string": "<token1><token2><token3>"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
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
get_checkpoint_manager Ran
ran on a synthesized input
google-research/optformer/optformer/embed_then_regress/checkpointing.py
code served (permissive licence) · get_code("fbe79c50f64c8d3c")
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 CheckpointManager. 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 tempfile
from etils import epath

# Create a temporary directory for the workdir
workdir = tempfile.mkdtemp()

# Define arguments for get_checkpoint_manager
ARGS = {
    'workdir': workdir,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
etils, orbax — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type CheckpointManager — a CheckpointManager output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a CheckpointManager 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
masked_mean Ran
ran on a synthesized input
google-research/optformer/optformer/embed_then_regress/metrics.py
code served (permissive licence) · get_code("95ddda1ccba27e85")
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 ArrayImpl, 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 jax
import jax.numpy as jnp
import jaxtyping as jt

# Create small test tensors with distinct sizes for debugging
B = 2  # batch size
L = 4  # sequence length

# Create values tensor: shape (B, L) with float values
values = jnp.array([
    [1.0, 2.0, 3.0, 4.0],
    [5.0, 6.0, 7.0, 8.0]
], dtype=jnp.float32)

# Create target_mask tensor: shape (B, L) with boolean values
target_mask = jnp.array([
    [True, True, False, True],
    [True, False, True, True]
], dtype=jnp.bool_)

ARGS = {
    'values': values,
    'target_mask': target_mask
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax, jaxtyping — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ArrayImpl, 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
pointwise_mse Ran
ran on a synthesized input
google-research/optformer/optformer/embed_then_regress/metrics.py
code served (permissive licence) · get_code("8d8427b68c463719")
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 ArrayImpl, 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 jax
import jax.numpy as jnp

# Set seed for reproducibility
key = jax.random.PRNGKey(0)

# Create small tensors with distinct dimensions
batch_size = 2
sequence_length = 4

# Generate random values for mu and ys (shape: B L = 2 x 4)
key, subkey = jax.random.split(key)
mu = jax.random.normal(subkey, shape=(batch_size, sequence_length))

key, subkey = jax.random.split(key)
ys = jax.random.normal(subkey, shape=(batch_size, sequence_length))

# Generate random mask (shape: B L = 2 x 4)
# Use random uniform and threshold to get boolean values
key, subkey = jax.random.split(key)
target_mask = jax.random.uniform(subkey, shape=(batch_size, sequence_length)) > 0.5

ARGS = {
    'mu': mu,
    'ys': ys,
    'target_mask': target_mask
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax, jaxtyping — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ArrayImpl, 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
pointwise_r2 Ran
ran on a synthesized input
google-research/optformer/optformer/embed_then_regress/metrics.py
code served (permissive licence) · get_code("644a1b16d3038d62")
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 ArrayImpl, 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 jax
import jax.numpy as jnp

# Set seed for reproducibility
jax.config.update('jax_default_prng_impl', 'threefry2x32')

# Create small test tensors
batch_size = 2
seq_length = 4

# Create random values for mu and ys
key = jax.random.PRNGKey(0)
key1, key2 = jax.random.split(key)

mu = jax.random.normal(key1, (batch_size, seq_length))
ys = jax.random.normal(key2, (batch_size, seq_length))

# Create a target mask (boolean array indicating which positions to consider)
target_mask = jnp.array([[True, True, False, True],
                         [True, False, True, True]])

ARGS = {
    'mu': mu,
    'ys': ys,
    'target_mask': target_mask
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax, jaxtyping — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ArrayImpl, 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
restore_train_state Ran
ran on a synthesized input
google-research/optformer/optformer/embed_then_regress/checkpointing.py
code served (permissive licence) · get_code("9c36e3b29dad463a")
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 tempfile
from pathlib import Path
from etils import epath

torch.manual_seed(0)

# Create a temporary directory for the workdir
workdir = epath.Path(tempfile.mkdtemp())

# Create a simple initial train state (dict with some tensors)
initial_train_state = {
    'params': {
        'layer1': torch.randn(4, 3),
        'layer2': torch.randn(3, 2),
    },
    'opt_state': {
        'step': torch.tensor(0),
    }
}

# Define ARGS mapping all parameters of restore_train_state
ARGS = {
    'workdir': workdir,
    'initial_train_state': initial_train_state,
    'step': None,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
absl, etils, orbax, 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
sample_from_probs Ran
ran on a synthesized input
google-research/optformer/optformer/decoding_regression/models.py
code served (permissive licence) · get_code("cdde774dd630cecc")
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 int64, ndim 0, dtype family int, 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 numpy as np
import jaxtyping as jt

# Create a valid probability vector
# Must be a 1D array that sums to 1
prob_vector = np.array([0.2, 0.3, 0.3, 0.2])

ARGS = {
    "prob_vector": prob_vector
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jaxtyping, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int64, ndim 0, dtype family int, 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
weighted_sparse_categorical_crossentropy Ran
ran on a synthesized input
google-research/optformer/optformer/decoding_regression/models.py
code served (permissive licence) · get_code("91c736b5db8a18e6")
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 EagerTensor, 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 tensorflow as tf
import numpy as np

# Create small test tensors
batch_size = 2
num_classes = 4

# labels: sparse integer class indices, shape (batch_size,)
labels = tf.constant([0, 2], dtype=tf.int64)

# logits: raw model outputs, shape (batch_size, num_classes)
logits = tf.constant([
    [1.0, 2.0, 0.5, 1.5],
    [0.5, 1.0, 2.5, 0.8]
], dtype=tf.float32)

# weights: per-sample weights, shape (batch_size,)
weights = tf.constant([1.0, 2.0], dtype=tf.float32)

ARGS = {
    "labels": labels,
    "logits": logits,
    "weights": weights
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, 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

Also present in other papers' code

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

Language models have recently been shown capable of performing regression wherein numeric predictions are represented as decoded strings. In this work, we provide theoretical grounds for this capability and furthermore investigate the utility of causal sequence decoding models as numeric regression heads given any feature representation. We find that, despite being trained in the usual way - for next-token prediction via cross-entropy loss - decoder-based heads are as performant as standard pointwise heads when benchmarked over standard regression tasks, while being flexible enough to capture smooth numeric distributions, such as in the task of density estimation.

For agents

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

get_harvested_code_for_paper("2501.19383")
get_code_for_paper("2501.19383")
have("2501.19383")

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

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

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

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

Connect an agent — have() is free.