SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2202.02691 · 2022

TTS-GAN: A Transformer-based Time-Series Generative Adversarial Network

arXiv · PDF · Open in the Atlas

Code that ran

2 of 2 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 0 have no contract verdict; 2 failures of our instrument; 0 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/2202.02691.json · badge: /api/ran/2202.02691.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
imics-lab/tts-gan canonical (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
imics-lab/tts-cgan reimplementation (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
FunctionStatusWhere it lives
gen_plot Ran
ran; our contract draft was wrong, not the code
imics-lab/tts-cgan/trainCGAN.py
code served (permissive licence) · get_code("c1c301618f811cb2")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned BytesIO. 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)

class SimpleGenerator(nn.Module):
    def __init__(self):
        super(SimpleGenerator, self).__init__()
        # The function calls gen_net(fake_noise, fake_label)
        # fake_noise shape: (1, 100)
        # fake_label shape: (1,)
        # Output is accessed as fake_sigs[0][0][0][:]
        # So output shape needs to be at least (1, 1, 1, some_length)
        self.fc = nn.Linear(101, 50)  # 100 noise + 1 label
        
    def forward(self, noise, label):
        # noise: (batch, 100)
        # label: (batch,)
        label_expanded = label.float().unsqueeze(1)  # (batch, 1)
        x = torch.cat([noise, label_expanded], dim=1)  # (batch, 101)
        x = self.fc(x)  # (batch, 50)
        # Reshape to (batch, 1, 1, 50) to match indexing pattern [0][0][0][:]
        x = x.view(x.size(0), 1, 1, -1)
        return x

gen_net = SimpleGenerator()
epoch = 5

ARGS = {
    'gen_net': gen_net,
    'epoch': epoch
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
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 BytesIO — a BytesIO 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
gen_plot Ran
ran; our contract draft was wrong, not the code
imics-lab/tts-gan/train_GAN.py
code served (permissive licence) · get_code("5c2962fcbaeb13c2")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned BytesIO. 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)

# The function calls gen_net(fake_noise) where fake_noise has shape (1, 100)
# The output is expected to have shape that can be indexed as [0][0][0][:], [0][1][0][:], [0][2][0][:]
# This suggests output shape is (batch=1, channels=3, height=1, width=signal_length)

class SimpleGenerator(nn.Module):
    def __init__(self):
        super(SimpleGenerator, self).__init__()
        # Input: (batch, 100)
        # Output: (batch, 3, 1, signal_length)
        # Let's make signal_length = 50 for a small example
        self.fc = nn.Linear(100, 3 * 1 * 50)
        
    def forward(self, x):
        # x shape: (batch, 100)
        out = self.fc(x)
        # Reshape to (batch, 3, 1, 50)
        out = out.view(-1, 3, 1, 50)
        return out

gen_net = SimpleGenerator()
epoch = 5
class_name = "TestClass"

ARGS = {
    "gen_net": gen_net,
    "epoch": epoch,
    "class_name": class_name
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
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 BytesIO — a BytesIO 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

Also present in other papers' code

Of 2 samples lifted from this paper's linked repositories, 2 carry a function identity and 0 do not. Of the 2 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 2 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

Signal measurements appearing in the form of time series are one of the most common types of data used in medical machine learning applications. However, such datasets are often small, making the training of deep neural network architectures ineffective. For time-series, the suite of data augmentation tricks we can use to expand the size of the dataset is limited by the need to maintain the basic properties of the signal. Data generated by a Generative Adversarial Network (GAN) can be utilized as another data augmentation tool. RNN-based GANs suffer from the fact that they cannot effectively model long sequences of data points with irregular temporal relations. To tackle these problems, we introduce TTS-GAN, a transformer-based GAN which can successfully generate realistic synthetic time-series data sequences of arbitrary length, similar to the real ones. Both the generator and discriminator networks of the GAN model are built using a pure transformer encoder architecture. We use visualizations and dimensionality reduction techniques to demonstrate the similarity of real and generated time-series data. We also compare the quality of our generated data with the best existing alternative, which is an RNN-based time-series GAN.

For agents

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

get_harvested_code_for_paper("2202.02691")
get_code_for_paper("2202.02691")
have("2202.02691")

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

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

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

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

Connect an agent — have() is free.