SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2410.10502 · 2024

A Practical Approach to Causal Inference over Time

arXiv · PDF · Open in the Atlas

Code that ran

13 of 15 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 0 have no contract verdict; 12 failures of our instrument; 2 no recorded run), measured 2026-11-23; 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/2410.10502.json · badge: /api/ran/2410.10502.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
marti5ini/ci-over-time canonical (classifier label)
classifier basis: census
13 ran · 2 no recorded run
FunctionStatusWhere it lives
add_memory Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
marti5ini/ci-over-time/src/generation/setup_simulation.py
code served (permissive licence) · get_code("482ed46f536d1718")
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 (4, 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

# Create a small matrix (4x4)
matrix = np.array([
    [1.0, 2.0, 3.0, 4.0],
    [5.0, 6.0, 7.0, 8.0],
    [9.0, 10.0, 11.0, 12.0],
    [13.0, 14.0, 15.0, 16.0]
], dtype=np.float32)

# Create a list of memory coefficients (3 coefficients for the first 3 diagonal elements)
memory_coeff_list = [0.1, 0.2, 0.3]

ARGS = {
    "matrix": matrix,
    "memory_coeff_list": memory_coeff_list
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — 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 (4, 4) — shape (4, 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
additive_intervention Ran
ran, honoured the contract we drafted
marti5ini/ci-over-time/src/CausalVAR/interventions.py
code served (permissive licence) · get_code("1df119d1bb4071d5")
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 statsmodels.tsa.vector_ar.svar_model import SVARProcess
from numpy.linalg import inv

# Create a minimal SVAR process
# We need to construct one that has the required attributes:
# - A_solve: matrix for solving
# - _char_mat: characteristic matrix
# - svar_ma_rep(maxn): method that returns MA representation

class MinimalSVARProcess:
    def __init__(self, n_vars=4):
        self.n_vars = n_vars
        # A_solve should be invertible
        self.A_solve = np.eye(n_vars) * 0.9 + np.random.RandomState(42).randn(n_vars, n_vars) * 0.1
        # _char_mat is a characteristic matrix
        self._char_mat = np.eye(n_vars) * 0.5
    
    def svar_ma_rep(self, maxn=10):
        """Return MA representation matrices for maxn steps"""
        # Return a list of response matrices
        ma_matrices = []
        for i in range(maxn):
            # Decay the response over time
            response = np.eye(self.n_vars) * (0.9 ** (i + 1))
            ma_matrices.append(response)
        return ma_matrices

# Create a minimal SVARSimulation class
class MinimalSVARSimulation:
    def __init__(self, svar_process):
        self.svar_process = svar_process

# Set up parameters
n_variables = 4
variable_names = ['var_a', 'var_b', 'var_c', 'var_d']

# Create the SVAR process
svar_process = MinimalSVARProcess(n_vars=n_variables)

# Create the simulation
simulation = MinimalSVARSimulation(svar_process)

# Intervention effects: only affect some variables
intervention_effects = {
    'var_a': 1.0,
    'var_b': 0.5
}

# Number of steps for intervention
intervention_steps = 5

# Build ARGS dictionary
ARGS = {
    'simulation': simulation,
    'intervention_effects': intervention_effects,
    'names': variable_names,
    'intervention_steps': intervention_steps,
    'asymptotic': False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, statsmodels — 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
calculate_mae Ran
ran; our contract draft was wrong, not the code
marti5ini/ci-over-time/experiments/utils.py
code served (permissive licence) · get_code("6ff33a09c20f6227")
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 float64, ndim 0, 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 numpy as np

# Set seed for reproducibility
np.random.seed(0)

# Create small sample arrays with distinct shapes
actual = np.array([[1.0, 2.0, 3.0, 4.0],
                   [5.0, 6.0, 7.0, 8.0]])

predicted = np.array([[1.5, 2.5, 2.5, 4.5],
                      [5.5, 5.5, 7.5, 7.5]])

ARGS = {
    "actual": actual,
    "predicted": predicted,
    "axis": None,
    "mean_collapse": False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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
calculate_r2 Ran
ran; our contract draft was wrong, not the code
marti5ini/ci-over-time/experiments/utils.py
code served (permissive licence) · get_code("09ff82b7ed346ed8")
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 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 numpy as np
from typing import Union, Tuple, Optional

# Set seed for reproducibility
np.random.seed(0)

# Create small test arrays with distinct dimensions
actual = np.random.randn(4, 3)
predicted = np.random.randn(4, 3)

# Define ARGS dict with all parameters
ARGS = {
    "actual": actual,
    "predicted": predicted,
    "axis": None,
    "mean_collapse": False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, 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
calculate_score Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
marti5ini/ci-over-time/experiments/utils.py
code served (permissive licence) · get_code("e589f9c779df5ecf")
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 float32, 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 numpy as np

# Create small numpy arrays for actual and predicted values
# Using distinct dimensions: 4 samples, 3 features
actual = np.array([
    [1.0, 2.0, 3.0],
    [4.0, 5.0, 6.0],
    [7.0, 8.0, 9.0],
    [10.0, 11.0, 12.0]
], dtype=np.float32)

predicted = np.array([
    [1.1, 2.1, 2.9],
    [4.2, 4.9, 6.1],
    [6.9, 8.2, 8.8],
    [10.1, 10.9, 12.2]
], dtype=np.float32)

ARGS = {
    'actual': actual,
    'predicted': predicted,
    'axis': None,
    'mean_collapse': False,
    'metric_type': 'smape'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float32, 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
estimate_bounded Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
marti5ini/ci-over-time/src/CausalVAR/fitting.py
code served (permissive licence) · get_code("0bb28e75ad3acf21")
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 SVARResults. 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 numpy as np
import pandas as pd
from unittest.mock import Mock, MagicMock
from statsmodels.tsa.vector_ar.svar_model import SVARResults

# Create a minimal mock SVAR model instance
class MockSVARModel:
    def __init__(self):
        # Set up dimensions
        self.neqs = 3  # number of equations
        lags = 2
        
        # Create small sample data: (T, neqs)
        T = 10  # time periods
        self.endog = np.random.randn(T, self.neqs)
        self.endog_names = ['var1', 'var2', 'var3']
        
        # Mock data with dates
        self.data = Mock()
        self.data.dates = pd.date_range('2020-01-01', periods=T, freq='D')
        
        # fixed_coefs: (neqs, neqs) matrix indicating which coefficients are fixed
        # 0 = free, 1 = free (not fixed), other values = fixed to that value
        self.fixed_coefs = np.ones((self.neqs, self.neqs))
        
        # A_mask and B_mask for results
        self.A_mask = np.eye(self.neqs, dtype=bool)
        self.B_mask = np.eye(self.neqs, dtype=bool)
        
        # Mock _solve_AB method
        self._solve_AB = Mock(return_value=(np.eye(self.neqs), np.eye(self.neqs)))

# Create the model instance
model = MockSVARModel()

# Set up parameters for estimate_bounded
lags = 2
neqs = model.neqs

# start_params: initial parameter vector for A and B matrices
# Typically flattened A and B, so size is roughly 2 * neqs * neqs
start_params = np.random.randn(2 * neqs * neqs)

maxiter = 100
maxfun = 1000
trend = 'c'  # constant trend
solver = 'nm'  # Nelder-Mead
override = False

ARGS = {
    'self': model,
    'start_params': start_params,
    'lags': lags,
    'maxiter': maxiter,
    'maxfun': maxfun,
    'trend': trend,
    'solver': solver,
    'override': override,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cvxpy, numpy, pandas, statsmodels — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type SVARResults — a SVARResults output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a SVARResults 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
generate_one_column_latex_table Ran
ran; our contract draft was wrong, not the code
marti5ini/ci-over-time/experiments/latex_tables.py
code served (permissive licence) · get_code("1851e8a4f61561ef")
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 pandas as pd
import numpy as np

# Create a small sample dataframe with the structure expected by the function
np.random.seed(0)

# Generate sample data
data = []
datasets = ['inverted', 'german']
train_steps_list = [100, 200]
forecast_steps_list = [10, 20]
models = ['Oracle', 'VAR', 'DLinear', 'TiDE', 'TSMixer']

for dataset in datasets:
    for train_steps in train_steps_list:
        for forecast_steps in forecast_steps_list:
            for model in models:
                for run in range(3):  # 3 runs instead of 10 for speed
                    mean_val = np.random.uniform(0.1, 0.9)
                    std_val = np.random.uniform(0.01, 0.1)
                    data.append({
                        'dataset': dataset,
                        'train_steps': train_steps,
                        'forecast_prediction_steps': forecast_steps,
                        'model': model,
                        'score': np.random.normal(mean_val, std_val)
                    })

df = pd.DataFrame(data)

metric = 'MSE'

ARGS = {
    'df': df,
    'metric': metric
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas — 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
generate_train_group Ran
ran; our contract draft was wrong, not the code
marti5ini/ci-over-time/experiments/latex_tables.py
code served (permissive licence) · get_code("c85c90ea3aa02d8d")
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 to understand what it needs:
# - train_steps: appears to be a string/value that goes into LaTeX formatting
# - forecast_groups: a list of tuples, each containing:
#   - forecast_steps: a value for LaTeX formatting
#   - group_rows: a list of tuples, each containing:
#     - dataset: a string (dataset name)
#     - formatted_values: a list/iterable of strings to join with ' & '

# Construct valid arguments
train_steps = "12"

forecast_groups = [
    (
        "24",
        [
            ("Dataset_A", ["0.85", "0.92", "0.78"]),
            ("Dataset_B", ["0.91", "0.88", "0.95"]),
        ]
    ),
    (
        "48",
        [
            ("Dataset_C", ["0.79", "0.84", "0.81"]),
        ]
    ),
]

ARGS = {
    "train_steps": train_steps,
    "forecast_groups": forecast_groups,
}
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
get_coef_matrices_r Ran
ran; our contract draft was wrong, not the code
marti5ini/ci-over-time/src/CausalVAR/fitting.py
code served (permissive licence) · get_code("235b014b0703e83c")
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 3, 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 numpy as np
import pandas as pd

# Create sample coefficient data
# We'll create a DataFrame with coefficients in the format expected by R model output
column_names = ['var1', 'var2', 'var3']
n_lags = 2
num_vars = len(column_names)

# Build the coefficient DataFrame
# Index should be demeaned variable names, columns should be demeaned_lag{lag}_{var}
index_names = [f'demeaned_{var}' for var in column_names]
col_data = {}

for lag in range(1, n_lags + 1):
    for var in column_names:
        col_name = f'demeaned_lag{lag}_{var}'
        # Generate some coefficient values
        col_data[col_name] = np.random.randn(num_vars)

coefs_df = pd.DataFrame(col_data, index=index_names)

# Define ARGS
ARGS = {
    'coefs_df': coefs_df,
    'column_names': ['var1', 'var2', 'var3'],
    'n_lags': 2,
    'threshold': 0.1
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 3, 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
initialize_matrices Ran
ran; our contract draft was wrong, not the code
marti5ini/ci-over-time/src/generation/setup_simulation.py
code served (permissive licence) · get_code("a0b28d7e820939f7")
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 3, 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 numpy as np
from typing import List, Tuple

# Define the arguments dictionary
ARGS = {
    "relations": [
        (0, 0, 0, 1.0),  # lag 0, source 0, target 0, weight 1.0
        (1, 0, 1, 0.5),  # lag 1, source 0, target 1, weight 0.5
        (1, 1, 0, 0.3),  # lag 1, source 1, target 0, weight 0.3
        (2, 1, 1, 0.7),  # lag 2, source 1, target 1, weight 0.7
    ],
    "n_columns": 3,
    "n_lags": 2,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 3, 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
interventions_with_future_steps_german Ran
ran; our contract draft was wrong, not the code
marti5ini/ci-over-time/experiments/latex_tables.py
code served (permissive licence) · get_code("fce11f21fd9158f4")
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 pandas as pd
import numpy as np

# Create sample data for mean_data and std_data
# The function expects DataFrames with multi-index or columns that include
# 'train_steps', 'future steps', and 'Type'

np.random.seed(0)

# Create mean_data
mean_index = pd.MultiIndex.from_product([
    [100, 200],  # train_steps
    [5, 10],     # future steps
    ['Additive', 'Forcing']  # Type
], names=['train_steps', 'future steps', 'Type'])

mean_values = np.random.uniform(0.01, 0.05, size=len(mean_index))
mean_data = pd.Series(mean_values, index=mean_index)

# Create std_data with same index
std_values = np.random.uniform(0.001, 0.01, size=len(mean_index))
std_data = pd.Series(std_values, index=mean_index)

ARGS = {
    'mean_data': mean_data,
    'std_data': std_data,
    'dataset_name': 'German'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas — 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
mu_to_v Ran
ran; our contract draft was wrong, not the code
marti5ini/ci-over-time/src/CausalVAR/interventions.py
code served (permissive licence) · get_code("1769d0c09b33ee36")
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 (4, 1) 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 typing import Dict, List
from statsmodels.tsa.vector_ar.svar_model import SVARProcess

# Create a minimal SVARProcess mock since we need to construct one
class MockSVARProcess:
    def __init__(self, n_vars):
        self.n_vars = n_vars
        # A_solve and _char_mat are used in the function
        # They need to be square matrices that can be multiplied with intervention vectors
        self.A_solve = np.eye(n_vars)
        self._char_mat = np.eye(n_vars)

# Set up parameters
n_variables = 4
variable_names = ["var_a", "var_b", "var_c", "var_d"]

mapping = {
    "var_a": 0,
    "var_b": 1,
    "var_c": 2,
    "var_d": 3,
}

svar_process = MockSVARProcess(n_variables)

# Mask for intervention application - shape (4, 1) to match force_vector
mask = np.array([[1.0], [1.0], [1.0], [1.0]])

names = variable_names

# Intervention effects
intervention_effects = {
    "var_a": 0.5,
    "var_b": 0.3,
}

ARGS = {
    "mapping": mapping,
    "svar_process": svar_process,
    "mask": mask,
    "names": names,
    "intervention_effects": intervention_effects,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, statsmodels — 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 (4, 1) — shape (4, 1) 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
numpy_to_panel_data Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
marti5ini/ci-over-time/src/CausalVAR/fitting.py
code served (permissive licence) · get_code("0c7ab54adc395844")
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 DataFrame. 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 numpy as np
import pandas as pd

# Create a small 3D numpy array for testing
# Shape: (num_samples=2, train_steps=3, num_features=4)
train_data = np.random.randn(2, 3, 4)

# List of column names for the 4 features
column_names = ['feature_0', 'feature_1', 'feature_2', 'feature_3']

# Number of time steps
train_steps = 3

ARGS = {
    'train_data': train_data,
    'column_names': column_names,
    'train_steps': train_steps
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DataFrame — a DataFrame output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataFrame output the recorded ndim 2 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
apply_force Not yet run
unverified (harvested, no recorded run)
marti5ini/ci-over-time/src/CausalVAR/interventions.py
code served (permissive licence) · get_code("30f0cfa867f2293d")
How it ran

no invocation recorded.

estimate_bounded Not yet run
unverified (harvested, no recorded run)
marti5ini/ci-over-time/src/CausalVAR/fitting_var_bounded.py
code served (permissive licence) · get_code("60c9a9936c8a8d5d")
How it ran

no invocation recorded.

Also present in other papers' code

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

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 this paper, we focus on estimating the causal effect of an intervention over time on a dynamical system. To that end, we formally define causal interventions and their effects over time on discrete-time stochastic processes (DSPs). Then, we show under which conditions the equilibrium states of a DSP, both before and after a causal intervention, can be captured by a structural causal model (SCM). With such an equivalence at hand, we provide an explicit mapping from vector autoregressive models (VARs), broadly applied in econometrics, to linear, but potentially cyclic and/or affected by unmeasured confounders, SCMs. The resulting causal VAR framework allows us to perform causal inference over time from observational time series data. Our experiments on synthetic and real-world datasets show that the proposed framework achieves strong performance in terms of observational forecasting while enabling accurate estimation of the causal effect of interventions on dynamical systems. We demonstrate, through a case study, the potential practical questions that can be addressed using the proposed causal VAR framework.

For agents

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

get_harvested_code_for_paper("2410.10502")
get_code_for_paper("2410.10502")
have("2410.10502")

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

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

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

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

Connect an agent — have() is free.