SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2407.15703 · ICML · 2024

Estimating Probability Densities of Tabular Data using a Transformer Model combined with Denoising Diffusion

Joshua Speagle, Henry Leung, Jo Bovy

arXiv · PDF · Open in the Atlas

Code that ran

5 of 5 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; 5 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/2407.15703.json · badge: /api/ran/2407.15703.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
henrysky/stars_foundation_diffusion canonical (classifier label)
classifier basis: census
5 ran · 0 no recorded run
FunctionStatusWhere it lives
get_activation Ran
ran; our contract draft was wrong, not the code
henrysky/stars_foundation_diffusion/stellarperceptron/layers.py
code served (permissive licence) · get_code("1e256ca6c383e29b")
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 torch.nn.functional as F
from typing import Callable, Union, Optional

torch.manual_seed(0)

# Test case 1: None activation (should default to 'relu')
activation_none = None

# Test case 2: String activation (e.g., 'relu')
activation_string = 'relu'

# Test case 3: Callable activation (e.g., a lambda or function)
activation_callable = lambda x: F.relu(x)

# We'll test with the string case as the primary argument
ARGS = {
    'activation': 'relu'
}
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 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_initializer Ran
ran; our contract draft was wrong, not the code
henrysky/stars_foundation_diffusion/stellarperceptron/layers.py
code served (permissive licence) · get_code("181136b0f2ef71bb")
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 torch.nn.init

torch.manual_seed(0)

# Test case 1: None initializer (defaults to 'xavier_uniform_')
test_tensor_1 = torch.empty(2, 4)

# Test case 2: String initializer
test_tensor_2 = torch.empty(2, 4)

# Test case 3: Callable initializer
def custom_initializer(tensor: torch.Tensor) -> torch.Tensor:
    return torch.nn.init.normal_(tensor, mean=0, std=1)

test_tensor_3 = torch.empty(2, 4)

# Create ARGS dict with different test cases
# We'll test with None (the default case)
ARGS = {
    'initializer': None
}
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 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
mean_squared_error Ran
ran; our contract draft was wrong, not the code
henrysky/stars_foundation_diffusion/stellarperceptron/nn_utils.py
pointer only (licence: MIT); the stored copy get_code serves, from NolanKoblischke/SpectraFM_NeurIPS_FM4Science, is pointer only (licence: NONE) · get_code("ac32065953e99b32")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from NolanKoblischke/SpectraFM_NeurIPS_FM4Science, and GitHub detected no licence in that repository 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.

robust_mean_squared_error Ran
ran; our contract draft was wrong, not the code
henrysky/stars_foundation_diffusion/stellarperceptron/nn_utils.py
code served (permissive licence) · get_code("00ed7823bf5bae82")
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 Tensor, 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 torch

torch.manual_seed(0)

# Create small tensors with distinct dimensions for each parameter
batch_size = 2
feature_dim = 4

y_true = torch.randn(batch_size, feature_dim)
y_pred = torch.randn(batch_size, feature_dim)
variance = torch.randn(batch_size, feature_dim)
labels_err = torch.randn(batch_size, feature_dim)

ARGS = {
    "y_true": y_true,
    "y_pred": y_pred,
    "variance": variance,
    "labels_err": labels_err,
}
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 Tensor, 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
shuffle_row Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
henrysky/stars_foundation_diffusion/stellarperceptron/nn_utils.py
code served (permissive licence) · get_code("cea12a23d8b9ac87")
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 3, 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 numpy as np
from typing import List, Optional

# Create sample 2D arrays with distinct dimensions
# Using 3 rows and 4 columns for the arrays
array1 = np.array([
    [1, 2, 3, 4],
    [5, 6, 7, 8],
    [9, 10, 11, 12]
], dtype=np.int32)

array2 = np.array([
    [100, 200, 300, 400],
    [500, 600, 700, 800],
    [900, 1000, 1100, 1200]
], dtype=np.int32)

array3 = np.array([
    [0.1, 0.2, 0.3, 0.4],
    [0.5, 0.6, 0.7, 0.8],
    [0.9, 1.0, 1.1, 1.2]
], dtype=np.float32)

arrays_ls = [array1, array2, array3]

# Case 1: Shuffle all elements in each row
first_n_case1 = None

# Case 2: Shuffle only first n elements in each row
first_n_case2 = [2, 3, 2]  # Shuffle first 2, 3, 2 elements respectively for each row

ARGS = {
    "arrays_ls": arrays_ls,
    "first_n": first_n_case1
}
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 list, ndim 3, 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 5 samples lifted from this paper's linked repositories, 5 carry a function identity and 0 do not. Of the 5 distinct functions with an identity, 2 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 1 later) and 3 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
mean_squared_error 2 other papers
1 dated earlier, 1 later
2308.10944 (2023-08)
Towards an astronomical foundation model for stars with a Transformer-based model
2411.04750 (2024-11)
SpectraFM: Tuning into Stellar Foundation Models
robust_mean_squared_error 1 other paper
1 dated earlier
2308.10944 (2023-08)
Towards an astronomical foundation model for stars with a Transformer-based model

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

Transformers are often the go-to architecture to build foundation models that ingest a large amount of training data. But these models do not estimate the probability density distribution when trained on regression problems, yet obtaining full probabilistic outputs is crucial to many fields of science, where the probability distribution of the answer can be non-Gaussian and multimodal. In this work, we demonstrate that training a probabilistic model using a denoising diffusion head on top of the Transformer provides reasonable probability density estimation even for high-dimensional inputs. The combined Trans-former+Denoising Diffusion model allows conditioning the output probability density on arbitrary combinations of inputs and it is thus a highly flexible density function emulator of all possible input/output combinations. We illustrate our Trans-former+Denoising Diffusion model by training it on a large dataset of astronomical observations and measured labels of stars within our Galaxy and we apply it to a variety of inference tasks to show that the model can infer labels accurately with reasonable distributions.

For agents

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

get_harvested_code_for_paper("2407.15703")
get_code_for_paper("2407.15703")
have("2407.15703")

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

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

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

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

Connect an agent — have() is free.