SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1902.00640 · 2019

Particle Flow Bayes' Rule

arXiv · PDF · Open in the Atlas

Code that ran

6 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 5 have no contract verdict; 1 failure of our instrument; 2 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/1902.00640.json · badge: /api/ran/1902.00640.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
xinshi-chen/MetaParticleFlow community (classifier label)
classifier basis not recorded on the link
6 ran · 2 no recorded run
FunctionStatusWhere it lives
create_metric_dict Ran
ran on a synthesized input
xinshi-chen/MetaParticleFlow/pfbayes/common/metric.py
code served (permissive licence) · get_code("87afa36c35a6b7aa")
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 numpy as np

# The function create_metric_dict takes two parameters:
# - num_epoch: an integer representing number of epochs
# - len_sequence: an integer representing length of sequence

# These are simple scalar parameters, so we just need to provide reasonable integer values
num_epoch = 5
len_sequence = 10

ARGS = {
    'num_epoch': num_epoch,
    'len_sequence': len_sequence
}
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 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
get_gamma Ran
ran on a synthesized input
xinshi-chen/MetaParticleFlow/pfbayes/common/distributions.py
code served (permissive licence) · get_code("a5b3082dff39cbe6")
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 float, 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
import torch.nn.functional as F
from torch.autograd import Variable
import numpy as np

torch.manual_seed(0)

# Create a small tensor for X with shape (2, 4) - 2 samples, 4 dimensions
X = torch.randn(2, 4, dtype=torch.float32)

# bandwidth is a float scalar
bandwidth = 1.0

ARGS = {
    "X": X,
    "bandwidth": bandwidth
}
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 float, 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
grad_ll Ran
ran on a synthesized input
xinshi-chen/MetaParticleFlow/pfbayes/common/ode/misc.py
code served (permissive licence) · get_code("378e9b1237d5091a")
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, 4) 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 torch.nn as nn

torch.manual_seed(0)

# Create a simple likelihood function that takes (ob, x) and returns a scalar or batch tensor
def ll_func(ob, x):
    # ob is an object/model, x is input tensor
    # We'll use ob as a simple linear transformation
    return torch.sum(ob(x) * x, dim=1, keepdim=True)

# Create a simple model to serve as 'ob'
class SimpleLikelihoodModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 4)
    
    def forward(self, x):
        return self.linear(x)

# Instantiate the model
ob = SimpleLikelihoodModel()

# Create input tensor with requires_grad=True since grad_ll computes gradients w.r.t. x
x = torch.randn(2, 4, requires_grad=True)

ARGS = {
    'ob': ob,
    'x': x,
    'll_func': ll_func
}
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, 4) — shape (2, 4) 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
log_sum_exp Ran
ran on a synthesized input
xinshi-chen/MetaParticleFlow/pfbayes/common/torch_utils.py
code served (permissive licence) · get_code("4c56e632880df4e3")
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
import torch.nn.functional as F

torch.manual_seed(0)

# Create a small logits tensor with shape (batch_size, num_classes)
# Using batch_size=2 and num_classes=4 as specified
logits = torch.randn(2, 4)

ARGS = {
    "logits": logits,
    "keepdim": False,
}
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
pairwise_distances Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
xinshi-chen/MetaParticleFlow/pfbayes/common/torch_utils.py
pointer only (licence: MIT); the stored copy get_code serves, from gentlezhu/shift-robust-gnns, is pointer only (licence: NONE) · get_code("449fa3a7ae8a84ad")
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 gentlezhu/shift-robust-gnns, 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.

square_mmd_fine Ran
ran on a synthesized input
xinshi-chen/MetaParticleFlow/pfbayes/common/metric.py
code served (permissive licence) · get_code("64aebddbe37b7031")
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 float32, 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 numpy as np

# Create small sample arrays for p and q distributions
np.random.seed(0)

# p_samples: samples from true distribution p (should be >> n_q)
p_samples = np.random.randn(5, 3).astype(np.float32)  # 5 samples, 3 dimensions
n_p = 5

# q_samples: samples from approximating distribution q
q_samples = np.random.randn(3, 3).astype(np.float32)  # 3 samples, 3 dimensions
n_q = 3

# kernel_type: one of the supported kernels
kernel_type = 'gaussian'

ARGS = {
    'p_samples': p_samples,
    'q_samples': q_samples,
    'n_p': n_p,
    'n_q': n_q,
    'kernel_type': kernel_type
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float32, 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
cond_odeint Not yet run
unverified (harvested, no recorded run)
xinshi-chen/MetaParticleFlow/pfbayes/common/ode/cond_odeint.py
code served (permissive licence) · get_code("29b27c1c08f4091b")
How it ran

no invocation recorded.

cond_odeint_adjoint Not yet run
unverified (harvested, no recorded run)
xinshi-chen/MetaParticleFlow/pfbayes/common/ode/cond_odeint.py
code served (permissive licence) · get_code("29c5616a486a4177")
How it ran

no invocation recorded.

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, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 1 later) and 7 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
pairwise_distances 5 other papers
1 dated earlier, 4 later
1812.07119 (2018-12)
Composing Text and Image for Image Retrieval - An Empirical Odyssey
2006.11149 (2020-06)
Compositional Learning of Image-Text Query for Image Retrieval
2007.00145 (2020-07)
Modality-Agnostic Attention Fusion for visual search with text feedback
and 2 more not named here

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 present a particle flow realization of Bayes' rule, where an ODE-based neural operator is used to transport particles from a prior to its posterior after a new observation. We prove that such an ODE operator exists. Its neural parameterization can be trained in a meta-learning framework, allowing this operator to reason about the effect of an individual observation on the posterior, and thus generalize across different priors, observations and to sequential Bayesian inference. We demonstrated the generalization ability of our particle flow Bayes operator in several canonical and high dimensional examples.

For agents

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

get_harvested_code_for_paper("1902.00640")
get_code_for_paper("1902.00640")
have("1902.00640")

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

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

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

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

Connect an agent — have() is free.