SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2310.09604 · ICCV · 2023

Learning Hierarchical Features with Joint Latent Space Energy-Based Prior

Ying Wu, Tian Han, Jiali Cui

arXiv · PDF · Open in the Atlas

Code that ran

5 of 7 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 1 has no contract verdict; 4 failures of our instrument; 2 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/2310.09604.json · badge: /api/ran/2310.09604.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
vlievin/biva-pytorch canonical (classifier label)
classifier basis: census
5 ran · 2 no recorded run
FunctionStatusWhere it lives
getConvolutionOutputShape Ran
ran; our contract draft was wrong, not the code
vlievin/biva-pytorch/biva/layers/convolution.py
code served (permissive licence) · get_code("0351aa646826d71c")
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 1, dtype family int; 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 torch
import torch.nn as nn
import numpy as np

torch.manual_seed(0)

# Create a simple 1D convolution module
conv_1d = nn.Conv1d(
    in_channels=3,
    out_channels=5,
    kernel_size=3,
    stride=1,
    padding=1,
    dilation=1
)

# Input tensor shape: (batch_size, channels, length)
# B=2, C=3 (matches in_channels), D=4
tensor_shape = (2, 3, 4)

ARGS = {
    "tensor_shape": tensor_shape,
    "conv": conv_1d
}
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, ndim 1, dtype family int — 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
getSAMEPadding Ran
ran; our contract draft was wrong, not the code
vlievin/biva-pytorch/biva/layers/convolution.py
code served (permissive licence) · get_code("2c41b7d43d938ff1")
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 torch
import torch.nn as nn
import numpy as np

torch.manual_seed(0)

# Create a simple convolution module with the required attributes
class SimpleConv(nn.Module):
    def __init__(self):
        super().__init__()
        self.kernel_size = (3, 3)
        self.padding = (1, 1)
        self.dilation = (1, 1)
        self.stride = (1, 1)
        self.transposed = False

conv = SimpleConv()

# tensor_shape should be (B, C, D1, D2, ...) where we extract [2:]
# For 2D convolution, we need (B, C, H, W) - so [2:] gives (H, W)
tensor_shape = (2, 3, 4, 5)  # Batch=2, Channels=3, Height=4, Width=5

ARGS = {
    "tensor_shape": tensor_shape,
    "conv": conv
}
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_cifar10_datasets Ran
ran; our contract draft was wrong, not the code
vlievin/biva-pytorch/biva/datasets/cifar10.py
code served (permissive licence) · get_code("c099188a5ac89e4c")
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 torch
import numpy as np
import tempfile
import os

torch.manual_seed(0)

# Create a temporary directory for the root parameter
temp_root = tempfile.mkdtemp()

# The function get_cifar10_datasets calls load_cifar which tries to download CIFAR-10.
# Since we can't do network I/O, we need to mock this by creating a minimal
# tar.gz file with the expected structure, or we accept that this will fail
# on the actual load_cifar call. However, we can set up valid arguments.

# For a minimal mock that won't actually download, we'll create a fake dataset structure
# But since the function will try to download if files don't exist, we'll just
# provide sensible arguments and let the function handle the download attempt
# (which will fail in the sandbox, but that's expected given the constraints).

# Actually, let's create a minimal mock to avoid network calls:
import tarfile
import pickle as pkl
from io import BytesIO

# Create mock CIFAR-10 data structure
mock_data = {
    b'data': np.random.rand(10, 3072).astype('float32'),
    b'labels': [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
}

# Create a temporary tar.gz file with mock data
tar_path = os.path.join(temp_root, 'cifar-10-python.tar.gz')
with tarfile.open(tar_path, 'w:gz') as tar:
    for batch_num in range(1, 6):
        batch_data = {
            b'data': np.random.rand(10, 3072).astype('float32'),
            b'labels': list(range(10))
        }
        batch_name = f'cifar-10-batches-py/data_batch_{batch_num}'
        
        # Create tar info and add data
        tarinfo = tarfile.TarInfo(name=batch_name)
        data_bytes = pkl.dumps(batch_data)
        tarinfo.size = len(data_bytes)
        tar.addfile(tarinfo, BytesIO(data_bytes))
    
    # Add test batch
    test_data = {
        b'data': np.random.rand(10, 3072).astype('float32'),
        b'labels': list(range(10))
    }
    test_name = 'cifar-10-batches-py/test_batch'
    tarinfo = tarfile.TarInfo(name=test_name)
    data_bytes = pkl.dumps(test_data)
    tarinfo.size = len(data_bytes)
    tar.addfile(tarinfo, BytesIO(data_bytes))

ARGS = {
    'root': temp_root,
    'levels': 256,
    'device': 'cpu',
    'transform': None
}
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
load_cifar Ran
ran on a synthesized input
vlievin/biva-pytorch/biva/datasets/cifar10.py
code served (permissive licence) · get_code("97fe2f8c6c7fa20d")
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 os
import pickle as pkl
import tarfile
import tempfile
import numpy as np

# Create a temporary directory and mock CIFAR-10 data
temp_dir = tempfile.mkdtemp()

# Create mock CIFAR-10 tar.gz file
dataset_path = os.path.join(temp_dir, 'cifar-10-python.tar.gz')
tar = tarfile.open(dataset_path, 'w:gz')

# Create mock batch data
def create_mock_batch(num_samples=10):
    return {
        b'data': np.random.randint(0, 256, (num_samples, 3072), dtype=np.uint8),
        b'labels': np.random.randint(0, 10, (num_samples,), dtype=int).tolist()
    }

# Create temporary directory structure inside tar
temp_extract = tempfile.mkdtemp()
batches_dir = os.path.join(temp_extract, 'cifar-10-batches-py')
os.makedirs(batches_dir, exist_ok=True)

# Create mock batch files
for i in range(1, 6):
    batch_file = os.path.join(batches_dir, f'data_batch_{i}')
    with open(batch_file, 'wb') as f:
        pkl.dump(create_mock_batch(5), f)
    tar.add(batch_file, arcname=f'cifar-10-batches-py/data_batch_{i}')

# Create mock test batch
test_file = os.path.join(batches_dir, 'test_batch')
with open(test_file, 'wb') as f:
    pkl.dump(create_mock_batch(3), f)
tar.add(test_file, arcname='cifar-10-batches-py/test_batch')

tar.close()

# Define ARGS
ARGS = {
    'root': temp_dir,
    'levels': 256,
    'with_y': False
}
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 — 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
quantisize Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
vlievin/biva-pytorch/biva/datasets/cifar10.py
code served (permissive licence) · get_code("0007bb74d458f72c")
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 2, dtype family int, 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 numpy as np

# Create small image array for quantization
images = np.random.rand(2, 4).astype('f')  # 2 images, 4 pixels each

# Set number of quantization levels
levels = 5

ARGS = {
    'images': images,
    'levels': levels
}
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 2, dtype family int, 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
get_binmnist_datasets Not yet run
unverified (harvested, no recorded run)
vlievin/biva-pytorch/biva/datasets/binmnist.py
code served (permissive licence) · get_code("72dfed13fdd6c7a8")
How it ran

no invocation recorded.

load_mnist_binarized Not yet run
unverified (harvested, no recorded run)
vlievin/biva-pytorch/biva/datasets/binmnist.py
code served (permissive licence) · get_code("8a1750623fb21b3e")
How it ran

no invocation recorded.

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 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 6 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
quantisize 2 other papers
2 dated earlier
1606.05328 (2016-06)
Conditional Image Generation with PixelCNN Decoders
1609.03499 (2016-09)
WAVENET: A GENERATIVE MODEL FOR RAW AUDIO Aäron van den Oord

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

This paper studies the fundamental problem of multilayer generator models in learning hierarchical representations. The multi-layer generator model that consists of multiple layers of latent variables organized in a top-down architecture tends to learn multiple levels of data abstraction. However, such multi-layer latent variables are typically parameterized to be Gaussian, which can be less informative in capturing complex abstractions, resulting in limited success in hierarchical representation learning. On the other hand, the energy-based (EBM) prior is known to be expressive in capturing the data regularities, but it often lacks the hierarchical structure to capture different levels of hierarchical representations. In this paper, we propose a joint latent space EBM prior model with multi-layer latent variables for effective hierarchical representation learning. We develop a variational joint learning scheme that seamlessly integrates an inference model for efficient inference. Our experiments demonstrate that the proposed joint EBM prior is effective and expressive in capturing hierarchical representations and modelling data distribution.

For agents

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

get_harvested_code_for_paper("2310.09604")
get_code_for_paper("2310.09604")
have("2310.09604")

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

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

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

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

Connect an agent — have() is free.