SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2603.27488 · 2026

Variational Learning of Fractional Posteriors

Edwin Bonilla, Ming Kian, Chai

arXiv · PDF · Open in the Atlas

Code that ran

4 of 11 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (2 of them constructed an object rather than computing a result; 2 honoured the contract we drafted, 0 violated it and 2 have no contract verdict; 0 failures of our instrument; 7 no recorded run), measured 2026-11-22; 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/2603.27488.json · badge: /api/ran/2603.27488.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
mingzhang-yin/SIVI canonical (classifier label)
classifier basis: census
0 ran · 7 no recorded run
EmoryMLIP/DeepGenerativeModelingIntro community
Papers with Code archive
4 ran · 0 no recorded run
FunctionStatusWhere it lives
Phi Ran
ran on a synthesized input · constructed an object; no result was computed
EmoryMLIP/DeepGenerativeModelingIntro/Phi.py
code served (permissive licence) · get_code("3be1d261034bbbe1")
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 an instance of its own class, Phi: the run constructed the object and did not call it, so no result was computed. 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 as nn
import copy

torch.manual_seed(0)

def antiderivTanh(x):
    return torch.abs(x) + torch.log(1 + torch.exp(-2.0 * torch.abs(x)))

def derivTanh(x):
    return 1 - torch.pow(torch.tanh(x), 2)

class ResNN(nn.Module):
    def __init__(self, d, m, nTh=2):
        super().__init__()
        if nTh < 2:
            print('nTh must be an integer >= 2')
            exit(1)
        self.d = d
        self.m = m
        self.nTh = nTh
        self.layers = nn.ModuleList([])
        self.layers.append(nn.Linear(d + 1, m, bias=True))
        self.layers.append(nn.Linear(m, m, bias=True))
        for i in range(nTh - 2):
            self.layers.append(copy.deepcopy(self.layers[1]))
        self.act = antiderivTanh
        self.h = 1.0 / (self.nTh - 1)

    def forward(self, x):
        x = self.act(self.layers[0].forward(x))
        for i in range(1, self.nTh):
            x = x + self.h * self.act(self.layers[i](x))
        return x

class Phi(nn.Module):
    def __init__(self, nTh, m, d, r=10, alph=[1.0] * 5):
        super().__init__()
        self.m = m
        self.nTh = nTh
        self.d = d
        self.alph = alph
        r = min(r, d + 1)
        self.A = nn.Parameter(torch.zeros(r, d + 1), requires_grad=True)
        self.A = nn.init.xavier_uniform_(self.A)
        self.c = nn.Linear(d + 1, 1, bias=True)
        self.w = nn.Linear(m, 1, bias=False)
        self.N = ResNN(d, m, nTh=nTh)
        self.w.weight.data = torch.ones(self.w.weight.data.shape)
        self.c.weight.data = torch.zeros(self.c.weight.data.shape)
        self.c.bias.data = torch.zeros(self.c.bias.data.shape)

    def forward(self, x):
        symA = torch.matmul(torch.t(self.A), self.A)
        return self.w(self.N(x)) + 0.5 * torch.sum(torch.matmul(x, symA) * x, dim=1, keepdims=True) + self.c(x)

    def trHess(self, x, d=None, justGrad=False):
        N = self.N
        m = N.layers[0].weight.shape[0]
        nex = x.shape[0]
        if d is None:
            d = x.shape[1] - 1
        symA = torch.matmul(self.A.t(), self.A)
        u = []
        z = N.nTh * [None]
        opening = N.layers[0].forward(x)
        u.append(N.act(opening))
        feat = u[0]
        for i in range(1, N.nTh):
            feat = feat + N.h * N.act(N.layers[i](feat))
            u.append(feat)
        tanhopen = torch.tanh(opening)
        for i in range(N.nTh - 1, 0, -1):
            if i == N.nTh - 1:
                term = self.w.weight.t()
            else:
                term = z[i + 1]
            z[i] = term + N.h * torch.mm(N.layers[i].weight.t(), torch.tanh(N.layers[i].forward(u[i - 1])).t() * term)
        z[0] = torch.mm(N.layers[0].weight.t(), tanhopen.t() * z[1])
        grad = z[0] + torch.mm(symA, x.t()) + self.c.weight.t()
        if justGrad:
            return grad.t()
        Kopen = N.layers[0].weight[:, 0:d]
        temp = derivTanh(opening.t()) * z[1]
        trH = torch.sum(temp.reshape(m, -1, nex) * torch.pow(Kopen.unsqueeze(2), 2), dim=(0, 1))
        return grad.t(), trH

ARGS = {
    'nTh': 3,
    'm': 8,
    'd': 3,
    'r': 5,
    'alph': [1.0, 1.0, 1.0, 1.0, 1.0]
}
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 Phi — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Phi 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
ResNN Ran
ran on a synthesized input · constructed an object; no result was computed
EmoryMLIP/DeepGenerativeModelingIntro/Phi.py
code served (permissive licence) · get_code("d1b6a8eefd740026")
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 an instance of its own class, ResNN: the run constructed the object and did not call it, so no result was computed. 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 as nn
import copy

torch.manual_seed(0)

def antiderivTanh(x):
    return torch.abs(x) + torch.log(1 + torch.exp(-2.0 * torch.abs(x)))

class ResNN(nn.Module):

    def __init__(self, d, m, nTh=2):
        """
            ResNet N portion of Phi

            This implementation was first described in:

            @article{onken2020otflow,
               title={OT-Flow: Fast and Accurate Continuous Normalizing Flows via Optimal Transport},
                author={Derek Onken and Samy Wu Fung and Xingjian Li and Lars Ruthotto},
                year={2020},
                journal = {arXiv preprint arXiv:2006.00104},
            }
        :param d:   int, dimension of space input (expect inputs to be d+1 for space-time)
        :param m:   int, hidden dimension
        :param nTh: int, number of resNet layers , (number of theta layers)
        """
        super().__init__()
        if nTh < 2:
            print('nTh must be an integer >= 2')
            exit(1)
        self.d = d
        self.m = m
        self.nTh = nTh
        self.layers = nn.ModuleList([])
        self.layers.append(nn.Linear(d + 1, m, bias=True))
        self.layers.append(nn.Linear(m, m, bias=True))
        for i in range(nTh - 2):
            self.layers.append(copy.deepcopy(self.layers[1]))
        self.act = antiderivTanh
        self.h = 1.0 / (self.nTh - 1)

    def forward(self, x):
        """
            N(s;theta). the forward propogation of the ResNet
        :param x: tensor nex-by-d+1, inputs
        :return:  tensor nex-by-m,   outputs
        """
        x = self.act(self.layers[0].forward(x))
        for i in range(1, self.nTh):
            x = x + self.h * self.act(self.layers[i](x))
        return x

ARGS = {
    'd': 4,
    'm': 3,
    'nTh': 3
}
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 ResNN — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a ResNN 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
antiderivTanh Ran
ran, honoured the contract we drafted
EmoryMLIP/DeepGenerativeModelingIntro/Phi.py
code served (permissive licence) · get_code("9145a617a5d6aa3a")
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

torch.manual_seed(0)

# The function antiderivTanh takes a single parameter x
# and applies torch operations: abs, log, exp
# x should be a tensor

x = torch.randn(2, 4)

ARGS = {
    "x": x
}
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
derivTanh Ran
ran, honoured the contract we drafted
EmoryMLIP/DeepGenerativeModelingIntro/Phi.py
code served (permissive licence) · get_code("91ae98c615b90e86")
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

torch.manual_seed(0)

# The function derivTanh takes a single parameter x
# It applies tanh, squares it, and returns 1 minus that value
# x should be a tensor that supports torch.tanh() and torch.pow()

x = torch.randn(2, 4)

ARGS = {
    "x": x
}
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
lognormal Not yet run
unverified (harvested, no recorded run)
mingzhang-yin/SIVI/SIVI_NB.py
code served (permissive licence) · get_code("3bcc23730e9c698e")
How it ran

no invocation recorded.

sample_ln Not yet run
unverified (harvested, no recorded run)
mingzhang-yin/SIVI/SIVI_NB.py
code served (permissive licence) · get_code("4f7fcb1fd5870313")
How it ran

no invocation recorded.

sample_mu Not yet run
unverified (harvested, no recorded run)
mingzhang-yin/SIVI/SIVI_NB_nonconjugate.py
code served (permissive licence) · get_code("aa98192eced1ed74")
How it ran

no invocation recorded.

sample_n Not yet run
unverified (harvested, no recorded run)
mingzhang-yin/SIVI/SIVI_1d.py
code served (permissive licence) · get_code("4e9b169008f9c5f2")
How it ran

no invocation recorded.

sample_n Not yet run
unverified (harvested, no recorded run)
mingzhang-yin/SIVI/SIVI_2d.py
code served (permissive licence) · get_code("ad32ba89c23f69ca")
How it ran

no invocation recorded.

sample_n Not yet run
unverified (harvested, no recorded run)
mingzhang-yin/SIVI/SIVI_LR.py
code served (permissive licence) · get_code("ae59233ec29e5904")
How it ran

no invocation recorded.

sample_n Not yet run
unverified (harvested, no recorded run)
mingzhang-yin/SIVI/SIVAE.py
code served (permissive licence) · get_code("fa2688c22408d29b")
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 10 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, 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.

FunctionAlso present inEarliest-datedOthers named
antiderivTanh
brick of this paper's assembly: helper
2 other papers
2 dated earlier · 1 only as an assembly brick
2204.04853 (2022-04)
NEURAL LAGRANGIAN SCHR ÖDINGER BRIDGE: DIF-FUSION MODELING FOR POPULATION DYNAMICS
2209.13104 (2022-09)
A Neural Network Approach for Stochastic Optimal Control
derivTanh
brick of this paper's assembly: helper
2 other papers
2 dated earlier · 1 only as an assembly brick
2204.04853 (2022-04)
NEURAL LAGRANGIAN SCHR ÖDINGER BRIDGE: DIF-FUSION MODELING FOR POPULATION DYNAMICS
2209.13104 (2022-09)
A Neural Network Approach for Stochastic Optimal Control

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 introduce a novel one-parameter variational objective that lower bounds the data evidence and enables the estimation of approximate fractional posteriors. We extend this framework to hierarchical construction and Bayes posteriors, offering a versatile tool for probabilistic modelling. We demonstrate two cases where gradients can be obtained analytically and a simulation study on mixture models showing that our fractional posteriors can be used to achieve better calibration compared to posteriors from the conventional variational bound. When applied to variational autoencoders (VAEs), our approach attains higher evidence bounds and enables learning of high-performing approximate Bayes posteriors jointly with fractional posteriors. We show that VAEs trained with fractional posteriors produce decoders that are better aligned for generation from the prior.

For agents

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

get_harvested_code_for_paper("2603.27488")
get_code_for_paper("2603.27488")
have("2603.27488")

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

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

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

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

Connect an agent — have() is free.