SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2502.09981 · NeurIPS · 2025

Exploring Neural Granger Causality with xLSTMs: Unveiling Temporal Dependencies in Complex Data

Kristian Kersting, Devendra Dhami, Felix Divo, Harsh Poonia

arXiv · PDF · Open in the Atlas

Code that ran

7 of 9 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 6 have no contract verdict; 1 failure of our instrument; 2 no recorded run), measured 2026-11-23; 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/2502.09981.json · badge: /api/ran/2502.09981.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
harpoonix/GC-xLSTM canonical (classifier label)
classifier basis not recorded on the link
7 ran · 2 no recorded run
FunctionStatusWhere it lives
calculate_balanced_accuracy Ran
ran on a synthesized input
harpoonix/GC-xLSTM/GC-xLSTM/models/clstm.py
code served (permissive licence) · get_code("6237a431fb987958")
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

torch.manual_seed(0)

# The function expects two tensors that support element-wise operations
# and can be summed. They should be binary (0s and 1s) for predictions and ground truth.
# Creating small tensors with batch size 2 and some features

GC_pred = torch.tensor([[0.9, 0.1, 0.8, 0.2],
                        [0.7, 0.3, 0.6, 0.4]], dtype=torch.float32)

GC_true = torch.tensor([[1.0, 0.0, 1.0, 0.0],
                        [1.0, 0.0, 0.0, 1.0]], dtype=torch.float32)

ARGS = {
    "GC_pred": GC_pred,
    "GC_true": GC_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 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
conv1d_step Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
harpoonix/GC-xLSTM/xlstm/components/conv.py
code served (permissive licence) · get_code("25766cf2cb87920f")
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 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

torch.manual_seed(0)

# Define dimensions
batch_size = 2
sequence_length = 1
feature_dim = 4
kernel_size = 3

# Create tensors matching the function's expectations
x = torch.randn(batch_size, sequence_length, feature_dim)
conv_state = torch.randn(batch_size, kernel_size, feature_dim)
conv1d_weight = torch.randn(kernel_size, feature_dim)
conv1d_bias = torch.randn(feature_dim)

ARGS = {
    'x': x,
    'conv_state': conv_state,
    'conv1d_weight': conv1d_weight,
    'conv1d_bias': conv1d_bias
}
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 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: none by the harness; any seed is in the setup block
get_act_fn Ran
ran on a synthesized input
harpoonix/GC-xLSTM/xlstm/components/feedforward.py
code served (permissive licence) · get_code("2a6a1bfa026d5276")
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 builtin_function_or_method. 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
from torch import nn

torch.manual_seed(0)

# The function takes a single parameter: act_fn_name (a string)
# It looks up the string in _act_fn_registry and returns the corresponding callable
# We need to provide a valid activation function name that exists in the registry

ARGS = {
    'act_fn_name': 'gelu'
}
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 builtin_function_or_method — a builtin_function_or_method output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a builtin_function_or_method 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_fmri_data Ran
ran on a synthesized input
harpoonix/GC-xLSTM/GC-xLSTM/prepare_data.py
code served (permissive licence) · get_code("dff830f884397394")
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 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 numpy as np
import pandas as pd
import tempfile
import os

# Create temporary CSV files for testing
temp_dir = tempfile.mkdtemp()

# Create a time series CSV file with 5 time points and 3 regions
timeseries_data = pd.DataFrame({
    'region_0': [1.0, 2.0, 3.0, 4.0, 5.0],
    'region_1': [2.0, 3.0, 4.0, 5.0, 6.0],
    'region_2': [3.0, 4.0, 5.0, 6.0, 7.0]
})
timeseries_file = os.path.join(temp_dir, 'timeseries.csv')
timeseries_data.to_csv(timeseries_file, index=False)

# Create a Granger causality CSV file with cause, effect, lag columns
gc_data = pd.DataFrame({
    'cause': [0, 1, 2],
    'effect': [1, 2, 0],
    'lag': [1, 1, 1]
})
gc_file = os.path.join(temp_dir, 'gc.csv')
gc_data.to_csv(gc_file, index=False, header=False)

ARGS = {
    'timeseries_file': timeseries_file,
    'gc_file': gc_file
}
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 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: none by the harness; any seed is in the setup block
lorenz Ran
ran on a synthesized input
harpoonix/GC-xLSTM/GC-xLSTM/synthetic.py
code served (permissive licence) · get_code("be9afe4afc6f8b45")
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 1, dtype family float, shape (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

# The lorenz function takes three parameters:
# - x: a 1D array representing the current state
# - t: a scalar representing time
# - F: a scalar representing the forcing parameter

# Construct valid arguments
x = np.array([1.0, 2.0, 3.0, 4.0])  # State vector with 4 dimensions
t = 0.0  # Initial time
F = 8.0  # Forcing parameter (standard value for Lorenz-96)

ARGS = {
    'x': x,
    't': t,
    'F': F
}
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 1, dtype family float, shape (4,) — shape (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
make_var_stationary Ran
ran on a synthesized input
harpoonix/GC-xLSTM/GC-xLSTM/synthetic.py
code served (permissive licence) · get_code("3a98557267414e0c")
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 (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 numpy as np

# Construct a small beta matrix for a VAR model
# beta should have shape (p, p*lag) where p is number of variables and lag is number of lags
# Let's use p=2 (2 variables) and lag=2 (2 lags), so shape (2, 4)
p = 2
lag = 2
beta = np.random.randn(p, p * lag) * 0.3  # Small coefficients to ensure stationarity

ARGS = {
    "beta": beta,
    "radius": 0.97
}
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 (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
regularize Ran
ran on a synthesized input
harpoonix/GC-xLSTM/GC-xLSTM/models/clstm.py
code served (permissive licence) · get_code("a7a68dd4374b77cc")
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
import torch.nn as nn

torch.manual_seed(0)

# Create a small LSTM-based network
class LSTMNetwork(nn.Module):
    def __init__(self):
        super().__init__()
        self.lstm = nn.LSTM(input_size=4, hidden_size=3, batch_first=True)
    
    def forward(self, x):
        return self.lstm(x)

# Create a small xLSTM-based network with projection
class XLSTMNetwork(nn.Module):
    def __init__(self):
        super().__init__()
        self.projection = nn.Linear(3, 4)
    
    def forward(self, x):
        return self.projection(x)

# Instantiate networks
lstm_network = LSTMNetwork()
xlstm_network = XLSTMNetwork()

ARGS = {
    "network": lstm_network,
    "lam": 0.01,
    "xlstm": 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 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
fetch_molene_data Not yet run
unverified (harvested, no recorded run)
harpoonix/GC-xLSTM/GC-xLSTM/prepare_data.py
code served (permissive licence) · get_code("d570b84fcf2cfad7")
How it ran

no invocation recorded.

simulate_var Not yet run
unverified (harvested, no recorded run)
harpoonix/GC-xLSTM/GC-xLSTM/synthetic.py
code served (permissive licence) · get_code("5e0d45c92d16b9a6")
How it ran

no invocation recorded.

Also present in other papers' code

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

FunctionAlso present inEarliest-datedOthers named
conv1d_step 2 other papers
1 dated earlier, 1 later
2411.04165 (2024-11)
Bio-xLSTM: Generative modeling, representation and in-context learning of biological and chemical sequences
2503.13427 (2025-03)
xLSTM 7B: A Recurrent LLM for Fast and Efficient Inference
make_var_stationary 2 other papers
2 dated earlier
1303.4434 (2013-03)
A General Iterative Shrinkage and Thresholding Algorithm for Non-convex Regularized Optimization Problems
2105.02522 (2021-05)
Neural graphical modelling in continuous-time: consistency guarantees and algorithms
get_act_fn 1 other paper
1 later
2503.13427 (2025-03)
xLSTM 7B: A Recurrent LLM for Fast and Efficient Inference
lorenz 1 other paper
1 dated earlier
1303.4434 (2013-03)
A General Iterative Shrinkage and Thresholding Algorithm for Non-convex Regularized Optimization Problems

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

Causality in time series can be challenging to determine, especially in the presence of non-linear dependencies. Granger causality helps analyze potential relationships between variables, thereby offering a method to determine whether one time series can predict-Granger cause-future values of another. Although successful, Granger causal methods still struggle with capturing long-range relations between variables. To this end, we leverage the recently successful Extended Long Short-Term Memory (xLSTM) architecture and propose Granger causal xL-STMs (GC-xLSTM). It first enforces sparsity between the time series components by using a novel dynamic loss penalty on the initial projection. Specifically, we adaptively improve the model and identify sparsity candidates. Our joint optimization procedure then ensures that the Granger causal relations are recovered robustly. Our experimental evaluation on six diverse datasets demonstrates the overall efficacy of GC-xLSTM.

For agents

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

get_harvested_code_for_paper("2502.09981")
get_code_for_paper("2502.09981")
have("2502.09981")

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

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

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

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

Connect an agent — have() is free.