SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2005.08392 · 2020

Vector-Quantized Autoregressive Predictive Coding

arXiv · PDF · Open in the Atlas

Code that ran

7 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 4 have no contract verdict; 3 failures of our instrument; 0 no recorded run), measured 2026-11-21; 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/2005.08392.json · badge: /api/ran/2005.08392.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
Alexander-H-Liu/NPC community (classifier label)
classifier basis not recorded on the link
4 ran · 0 no recorded run
copy not recorded community
not in the paper's declared repositories
3 ran · 0 no recorded run
FunctionStatusWhere it lives
cal_per Ran
ran on a synthesized input
Alexander-H-Liu/NPC/src/util.py
code served (permissive licence) · get_code("4f53cc640f59b81c")
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 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 torch
import torch.nn as nn

torch.manual_seed(0)

# Create pred: logits tensor with shape (batch_size, num_classes, seq_len)
# The function calls pred.argmax(dim=1), so we need at least 2 dimensions
# Shape: (batch=2, num_classes=4, seq_len=3)
pred = torch.randn(2, 4, 3)

# Create label: ground truth token indices with shape (batch=2, seq_len=3)
label = torch.randint(0, 4, (2, 3))

# Create seq_len: list of actual sequence lengths for each batch element
seq_len = [2, 3]

ARGS = {
    "pred": pred,
    "label": label,
    "seq_len": seq_len,
}
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 tuple, ndim 1, 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
create_dataset Ran
ran on a synthesized input
Alexander-H-Liu/NPC/src/data.py
code served (permissive licence) · get_code("fd9e78e76cb79d91")
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 sys
from pathlib import Path

torch.manual_seed(0)

# Create a minimal stand-in dataset class
class MockDSet:
    def __init__(self, path, split):
        self.path = path
        self.split = split
        # Simulate a dataset with some samples
        self._data = [(torch.randn(2, 4), torch.randint(0, 2, (2,))) for _ in range(5)]
    
    def __len__(self):
        return len(self._data)
    
    def __getitem__(self, idx):
        return self._data[idx]

# Create a minimal collect_batch function
def mock_collect_batch(batch):
    """Collate batch of samples"""
    xs = torch.stack([x for x, y in batch])
    ys = torch.stack([y for x, y in batch])
    return xs, ys

# Create a mock dataset module that will be importable
class MockDatasetModule:
    DSet = MockDSet
    collect_batch = mock_collect_batch

# Inject the mock module into sys.modules so __import__ can find it
sys.modules['dataset.mockdataset'] = MockDatasetModule()

# Create a mock split class with __str__ method
class MockSplit:
    def __init__(self, name):
        self.name = name
    
    def __str__(self):
        return self.name

# Define arguments for create_dataset
ARGS = {
    'name': 'mockdataset',
    'path': '/tmp/mock_data',
    'batch_size': 32,
    'audio_max_frames': 1000,
    'train_split': MockSplit('train'),
    'dev_split': MockSplit('dev'),
    'test_split': MockSplit('test')
}
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 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
draw Ran
ran on a synthesized input
Alexander-H-Liu/NPC/src/util.py
code served (permissive licence) · get_code("db0929d572d1fd1c")
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 matplotlib.pyplot as plt

torch.manual_seed(0)

# Create test data for the non-histogram case
# The function expects a tensor that will be detached, moved to CPU, converted to numpy, and transposed
# After transpose, it will be displayed with imshow
test_tensor = torch.randn(4, 3)  # Small 2D tensor

# Create test data for the histogram case
test_histogram_data = np.array([1.5, 2.3, 0.8, 3.2, 1.1])  # Small 1D array for histogram

ARGS = {
    "data": test_tensor,
    "hist": False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
matplotlib, 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
gumbel_softmax Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
this paper's copy was not recorded; identical code first harvested from iamyuanchung/VQ-APC
pointer only; the stored copy get_code serves, from iamyuanchung/VQ-APC, is pointer only (licence: NONE) · get_code("4763872bbaf3ab60")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. 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.

gumbel_softmax_sample Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
this paper's copy was not recorded; identical code first harvested from iamyuanchung/VQ-APC
pointer only; the stored copy get_code serves, from iamyuanchung/VQ-APC, is pointer only (licence: NONE) · get_code("4650349b06b3d90f")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. 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.

human_format Ran
ran on a synthesized input
Alexander-H-Liu/NPC/src/util.py
code served (permissive licence) · get_code("7018e387e45bfc5a")
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 str. 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

# Analyze the function: human_format takes a single parameter 'num'
# The function expects a number (int or float) that will be divided by 1000
# and formatted with magnitude suffixes (K, M, G, T, P)

# Test with a large number to see the formatting in action
num_value = 1500000  # 1.5 million, should format as "1.5M"

ARGS = {
    'num': num_value
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
sample_gumbel Ran
ran; our contract draft was wrong, not the code
this paper's copy was not recorded; identical code first harvested from iamyuanchung/VQ-APC
pointer only; the stored copy get_code serves, from iamyuanchung/VQ-APC, is pointer only (licence: NONE) · get_code("cec667e77fe8894d")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. 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.

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, 3 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 0 the same month, 3 later) and 4 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
gumbel_softmax_sample 7 other papers
2 dated earlier, 5 later
1904.03240 (2019-04)
An Unsupervised Autoregressive Model for Speech Representation Learning
1906.08862 (2019-06)
Neural Stored-program Memory
2007.00631 (2020-07)
Causal Discovery in Physical Systems from Videos
and 4 more not named here
sample_gumbel 3 other papers
2 dated earlier, 1 later
1904.03240 (2019-04)
An Unsupervised Autoregressive Model for Speech Representation Learning
1906.08862 (2019-06)
Neural Stored-program Memory
2007.06028 (2020-07)
TERA: Self-Supervised Learning of Transformer Encoder Representation for Speech
gumbel_softmax 2 other papers
1 dated earlier, 1 later
1904.03240 (2019-04)
An Unsupervised Autoregressive Model for Speech Representation Learning
2007.06028 (2020-07)
TERA: Self-Supervised Learning of Transformer Encoder Representation for Speech

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-21.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Autoregressive Predictive Coding (APC), as a self-supervised objective, has enjoyed success in learning representations from large amounts of unlabeled data, and the learned representations are rich for many downstream tasks. However, the connection between low self-supervised loss and strong performance in downstream tasks remains unclear. In this work, we propose Vector-Quantized Autoregressive Predictive Coding (VQ-APC), a novel model that produces quantized representations, allowing us to explicitly control the amount of information encoded in the representations. By studying a sequence of increasingly limited models, we reveal the constituents of the learned representations. In particular, we confirm the presence of information with probing tasks, while showing the absence of information with mutual information, uncovering the model's preference in preserving speech information as its capacity becomes constrained. We find that there exists a point where phonetic and speaker information are amplified to maximize a self-supervised objective. As a byproduct, the learned codes for a particular model capacity correspond well to English phones.

For agents

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

get_harvested_code_for_paper("2005.08392")
get_code_for_paper("2005.08392")
have("2005.08392")

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

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

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

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

Connect an agent — have() is free.