SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2401.13537 · 2024

Masked Particle Modeling on Sets: Towards Self-Supervised High Energy Physics Foundation Models

arXiv · PDF · Open in the Atlas

Code that ran

10 of 11 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 0 have no contract verdict; 7 failures of our instrument; 1 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.13537.json · badge: /api/ran/2401.13537.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
rodem-hep/mpm canonical (classifier label)
classifier basis: census
10 ran · 1 no recorded run
FunctionStatusWhere it lives
champfer_loss Ran
ran; our contract draft was wrong, not the code
rodem-hep/mpm/mattstools/mattstools/loss.py
code served (permissive licence) · get_code("631dab7163c9029d")
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 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 as T

T.manual_seed(0)

# Construct small point clouds with masks
# mask_a: [batch_size, num_points_a] with boolean/float values
# pc_a: [batch_size, num_points_a, 3] point cloud coordinates
# mask_b: [batch_size, num_points_b] with boolean/float values
# pc_b: [batch_size, num_points_b, 3] point cloud coordinates

batch_size = 2
num_points_a = 3
num_points_b = 4
coord_dim = 3

mask_a = T.tensor([
    [1.0, 1.0, 0.0],
    [1.0, 0.0, 0.0]
], dtype=T.float32)

pc_a = T.randn(batch_size, num_points_a, coord_dim, dtype=T.float32)

mask_b = T.tensor([
    [1.0, 1.0, 1.0, 0.0],
    [1.0, 1.0, 0.0, 0.0]
], dtype=T.float32)

pc_b = T.randn(batch_size, num_points_b, coord_dim, dtype=T.float32)

ARGS = {
    "mask_a": mask_a,
    "pc_a": pc_a,
    "mask_b": mask_b,
    "pc_b": pc_b
}
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 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
cosine_encoding Ran
ran; our contract draft was wrong, not the code
rodem-hep/mpm/mattstools/mattstools/modules.py
code served (permissive licence) · get_code("6a728d7d4c676cdb")
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 2, dtype family float, shape (2, 32) 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 math

torch.manual_seed(0)

# Create a small input tensor
# The function expects the final dimension to be 1, or it will unsqueeze it
# Let's create a 2D tensor with shape (2, 1) - batch of 2 values
x = torch.tensor([[0.3], [0.7]], dtype=torch.float32)

# Parameters for the function
outp_dim = 32
min_value = 0.0
max_value = 1.0
frequency_scaling = 'exponential'

ARGS = {
    'x': x,
    'outp_dim': outp_dim,
    'min_value': min_value,
    'max_value': max_value,
    'frequency_scaling': frequency_scaling
}
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 2, dtype family float, shape (2, 32) — shape (2, 32) 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
crop_constituents Ran
ran; our contract draft was wrong, not the code
rodem-hep/mpm/src/pc_transforms.py
code served (permissive licence) · get_code("c2898023a7450079")
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 numpy as np
import torch

torch.manual_seed(0)

# Analyze the function:
# - csts: np.ndarray - array of constituents, gets copied and indexed/zeroed
# - mask: np.ndarray - boolean mask array, gets copied and indexed with False assignment
# - amount: int - number of constituents to drop (default 10)
# - min_allowed: int - minimum allowed constituents (default 10)

# Create small test arrays
# csts should be 2D: (n_constituents, features)
# mask should be 1D boolean array of length n_constituents

n_constituents = 25
n_features = 4

csts = np.random.randn(n_constituents, n_features).astype(np.float32)
mask = np.ones(n_constituents, dtype=bool)
mask[20:] = False  # Set last 5 to False, so n_csts = 20

amount = 5
min_allowed = 10

ARGS = {
    "csts": csts,
    "mask": mask,
    "amount": amount,
    "min_allowed": min_allowed
}
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 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
get_eng_from_ptetaphiM Ran
ran, honoured the contract we drafted
rodem-hep/mpm/src/jet_utils.py
code served (permissive licence) · get_code("b3292811d7d28c8c")
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 numpy as np

# Create a 3-vector particle (pt, eta, phi) without mass
particle_3vec = np.array([[15.0, 0.5, 1.2], [25.0, -1.1, 2.3]])

# Create a 4-vector particle (pt, eta, phi, mass) with mass
particle_4vec = np.array([[15.0, 0.5, 1.2, 0.1], [25.0, -1.1, 2.3, 0.5]])

ARGS = {
    "particle": particle_4vec
}
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 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
kld_to_norm Ran
ran; our contract draft was wrong, not the code
rodem-hep/mpm/mattstools/mattstools/loss.py
code served (permissive licence) · get_code("c993570e02172d75")
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 as T

T.manual_seed(0)

# Create small tensors for means and log_stds
# Using batch_size=2, dim=4
means = T.randn(2, 4)
log_stds = T.randn(2, 4)

# Define ARGS dict with all parameters
ARGS = {
    'means': means,
    'log_stds': log_stds,
    'reduce': 'mean'
}
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
kld_with_OE Ran
ran; our contract draft was wrong, not the code
rodem-hep/mpm/mattstools/mattstools/loss.py
code served (permissive licence) · get_code("cb2ad0c4ebe3b5f2")
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 as T

T.manual_seed(0)

# Construct tensors for means and log_stds
# means: shape (batch_size, latent_dim) = (2, 4)
means = T.randn(2, 4)

# log_stds: shape (batch_size, latent_dim) = (2, 4)
log_stds = T.randn(2, 4)

# labels: shape (batch_size,) = (2,) with binary values
labels = T.tensor([0, 1], dtype=T.float32)

ARGS = {
    'means': means,
    'log_stds': log_stds,
    'labels': labels,
    'reduce': 'mean'
}
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
load_files Ran
ran; our contract draft was wrong, not the code
rodem-hep/mpm/src/datamodules/loading.py
code served (permissive licence) · get_code("c7d6ea26a0b11041")
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. 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

def mock_load_function(file_path, n_csts, features=None):
    """
    Mock load function that returns a tuple of arrays.
    Returns (features_array, labels_array) to match typical data loading.
    """
    # Return two arrays: features (5 samples x 4 dims) and labels (5 samples)
    features_data = np.random.randn(5, 4).astype(np.float32)
    labels_data = np.random.randint(0, 2, 5).astype(np.int32)
    return (features_data, labels_data)

# Create file paths (these won't actually be read due to mock function)
file_paths = ['file1.npy', 'file2.npy']

# Create load function
load_function = mock_load_function

# Set number of constraints
n_csts = 3

# Define ARGS dictionary with all parameters
ARGS = {
    'file_paths': file_paths,
    'load_function': load_function,
    'n_csts': n_csts,
    'shuffle': True,
    'features': 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 list — a list 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
ptetaphi_to_pxpypz Ran
ran, honoured the contract we drafted
rodem-hep/mpm/src/jet_utils.py
code served (permissive licence) · get_code("5ae39f69ba30c235")
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, 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

# Case 1: pt, eta, phi as separate arrays
pt_array = np.array([[1.0, 2.0], [3.0, 4.0]])
eta_array = np.array([[0.5, 0.6], [0.7, 0.8]])
phi_array = np.array([[0.1, 0.2], [0.3, 0.4]])

ARGS = {
    "pt": pt_array,
    "eta": eta_array,
    "phi": phi_array,
}
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 tuple, ndim 3, dtype family float — a tuple 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
pxpypz_to_ptetaphi Ran
ran, honoured the contract we drafted
rodem-hep/mpm/src/jet_utils.py
code served (permissive licence) · get_code("bbf0385cdc17a286")
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, 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

# Test case 1: Pass px as a 3D array where last dimension contains [px, py, pz]
px_combined = np.array([
    [[1.0, 2.0, 3.0], [4.0, 5.0, 6.0]],
    [[7.0, 8.0, 9.0], [10.0, 11.0, 12.0]]
])

ARGS = {
    "px": px_combined,
    "py": None,
    "pz": 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 tuple, ndim 3, dtype family float — a tuple 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
torch_locals_to_jet_pt_mass Ran
ran; our contract draft was wrong, not the code
rodem-hep/mpm/src/torch_jets.py
code served (permissive licence) · get_code("4b6be5814a6ed5cd")
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 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 torch as T

T.manual_seed(0)

# Create nodes tensor with shape (batch_size, num_nodes, 3)
# The function expects nodes[..., 0] for eta, nodes[..., 1] for phi, nodes[..., 2] for x (log_pt)
nodes = T.randn(2, 4, 3)

# Create a boolean mask tensor with shape (batch_size, num_nodes)
# Used to mask out padding or invalid nodes
mask = T.randint(0, 2, (2, 4)).bool()

ARGS = {
    "nodes": nodes,
    "mask": mask,
}
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 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
smear_constituents Not yet run
unverified (harvested, no recorded run)
rodem-hep/mpm/src/pc_transforms.py
code served (permissive licence) · get_code("ff4de26cdb009d75")
How it ran

no invocation recorded.

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 0 later) and 10 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
cosine_encoding 1 other paper
1 dated earlier
2303.05376 (2023-03)
PC-JeDi: Diffusion for Particle Cloud Generation in High Energy Physics

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

We propose masked particle modeling (MPM) as a self-supervised method for learning generic, transferable, and reusable representations on unordered sets of inputs for use in high energy physics (HEP) scientific data. This work provides a novel scheme to perform masked modeling based pre-training to learn permutation invariant functions on sets. More generally, this work provides a step towards building large foundation models for HEP that can be generically pre-trained with self-supervised learning and later fine-tuned for a variety of down-stream tasks. In MPM, particles in a set are masked and the training objective is to recover their identity, as defined by a discretized token representation of a pre-trained vector quantized variational autoencoder. We study the efficacy of the method in samples of high energy jets at collider physics experiments, including studies on the impact of discretization, permutation invariance, and ordering. We also study the fine-tuning capability of the model, showing that it can be adapted to tasks such as supervised and weakly supervised jet classification, and that the model can transfer efficiently with small fine-tuning data sets to new classes and new data domains.

For agents

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

get_harvested_code_for_paper("2401.13537")
get_code_for_paper("2401.13537")
have("2401.13537")

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

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

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

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

Connect an agent — have() is free.