SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2003.03778 · 2020

Adversarial Attacks on Probabilistic Autoregressive Forecasting Models

arXiv · PDF · Open in the Atlas

Code that ran

5 of 8 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; 1 honoured the contract we drafted, 0 violated it and 3 have no contract verdict; 1 failure of our instrument; 3 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/2003.03778.json · badge: /api/ran/2003.03778.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
eth-sri/probabilistic-forecasts-attacks canonical (classifier label)
classifier basis: census
5 ran · 3 no recorded run
FunctionStatusWhere it lives
accuracy_ND Ran
ran on a synthesized input
eth-sri/probabilistic-forecasts-attacks/Electricity/model/net.py
code served (permissive licence) · get_code("d51b8c6e3fd59038")
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 list, 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

torch.manual_seed(0)

# Create small test tensors
# mu: predicted values, labels: ground truth values
mu = torch.tensor([1.5, 0.0, 2.3, 0.0], dtype=torch.float32)
labels = torch.tensor([1.0, 0.0, 2.0, 0.0], dtype=torch.float32)

ARGS = {
    "mu": mu,
    "labels": labels,
    "relative": False,
}
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 list, ndim 1, dtype family float — a list 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
accuracy_RMSE Ran
ran on a synthesized input
eth-sri/probabilistic-forecasts-attacks/Electricity/model/net.py
code served (permissive licence) · get_code("cc1f9043d0725083")
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 list, 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 logging

logger = logging.getLogger('DeepAR.Net')

torch.manual_seed(0)

# Create small tensors for mu and labels
# mu: predicted values (2 samples, 4 time steps)
mu = torch.randn(2, 4)

# labels: ground truth values (2 samples, 4 time steps)
# Mix some zeros and non-zeros to test the zero_index masking
labels = torch.tensor([
    [1.5, 0.0, 2.3, 0.5],
    [0.0, 1.2, 0.8, 0.0]
], dtype=torch.float32)

ARGS = {
    'mu': mu,
    'labels': labels,
    'relative': False
}
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 list, ndim 1, dtype family float — a list 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
gen_covariates Ran
ran, honoured the contract we drafted
eth-sri/probabilistic-forecasts-attacks/Electricity/preprocess_elect.py
code served (permissive licence) · get_code("6444a83939c2a839")
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 float, shape (5, 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
from scipy import stats
from datetime import datetime, timedelta

# Create a small array of datetime objects
base_time = datetime(2024, 1, 15, 10, 30)
times = np.array([base_time + timedelta(days=i, hours=i) for i in range(5)])

num_covariates = 4

ARGS = {
    "times": times,
    "num_covariates": num_covariates,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — 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 float, shape (5, 4) — shape (5, 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
init_metrics Ran
ran; our contract draft was wrong, not the code
eth-sri/probabilistic-forecasts-attacks/Electricity/utils.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from xinzezhang/timeseriesforecasting-torch, is pointer only (licence: NONE) · get_code("1ac937a48e910d3d")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from xinzezhang/timeseriesforecasting-torch, and GitHub detected no licence in that repository when it was checked. 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.

loss_fn Ran
ran on a synthesized input
eth-sri/probabilistic-forecasts-attacks/Electricity/model/net.py
code served (permissive licence) · get_code("dbccb94ff0308fed")
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 0, dtype family float, shape () 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
from torch.autograd import Variable

torch.manual_seed(0)

# Create small batch tensors
batch_size = 2

# mu: estimated mean at time step t, dimension [batch_size]
mu = Variable(torch.randn(batch_size), requires_grad=True)

# sigma: estimated standard deviation at time step t, dimension [batch_size]
# Make sure sigma is positive (as it represents standard deviation)
sigma = Variable(torch.abs(torch.randn(batch_size)) + 0.1, requires_grad=True)

# labels: dimension [batch_size] - some labels with potential zeros to ignore
# Mix of zero and non-zero values to test the zero_index filtering
labels = Variable(torch.tensor([0.0, 1.5]), requires_grad=False)

ARGS = {
    "mu": mu,
    "sigma": sigma,
    "labels": labels,
}
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 0, dtype family float, shape () — shape () 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
forward_log_prob Not yet run
unverified (harvested, no recorded run)
eth-sri/probabilistic-forecasts-attacks/Electricity/attack_utils.py
code served (permissive licence) · get_code("101306807b97c594")
How it ran

no invocation recorded.

forward_model Not yet run
unverified (harvested, no recorded run)
eth-sri/probabilistic-forecasts-attacks/Electricity/attack_utils.py
code served (permissive licence) · get_code("922040fef4905880")
How it ran

no invocation recorded.

load_checkpoint Not yet run
unverified (harvested, no recorded run)
eth-sri/probabilistic-forecasts-attacks/Electricity/utils.py
code served (permissive licence) · get_code("03380687bcc38d71")
How it ran

no invocation recorded.

Also present in other papers' code

Of 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 distinct functions with an identity, 2 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 1 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
gen_covariates 1 other paper
1 later
2411.01623 (2024-11)
FilterNet: Harnessing Frequency Filters for Time Series Forecasting
init_metrics 1 other paper
1 dated earlier
1704.04110 (2017-04)
DeepAR: Probabilistic Forecasting with Autoregressive Recurrent Networks

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

We develop an effective generation of adversarial attacks on neural models that output a sequence of probability distributions rather than a sequence of single values. This setting includes the recently proposed deep probabilistic autoregressive forecasting models that estimate the probability distribution of a time series given its past and achieve state-of-the-art results in a diverse set of application domains. The key technical challenge we address is effectively differentiating through the Monte-Carlo estimation of statistics of the joint distribution of the output sequence. Additionally, we extend prior work on probabilistic forecasting to the Bayesian setting which allows conditioning on future observations, instead of only on past observations. We demonstrate that our approach can successfully generate attacks with small input perturbations in two challenging tasks where robust decision making is crucial: stock market trading and prediction of electricity consumption.

For agents

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

get_harvested_code_for_paper("2003.03778")
get_code_for_paper("2003.03778")
have("2003.03778")

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

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

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

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

Connect an agent — have() is free.