SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2406.03358 · 2024

Bayesian Quantile Estimation and Regression with Martingale Posteriors

arXiv · PDF · Open in the Atlas

Code that ran

3 of 18 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 2 have no contract verdict; 1 failure of our instrument; 15 no recorded run), measured 2026-11-21; 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/2406.03358.json · badge: /api/ran/2406.03358.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
edfong/qmp canonical (classifier label)
classifier basis: census
3 ran · 15 no recorded run
FunctionStatusWhere it lives
sim Ran
ran; our contract draft was wrong, not the code
edfong/qmp/run_scripts/7.1_sim_qmp.py
code served (permissive licence) · get_code("57c0abba4a8284ab")
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 (10,) 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.numpy as jnp
import numpy as np

du = 0.005
u_plot = jnp.arange(du, 1, du)
Q_truth = 4 * (u_plot - 0.4) ** 3 + 0.2 * u_plot

ARGS = {
    "n": 10,
    "Q_truth": Q_truth,
    "u_plot": u_plot,
    "seed": 42
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax, 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 float, shape (10,) — shape (10,) 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
update_Q_scan Ran
ran on a synthesized input
edfong/qmp/qmp/qmp_functions.py
code served (permissive licence) · get_code("db9e0a44baa7f6ef")
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 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 jax.numpy as jnp
from jax import random
import numpy as np

# Define the log_Huv function that is referenced in update_Q
def log_Huv(u_plot, v, rho):
    """Stand-in for the log_Huv function used in update_Q"""
    return jnp.log(jnp.maximum(v * rho, 1e-8))

# Set up small test data
key = random.PRNGKey(0)

# Q_plot: quantile plot values, shape (5,)
Q_plot = jnp.array([0.1, 0.3, 0.5, 0.7, 0.9])

# preq_score: scalar log probability
preq_score = jnp.array(0.0)

# n_rearr: counter for rearrangements
n_rearr = jnp.array(0)

# u_plot: uniform grid, shape (5,)
u_plot = jnp.array([0.0, 0.25, 0.5, 0.75, 1.0])

# y: observations to process, shape (3,)
y = jnp.array([0.2, 0.6, 0.8])

# a: learning rate parameter
a = jnp.array(0.1)

# c: control parameter
c = jnp.array(0.01)

# k: power parameter
k = jnp.array(2.0)

# du: step size
du = jnp.array(0.25)

# Create the carry tuple
carry = (Q_plot, preq_score, n_rearr, u_plot, y, a, c, k, du)

# rng: array of indices to loop over
rng = jnp.arange(len(y))

ARGS = {
    "carry": carry,
    "rng": rng,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax, numpy — 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
update_Q_scan_norearr Ran
ran on a synthesized input
edfong/qmp/qmp/qmp_functions_norearr.py
code served (permissive licence) · get_code("b3c450810bdb7082")
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 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 jax
import jax.numpy as jnp
from jax import random

# Define a placeholder function for log_Huv since it's referenced but not defined
def log_Huv(u_plot, v, rho):
    # Simple placeholder implementation
    return jnp.log(jnp.maximum(jnp.abs(u_plot * v * rho), 1e-8))

# Set up small test data
key = random.PRNGKey(0)

# Create small arrays with distinct sizes for different dimensions
n_u = 5  # number of points in u_plot
n_y = 3  # number of data points in y
du = 0.1

# Initialize Q_plot (quantile plot): shape (n_u,)
Q_plot = jnp.linspace(0, 1, n_u)

# Initialize preq_score (scalar)
preq_score = jnp.array(0.0)

# Initialize n_rearr (scalar)
n_rearr = jnp.array(0)

# Initialize u_plot: shape (n_u,)
u_plot = jnp.linspace(0, 1, n_u)

# Initialize y: shape (n_y,)
y = jnp.array([0.2, 0.5, 0.8])

# Algorithm parameters
a = 0.1  # scalar
c = 0.5  # scalar
k = 2.0  # scalar

# rng for scan: array of indices to iterate over
rng = jnp.arange(n_y)

# Create the carry tuple
carry = (Q_plot, preq_score, n_rearr, u_plot, y, a, c, k, du)

ARGS = {
    "carry": carry,
    "rng": rng,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax — 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
PR_loop Not yet run
unverified (harvested, no recorded run)
edfong/qmp/qmp/sample_qmp_functions.py
code served (permissive licence) · get_code("52f6be84a1896729")
How it ran

no invocation recorded.

PR_reg_loop Not yet run
unverified (harvested, no recorded run)
edfong/qmp/qmp/sample_qmp_reg_functions.py
code served (permissive licence) · get_code("756e10dfe336a021")
How it ran

no invocation recorded.

fit_Q Not yet run
unverified (harvested, no recorded run)
edfong/qmp/qmp/qmp_functions.py
code served (permissive licence) · get_code("f784dd83550f88b7")
How it ran

no invocation recorded.

fit_Q_norearr Not yet run
unverified (harvested, no recorded run)
edfong/qmp/qmp/qmp_functions_norearr.py
code served (permissive licence) · get_code("b7fce6ec90f03994")
How it ran

no invocation recorded.

fit_beta Not yet run
unverified (harvested, no recorded run)
edfong/qmp/qmp/qmp_reg_functions.py
code served (permissive licence) · get_code("2651972d7b34392c")
How it ran

no invocation recorded.

ndtri_ Not yet run
unverified (harvested, no recorded run)
edfong/qmp/qmp/utils/bivariate_copula.py
code served (permissive licence) · get_code("664e047cb7a3b693")
How it ran

no invocation recorded.

norm_logcdf Not yet run
unverified (harvested, no recorded run)
edfong/qmp/qmp/utils/bivariate_copula.py
code served (permissive licence) · get_code("874b33d8ed7048c6")
How it ran

no invocation recorded.

update_Q Not yet run
unverified (harvested, no recorded run)
edfong/qmp/qmp/qmp_functions.py
code served (permissive licence) · get_code("91a5a2a8528546ab")
How it ran

no invocation recorded.

update_Q_norearr Not yet run
unverified (harvested, no recorded run)
edfong/qmp/qmp/qmp_functions_norearr.py
code served (permissive licence) · get_code("c93ee059c7bc892c")
How it ran

no invocation recorded.

update_Q_norearr Not yet run
unverified (harvested, no recorded run)
edfong/qmp/qmp/sample_qmp_functions.py
code served (permissive licence) · get_code("11c32bf447b072f9")
How it ran

no invocation recorded.

update_Q_norearr_scan Not yet run
unverified (harvested, no recorded run)
edfong/qmp/qmp/sample_qmp_functions.py
code served (permissive licence) · get_code("33a7564ad78aafd2")
How it ran

no invocation recorded.

update_beta Not yet run
unverified (harvested, no recorded run)
edfong/qmp/qmp/qmp_reg_functions.py
code served (permissive licence) · get_code("0c76db4323b7c981")
How it ran

no invocation recorded.

update_beta_norearr Not yet run
unverified (harvested, no recorded run)
edfong/qmp/qmp/sample_qmp_reg_functions.py
code served (permissive licence) · get_code("8a505f12dda5bcc4")
How it ran

no invocation recorded.

update_beta_norearr_scan Not yet run
unverified (harvested, no recorded run)
edfong/qmp/qmp/sample_qmp_reg_functions.py
code served (permissive licence) · get_code("920f1d1cffc000ed")
How it ran

no invocation recorded.

update_beta_scan Not yet run
unverified (harvested, no recorded run)
edfong/qmp/qmp/qmp_reg_functions.py
code served (permissive licence) · get_code("7d3274efd7380d30")
How it ran

no invocation recorded.

Also present in other papers' code

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

Repositories linked to this paper

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

Abstract

Quantile estimation and regression within the Bayesian framework is challenging as the choice of likelihood and prior is not obvious. In this paper, we introduce a novel Bayesian nonparametric method for quantile estimation and regression based on the recently introduced martingale posterior (MP) framework. The core idea of the MP is that posterior sampling is equivalent to predictive imputation, which allows us to break free of the stringent likelihood-prior specification. We demonstrate that a recursive estimate of a smooth quantile function, subject to a martingale condition, is entirely sufficient for full nonparametric Bayesian inference. We term the resulting posterior distribution as the quantile martingale posterior (QMP), which arises from an implicit generative predictive distribution. Associated with the QMP is an expedient, MCMC-free and parallelizable posterior computation scheme, which can be further accelerated with an asymptotic approximation based on a Gaussian process. Furthermore, the well-known issue of monotonicity in quantile estimation is naturally alleviated through increasing rearrangement due to the connections to the Bayesian bootstrap. Finally, the QMP has a particularly tractable form that allows for comprehensive theoretical study, which forms a main focus of the work. We demonstrate the ease of posterior computation in simulations and real data experiments.

For agents

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

get_harvested_code_for_paper("2406.03358")
get_code_for_paper("2406.03358")
have("2406.03358")

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

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

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

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

Connect an agent — have() is free.