SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2402.05933 · 2024

Time Series Diffusion in the Frequency Domain

arXiv · PDF · Open in the Atlas

Code that ran

5 of 5 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; 5 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/2402.05933.json · badge: /api/ran/2402.05933.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
jonathancrabbe/fourierdiffusion canonical (classifier label)
classifier basis: census
5 ran · 0 no recorded run
FunctionStatusWhere it lives
collate_batch Ran
ran; our contract draft was wrong, not the code
jonathancrabbe/fourierdiffusion/src/fdiff/utils/dataclasses.py
code served (permissive licence) · get_code("bf025271edf6bc86")
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 DiffusableBatch. 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

torch.manual_seed(0)

# Create a list of dictionaries with required keys
data = [
    {
        'X': torch.randn(4, 3),  # Feature tensor: batch_size=1, features=4
        'y': torch.randint(0, 2, (3,)),  # Label tensor
        'timestep': torch.tensor([1])  # Timestep tensor
    },
    {
        'X': torch.randn(4, 3),  # Feature tensor: batch_size=1, features=4
        'y': torch.randint(0, 2, (3,)),  # Label tensor
        'timestep': torch.tensor([2])  # Timestep tensor
    }
]

ARGS = {
    'data': data
}
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 DiffusableBatch — a DiffusableBatch output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DiffusableBatch 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
dft Ran
ran; our contract draft was wrong, not the code
jonathancrabbe/fourierdiffusion/src/fdiff/utils/fourier.py
code served (permissive licence) · get_code("2821a8fe8a3ba092")
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 3, dtype family float, shape (2, 4, 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

torch.manual_seed(0)

# Create a small valid input tensor
# Shape: (batch_size=2, max_len=4, n_channels=3)
x = torch.randn(2, 4, 3)

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 3, dtype family float, shape (2, 4, 3) — shape (2, 4, 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: none by the harness; any seed is in the setup block
flatten_config Ran
ran; our contract draft was wrong, not the code
jonathancrabbe/fourierdiffusion/src/fdiff/utils/extraction.py
code served (permissive licence) · get_code("b7cb25be208cdd38")
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 dict. 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.

from omegaconf import DictConfig, OmegaConf

# Test case 1: Simple dict config
simple_dict = {
    'learning_rate': 0.001,
    'batch_size': 32,
    'epochs': 10
}

# Test case 2: DictConfig with nested dicts
nested_config = OmegaConf.create({
    'model': {
        '_target_': 'my.module.MyModel',
        'hidden_dim': 128,
        'num_layers': 2
    },
    'optimizer': {
        '_target_': 'torch.optim.Adam',
        'lr': 0.001,
        'betas': [0.9, 0.999]
    },
    'training': {
        'epochs': 100,
        'batch_size': 64
    }
})

# Test case 3: Config with lists of dicts
config_with_list = OmegaConf.create({
    'schedulers': [
        {
            '_target_': 'torch.optim.lr_scheduler.StepLR',
            'step_size': 10
        },
        {
            '_target_': 'torch.optim.lr_scheduler.ExponentialLR',
            'gamma': 0.1
        }
    ],
    'augmentations': [
        {'type': 'rotate', 'angle': 45},
        {'type': 'flip', 'prob': 0.5}
    ],
    'seed': 42
})

# Test case 4: Mixed nested structure
complex_config = OmegaConf.create({
    'data': {
        'train_path': '/data/train',
        'val_path': '/data/val',
        'loaders': [
            {'_target_': 'torch.utils.data.DataLoader', 'num_workers': 4},
            {'_target_': 'torch.utils.data.DataLoader', 'num_workers': 2}
        ]
    },
    'experiment': {
        'name': 'exp_001',
        'debug': False,
        'params': {
            '_target_': 'my.utils.Params',
            'value': 123
        }
    }
})

ARGS = {
    'cfg': nested_config
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
omegaconf — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
idft Ran
ran; our contract draft was wrong, not the code
jonathancrabbe/fourierdiffusion/src/fdiff/utils/fourier.py
code served (permissive licence) · get_code("7ad46eda17953369")
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 3, dtype family float, shape (2, 8, 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 math

torch.manual_seed(0)

# Construct a valid input tensor for the idft function
# The function expects shape (batch_size, max_len, n_channels)
# where max_len is the total length of the DFT representation
# The input is split into real and imaginary parts along dimension 1

batch_size = 2
n_channels = 3
max_len = 8  # Must be even or odd to test both cases

# Create input tensor with shape (batch_size, max_len, n_channels)
# The first half contains real parts, second half contains imaginary parts
x = torch.randn(batch_size, max_len, n_channels, dtype=torch.float32)

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 3, dtype family float, shape (2, 8, 3) — shape (2, 8, 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: none by the harness; any seed is in the setup block
spectral_density Ran
ran; our contract draft was wrong, not the code
jonathancrabbe/fourierdiffusion/src/fdiff/utils/fourier.py
code served (permissive licence) · get_code("190ed88b2229ba56")
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 3, dtype family float, shape (2, 3, 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 math

torch.manual_seed(0)

# Create a small time series tensor
# Shape: (batch_size=2, max_len=4, n_channels=3)
x = torch.randn(2, 4, 3)

# Create ARGS dict with all parameters for spectral_density
ARGS = {
    "x": x,
    "apply_dft": True,
}
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 3, dtype family float, shape (2, 3, 3) — shape (2, 3, 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: none by the harness; any seed is in the setup block

Also present in other papers' code

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

Fourier analysis has been an instrumental tool in the development of signal processing. This leads us to wonder whether this framework could similarly benefit generative modelling. In this paper, we explore this question through the scope of time series diffusion models. More specifically, we analyze whether representing time series in the frequency domain is a useful inductive bias for score-based diffusion models. By starting from the canonical SDE formulation of diffusion in the time domain, we show that a dual diffusion process occurs in the frequency domain with an important nuance: Brownian motions are replaced by what we call mirrored Brownian motions, characterized by mirror symmetries among their components. Building on this insight, we show how to adapt the denoising score matching approach to implement diffusion models in the frequency domain. This results in frequency diffusion models, which we compare to canonical time diffusion models. Our empirical evaluation on real-world datasets, covering various domains like healthcare and finance, shows that frequency diffusion models better capture the training distribution than time diffusion models. We explain this observation by showing that time series from these datasets tend to be more localized in the frequency domain than in the time domain, which makes them easier to model in the former case. All our observations point towards impactful synergies between Fourier analysis and diffusion models.

For agents

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

get_harvested_code_for_paper("2402.05933")
get_code_for_paper("2402.05933")
have("2402.05933")

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

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

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

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

Connect an agent — have() is free.