SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2411.01006 · NeurIPS · 2024

Abstracted Shapes as Tokens -A Generalizable and Interpretable Model for Time-series Classification

Lam Nguyen, Tengfei Ma, Tsui-Wei Weng, Yunshi Wen, Anak Agung

arXiv · PDF · Open in the Atlas

Code that ran

12 of 18 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 8 have no contract verdict; 4 failures of our instrument; 6 no recorded run); 1 of them was also run on the host, not in the jail, by the peer-agreement lane that set its level, 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/2411.01006.json · badge: /api/ran/2411.01006.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
yunshiwen/vqshape canonical (classifier label)
classifier basis: classifier_2025
12 ran · 6 no recorded run
FunctionStatusWhere it lives
onehot_straight_through Ran
ran; our contract draft was wrong, not the code
yunshiwen/vqshape/vqshape/model.py
code served (permissive licence) · get_code("0462bc29ff41ba2c")
How it ran

Ran in Syntology's jail on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) 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. The comparison behind this sample's level is a different run: the peer-agreement lane ran it again on the host, not in the jail (report dated 2026-09-04T22:20:54Z). 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)

# The function takes a single parameter 'p' which is a torch.Tensor
# It performs argmax on the last dimension, creates one-hot encoding,
# and applies straight-through estimator trick
# p should have shape (batch_size, num_classes) or similar with a last dimension

# Create a small tensor with batch size 2 and 4 classes
p = torch.randn(2, 4, requires_grad=True)

ARGS = {
    "p": p
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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
AttributeDecoder Ran
ran on a synthesized input
yunshiwen/vqshape/vqshape/model.py
code served (permissive licence) · get_code("07c547332969851f")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) 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

INIT_ARGS = {
    "dim_code": 256,
    "dim_embedding": 256,
}

ARGS = {
    "x": torch.randn(2, 256),
}
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
AttributeEncoder Ran
ran on a synthesized input
yunshiwen/vqshape/vqshape/model.py
code served (permissive licence) · get_code("c4db2f888133a643")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 2, dtype family float, shape (2, 128) 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

class AttributeEncoder(nn.Module):
    """
    Encode shape attributes into embeddings
    """

    def __init__(self, dim_code: int=256, dim_embedding: int=256) -> None:
        super().__init__()
        self.project = nn.Linear(dim_code + 4, dim_embedding)

    def forward(self, z, t, l, mu, sigma):
        return self.project(torch.cat([z, mu, sigma, t, l], dim=-1))


INIT_ARGS = {
    'dim_code': 256,
    'dim_embedding': 128,
}

ARGS = {
    'z': torch.randn(2, 256),
    't': torch.randn(2, 1),
    'l': torch.randn(2, 1),
    'mu': torch.randn(2, 1),
    'sigma': torch.randn(2, 1),
}

if __name__ == '__main__':
    encoder = AttributeEncoder(**INIT_ARGS)
    output = encoder(**ARGS)
    print(f"Output shape: {output.shape}")
    print(f"Expected shape: (2, 128)")
    assert output.shape == (2, 128), f"Shape mismatch: {output.shape}"
    print("Test passed!")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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, 128) — shape (2, 128) 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
EuclCodebook Ran
ran on a synthesized input
yunshiwen/vqshape/vqshape/model.py
code served (permissive licence) · get_code("5b9a3f45827f6480")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) 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
from einops import rearrange, repeat

def entropy(prob):
    return (-prob * log(prob)).sum(dim=-1)

def log(t, eps=1e-05):
    return t.clamp(min=eps).log()

class EuclCodebook(nn.Module):

    def __init__(self, num_code: int=512, dim_code: int=256, commit_loss=1.0, entropy_loss=0.0, entropy_gamma=1.0):
        super().__init__()
        self.num_codebook_vectors = num_code
        self.latent_dim = dim_code
        self.commit_loss = commit_loss
        self.entropy_loss = entropy_loss
        self.entropy_gamma = entropy_gamma
        self.embedding = nn.Embedding(self.num_codebook_vectors, self.latent_dim)
        self.embedding.weight.data.uniform_(-1.0 / self.num_codebook_vectors, 1.0 / self.num_codebook_vectors)

    def forward(self, z):
        z_flattened = rearrange(z, 'B L E -> (B L) E')
        d = torch.sum(z_flattened ** 2, dim=1, keepdim=True) + torch.sum(self.embedding.weight ** 2, dim=1) - 2 * torch.matmul(z_flattened, self.embedding.weight.t())
        min_encoding_indices = torch.argmin(d, dim=1)
        z_q = rearrange(self.embedding(min_encoding_indices), '(B L) E -> B L E', B=z.shape[0])
        loss = torch.mean((z_q.detach() - z) ** 2) + self.commit_loss * torch.mean((z_q - z.detach()) ** 2)
        z_q = z + (z_q - z).detach()
        min_encoding_indices = rearrange(min_encoding_indices, '(B L) -> B L', B=z.shape[0])
        if self.entropy_loss > 0:
            p = nn.functional.softmin(d / 0.01, dim=-1)
            entropy_loss = entropy(p).mean() - self.entropy_gamma * entropy(p.mean(0))
            loss += self.entropy_loss * entropy_loss
        return (z_q, min_encoding_indices, loss)

INIT_ARGS = {
    'num_code': 16,
    'dim_code': 4,
    'commit_loss': 1.0,
    'entropy_loss': 0.0,
    'entropy_gamma': 1.0,
}

ARGS = {
    'z': torch.randn(2, 3, 4),
}

if __name__ == '__main__':
    model = EuclCodebook(**INIT_ARGS)
    z_q, min_encoding_indices, loss = model(**ARGS)
    print(f"z_q shape: {z_q.shape}")
    print(f"min_encoding_indices shape: {min_encoding_indices.shape}")
    print(f"loss: {loss}")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
einops, 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
MLP Ran
ran on a synthesized input
yunshiwen/vqshape/vqshape/model.py
code served (permissive licence) · get_code("4f99f2fed9cb5821")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 2, dtype family float, shape (2, 3) 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

class MLP(nn.Module):

    def __init__(self, input_dim, output_dim, hidden_dim=256):
        super().__init__()
        self.layers = nn.Sequential(nn.Linear(input_dim, hidden_dim), nn.ReLU(), nn.Linear(hidden_dim, output_dim))

    def forward(self, x):
        return self.layers(x)


INIT_ARGS = {
    'input_dim': 4,
    'output_dim': 3,
    'hidden_dim': 8,
}

ARGS = {
    'x': torch.randn(2, 4),
}

if __name__ == '__main__':
    model = MLP(**INIT_ARGS)
    output = model(**ARGS)
    print(f"Output shape: {output.shape}")
    print(f"Output: {output}")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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, 3) — shape (2, 3) 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
PatchDecoder Ran
ran on a synthesized input
yunshiwen/vqshape/vqshape/model.py
code served (permissive licence) · get_code("c073a1bdab0b3a17")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) 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
from einops import rearrange, repeat

class PatchDecoder(nn.Module):

    def __init__(self, dim_embedding: int=256, patch_size: int=8, num_head: int=6, num_layer: int=6):
        super().__init__()
        self.patch_size = patch_size
        encoder_layer = nn.TransformerEncoderLayer(d_model=dim_embedding, nhead=num_head, dropout=0.1, dim_feedforward=dim_embedding * 4, activation='gelu', batch_first=True)
        self.transformer = nn.TransformerEncoder(encoder_layer=encoder_layer, num_layers=num_layer)
        self.out_layer = nn.Linear(dim_embedding, patch_size)
        self.cls_token = nn.Parameter(torch.randn(1, 1, dim_embedding) / dim_embedding)

    def forward(self, x):
        x = torch.cat([repeat(self.cls_token, '1 1 E -> B 1 E', B=x.shape[0]), x], dim=1)
        out = self.transformer(x)
        x_hat = rearrange(self.out_layer(out[:, 1:, :]), 'B L E -> B (L E)')
        return (x_hat, out[:, 0, :])


INIT_ARGS = {
    'dim_embedding': 4,
    'patch_size': 3,
    'num_head': 2,
    'num_layer': 2,
}

ARGS = {
    'x': torch.randn(2, 5, 4),
}

if __name__ == '__main__':
    model = PatchDecoder(**INIT_ARGS)
    x_hat, cls_out = model(**ARGS)
    print(f"x_hat shape: {x_hat.shape}")
    print(f"cls_out shape: {cls_out.shape}")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
einops, 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
PositionalEmbedding Ran
ran on a synthesized input
yunshiwen/vqshape/vqshape/model.py
code served (permissive licence) · get_code("511d90614af70052")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 3, dtype family float, shape (2, 8, 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

class PositionalEmbedding(nn.Module):

    def __init__(self, max_seq_length, embedding_dim):
        super().__init__()
        self.positional_embeddings = nn.Embedding(max_seq_length, embedding_dim)

    def forward(self, x):
        position_indices = torch.arange(0, x.size(1)).long().unsqueeze(0).to(x.device)
        pos_embeddings = self.positional_embeddings(position_indices)
        return pos_embeddings + x


INIT_ARGS = {
    'max_seq_length': 8,
    'embedding_dim': 4,
}

ARGS = {
    'x': torch.randn(2, 8, 4),
}

if __name__ == '__main__':
    model = PositionalEmbedding(**INIT_ARGS)
    output = model(**ARGS)
    print(f"Output shape: {output.shape}")
    print(f"Output:\n{output}")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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 3, dtype family float, shape (2, 8, 4) — shape (2, 8, 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
ShapeDecoder Ran
ran on a synthesized input
yunshiwen/vqshape/vqshape/model.py
code served (permissive licence) · get_code("65ebfe790d7d756a")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) 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
from einops import rearrange, repeat
from einops.layers.torch import Rearrange

class ResidualBlock(nn.Module):

    def __init__(self, in_channels, out_channels, kernel_size=3):
        super(ResidualBlock, self).__init__()
        self.in_channels = in_channels
        self.out_channels = out_channels
        self.block = nn.Sequential(nn.GroupNorm(16, in_channels), nn.GELU(), nn.Conv1d(in_channels, out_channels, kernel_size, 1, padding='same'), nn.GroupNorm(16, out_channels), nn.GELU(), nn.Conv1d(out_channels, out_channels, kernel_size, 1, padding='same'))
        if in_channels != out_channels:
            self.channel_up = nn.Conv1d(in_channels, out_channels, 1, 1)

    def forward(self, x):
        if self.in_channels != self.out_channels:
            return self.channel_up(x) + self.block(x)
        else:
            return x + self.block(x)

class UpSampleBlock(nn.Module):

    def __init__(self, channels, kernal_size=3, scale_factor=2.0):
        super().__init__()
        self.scale_factor = scale_factor
        self.conv = nn.Conv1d(channels, channels, kernal_size, 1, padding='same')

    def forward(self, x):
        x = nn.functional.interpolate(x, scale_factor=self.scale_factor)
        return self.conv(x)

class ShapeDecoder(nn.Module):

    def __init__(self, dim_embedding, dim_output, out_kernel_size=3):
        super().__init__()
        self.layers = nn.Sequential(nn.Linear(dim_embedding, dim_output * 8), Rearrange('B L (C T) -> (B L) C T', C=128), ResidualBlock(128, 128), nn.GELU(), UpSampleBlock(128, scale_factor=4), ResidualBlock(128, 64), nn.GELU(), UpSampleBlock(64, scale_factor=4), nn.GELU(), nn.Conv1d(64, 1, out_kernel_size, 1, padding='same'))

    def forward(self, x):
        x = rearrange(self.layers(x), '(B L) C T -> B L C T', B=x.shape[0]).squeeze(2)
        x_mean = x.mean(dim=-1, keepdim=True)
        x_std = x.std(dim=-1, keepdim=True)
        return ((x - x_mean) / (x_std + 1e-08), x_mean, x_std)

INIT_ARGS = {
    'dim_embedding': 4,
    'dim_output': 16,
    'out_kernel_size': 3,
}

ARGS = {
    'x': torch.randn(2, 3, 4),
}

if __name__ == '__main__':
    model = ShapeDecoder(**INIT_ARGS)
    output = model(**ARGS)
    print("Output shapes:")
    print(f"  Normalized: {output[0].shape}")
    print(f"  Mean: {output[1].shape}")
    print(f"  Std: {output[2].shape}")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
einops, 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
Tokenizer Ran
ran on a synthesized input
yunshiwen/vqshape/vqshape/model.py
code served (permissive licence) · get_code("5b84e11d45ccaa5b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 3, dtype family float, shape (2, 3, 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
from einops import rearrange, repeat

class Tokenizer(nn.Module):

    def __init__(self, dim_embedding: int=256, num_token: int=32, num_head: int=6, num_layer: int=6):
        super().__init__()
        self.tokens = nn.Parameter(torch.randn(1, num_token, dim_embedding) / dim_embedding)
        decoder_layer = nn.TransformerDecoderLayer(d_model=dim_embedding, nhead=num_head, dropout=0.1, dim_feedforward=dim_embedding * 4, activation='gelu', batch_first=True)
        self.transformer = nn.TransformerDecoder(decoder_layer=decoder_layer, num_layers=num_layer)

    def forward(self, x, memory_mask=None):
        return self.transformer(repeat(self.tokens, '1 n d -> b n d', b=x.shape[0]), x, memory_key_padding_mask=memory_mask)


INIT_ARGS = {
    'dim_embedding': 4,
    'num_token': 3,
    'num_head': 2,
    'num_layer': 2,
}

ARGS = {
    'x': torch.randn(2, 5, 4),
    'memory_mask': None,
}

if __name__ == '__main__':
    tokenizer = Tokenizer(**INIT_ARGS)
    output = tokenizer(**ARGS)
    print(f"Output shape: {output.shape}")
    print(f"Expected shape: (2, 3, 4)")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
einops, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 3, dtype family float, shape (2, 3, 4) — shape (2, 3, 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
entropy Ran
ran; our contract draft was wrong, not the code
yunshiwen/vqshape/vqshape/model.py
code served (permissive licence) · get_code("2a8f2551e933d3c4")
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) 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

torch.manual_seed(0)

def log(t, eps=1e-05):
    return t.clamp(min=eps).log()

def entropy(prob):
    return (-prob * log(prob)).sum(dim=-1)

# Create a small probability tensor
# Shape: (batch_size=2, num_classes=4)
# Values should be valid probabilities (sum to 1 along last dim)
prob_tensor = torch.tensor([
    [0.4, 0.3, 0.2, 0.1],
    [0.25, 0.25, 0.25, 0.25]
], dtype=torch.float32)

ARGS = {
    "prob": prob_tensor
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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
log Ran
ran; our contract draft was wrong, not the code
yunshiwen/vqshape/vqshape/model.py
code served (permissive licence) · get_code("7d6c3243647c53d9")
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) 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 takes a tensor `t` and an optional `eps` parameter
# It clamps the tensor to a minimum value of eps, then takes the log
# We need to provide a tensor with values that can be clamped and logged

t = torch.tensor([[0.5, 1.0, 2.0, 0.1],
                   [0.01, 3.0, 0.5, 1.5]], dtype=torch.float32)

eps = 1e-05

ARGS = {
    "t": t,
    "eps": eps
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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
moving_average Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
yunshiwen/vqshape/vqshape/model.py
code served (permissive licence) · get_code("9ba464786de3ce24")
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) and returned Tensor, ndim 3, dtype family float, shape (2, 4, 8) 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 small input tensor with shape (B, C, T)
# B=2 (batch), C=4 (channels), T=8 (time steps)
x = torch.randn(2, 4, 8)

# Window size for the moving average
window_size = 3

ARGS = {
    "x": x,
    "window_size": window_size,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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 3, dtype family float, shape (2, 4, 8) — shape (2, 4, 8) 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
PatchEncoder Not yet run
unverified (harvested, no recorded run)
yunshiwen/vqshape/vqshape/model.py
code served (permissive licence) · get_code("345197a2330f9431")
How it ran

no invocation recorded.

ResidualBlock Not yet run
unverified (harvested, no recorded run)
yunshiwen/vqshape/vqshape/model.py
code served (permissive licence) · get_code("23c0d2db4c5b56e1")
How it ran

no invocation recorded.

UpSampleBlock Not yet run
unverified (harvested, no recorded run)
yunshiwen/vqshape/vqshape/model.py
code served (permissive licence) · get_code("057e558f53ab6bba")
How it ran

no invocation recorded.

VQShape Not yet run
unverified (harvested, no recorded run)
yunshiwen/vqshape/vqshape/model.py
code served (permissive licence) · get_code("7ced24bd1f8d6650")
How it ran

no invocation recorded.

eucl_sim_loss Not yet run
unverified (harvested, no recorded run)
yunshiwen/vqshape/vqshape/model.py
code served (permissive licence) · get_code("93736ff984d5e424")
How it ran

no invocation recorded.

extract_subsequence Not yet run
unverified (harvested, no recorded run)
yunshiwen/vqshape/vqshape/model.py
code served (permissive licence) · get_code("2d81b1059ee3e8b9")
How it ran

no invocation recorded.

Also present in other papers' code

Of 18 samples lifted from this paper's linked repositories, 18 carry a function identity and 0 do not. Of the 18 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 18 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.

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

In time-series analysis, many recent works seek to provide a unified view and representation for time-series across multiple domains, leading to the development of foundation models for time-series data. Despite diverse modeling techniques, existing models are black boxes and fail to provide insights and explanations about their representations. In this paper, we present VQShape, a pre-trained, generalizable, and interpretable model for time-series representation learning and classification. By introducing a novel representation for time-series data, we forge a connection between the latent space of VQShape and shape-level features. Using vector quantization, we show that time-series from different domains can be described using a unified set of low-dimensional codes, where each code can be represented as an abstracted shape in the time domain. On classification tasks, we show that the representations of VQShape can be utilized to build interpretable classifiers, achieving comparable performance to specialist models. Additionally, in zero-shot learning, VQShape and its codebook can generalize to previously unseen datasets and domains that are not included in the pre-training process. The code and pre-trained weights are available at https://github.com/YunshiWen/ VQShape.

For agents

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

get_harvested_code_for_paper("2411.01006")
get_code_for_paper("2411.01006")
have("2411.01006")

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

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

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

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

Connect an agent — have() is free.