SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2605.10396 · 2026

Causal Explanations from the Geometric Properties of ReLU Neural Networks

Hector Woods, Philippa Ryan

arXiv · PDF

Code that ran

4 of 5 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (3 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 1 violated it and 3 have no contract verdict; 0 failures of our instrument; 1 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/2605.10396.json · badge: /api/ran/2605.10396.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
HJWoods/ReLUExplanations community
Papers with Code archive
4 ran · 1 no recorded run
FunctionStatusWhere it lives
ActivationSignature Ran
ran on a synthesized input · constructed an object; no result was computed
HJWoods/ReLUExplanations/ExplanationEngine.py
code served (permissive licence) · get_code("37e4a882cdc6b670")
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 an instance of its own class, ActivationSignature: the run constructed the object and did not call it, so no result was computed. 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
from dataclasses import dataclass
from typing import List

@dataclass
class ActivationSignature:
    """
    Class to represent the activation signature of a given input, as a list of boolean vectors.
    s_per_layer: List[np.ndarray], such that each element of the list is a boolean vector of length n_features,
    representing the activation pattern of the input through a given layer of the network.
    """
    s_per_layer: List[np.ndarray]

    def to_flat(self) -> np.ndarray:
        return np.concatenate([s.astype(np.int8).ravel() for s in self.s_per_layer])

    @staticmethod
    def from_flat(flat: np.ndarray, layer_sizes: List[int]) -> 'ActivationSignature':
        s_per_layer = []
        p = 0
        for n in layer_sizes:
            s_per_layer.append(flat[p:p + n].astype(bool))
            p += n
        return ActivationSignature(s_per_layer)


# Create sample activation signatures with boolean vectors for different layers
layer1_activation = np.array([True, False, True, False], dtype=bool)
layer2_activation = np.array([False, True, True], dtype=bool)
layer3_activation = np.array([True, True], dtype=bool)

s_per_layer = [layer1_activation, layer2_activation, layer3_activation]

ARGS = {
    "s_per_layer": s_per_layer
}
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 ActivationSignature — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a ActivationSignature 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
Polytope Ran
ran on a synthesized input · constructed an object; no result was computed
HJWoods/ReLUExplanations/ExplanationEngine.py
code served (permissive licence) · get_code("be48906600c9add0")
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 an instance of its own class, Polytope: the run constructed the object and did not call it, so no result was computed. 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

# Create a simple polytope with some constraints
# Using distinct dimensions: 5 constraints (n_constraints), 3 features (n_features)
A = np.array([
    [1.0, 0.0, 0.0],
    [0.0, 1.0, 0.0],
    [0.0, 0.0, 1.0],
    [1.0, 1.0, 1.0],
    [-1.0, 0.5, 0.2]
], dtype=np.float64)

b = np.array([10.0, 5.0, 8.0, 15.0, 3.0], dtype=np.float64)

ARGS = {
    "A": A,
    "b": b
}
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 Polytope — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Polytope 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
ReLUNetworkWrapper Ran
ran on a synthesized input · constructed an object; no result was computed
HJWoods/ReLUExplanations/ExplanationEngine.py
code served (permissive licence) · get_code("8e1b840c0b7a64ea")
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 an instance of its own class, ReLUNetworkWrapper: the run constructed the object and did not call it, so no result was computed. 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)

# Create a simple ReLU network: input(4) -> hidden(3) -> hidden(2) -> output(5)
class SimpleReLUNet(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear1 = nn.Linear(4, 3)
        self.linear2 = nn.Linear(3, 2)
        self.linear3 = nn.Linear(2, 5)
    
    def forward(self, x):
        x = torch.relu(self.linear1(x))
        x = torch.relu(self.linear2(x))
        x = self.linear3(x)
        return x

# Instantiate the model
model = SimpleReLUNet()

ARGS = {
    'model': model
}
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 ReLUNetworkWrapper — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a ReLUNetworkWrapper 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
is_feasible Ran
ran, violated the contract we drafted
HJWoods/ReLUExplanations/ExplanationEngine.py
code served (permissive licence) · get_code("99ca5e7e0c1966c5")
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 bool, 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 scipy.optimize import linprog
from dataclasses import dataclass

@dataclass
class Polytope:
    """
    Class to represent a single polytope, as it's hyperplane (H) representation
    where each constraint is of the form a1x1 + a2x2 + ... + anxn <= b.
    A: np.ndarray, shape (n_constraints, n_features), such that each row of A forms the left-hand side of a constraint.
    b: np.ndarray, shape (n_constraints,), such that each element of b forms the single constant on the right-hand side
    of a constraint.
    The polytope is the region in R^n_features that satisfies all of the inequalities simultaneously.
    """
    A: np.ndarray
    b: np.ndarray

    def add_constraints(self, A_add: np.ndarray, b_add: np.ndarray) -> 'Polytope':
        if A_add.size == 0:
            return self
        if self.A.size == 0:
            return Polytope(A_add.copy(), b_add.copy())
        A_new = np.vstack([self.A, A_add])
        b_new = np.concatenate([self.b, b_add])
        return Polytope(A_new, b_new)

    @property
    def dim(self) -> int:
        return self.A.shape[1] if self.A.size else 0


# Create a feasible polytope
# Constraints: x1 + x2 <= 10, x1 >= 0, x2 >= 0
A_feasible = np.array([
    [1.0, 1.0],
    [-1.0, 0.0],
    [0.0, -1.0]
], dtype=np.float64)

b_feasible = np.array([10.0, 0.0, 0.0], dtype=np.float64)

poly_feasible = Polytope(A_feasible, b_feasible)

ARGS = {
    "poly": poly_feasible
}
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 bool, 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
ExplanationEngine Not yet run
unverified (harvested, no recorded run)
HJWoods/ReLUExplanations/ExplanationEngine.py
code served (permissive licence) · get_code("f79a859edd8bce05")
How it ran

no invocation recorded.

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-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

Neural networks have proved an effective means of learning control policies for autonomous systems, but these learned policies are difficult to understand due to the black-box nature of neural networks. This lack of interpretability makes safety assurance for such autonomous systems challenging. The fields of eXplainable Artificial Intelligence (XAI) and eXplainable Reinforcement Learning (XRL) aim to interpret the decisionmaking processes of neural networks and autonomous agents, respectively. In particular, work on causal explanations aims to provide "why" and "why not" explanations for why a model made a given decision. However, most of the work on explainability to date utilises a distilled version of the original model. While this distilled policy is interpretable, it necessarily degrades in performance significantly when compared to the original model, and is not guaranteed to be an accurate reflection of the decisionmaking processes in the original model and as such cannot be used to guarantee its safety. Recent work on understanding the geometry of ReLU neural networks shows that a ReLU network corresponds to a piecewise linear function divided into regions defined by an n-dimensional convex polytope. Through this lens, a neural network can be understood as dividing the input space into distinct regions which apply a single linear function for each output neuron. We show that this geometric representation can be used to generate causal explanations for the network's behaviour similar to previous work, but which extracts rules directly from the geometry of Neural Networks with the ReLU activation function, and is therefore an accurate reflection of the network's behaviour. An implementation of our algorithm is available at https://github.com/HJWoods/ReLUExplanations

For agents

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

get_harvested_code_for_paper("2605.10396")
get_code_for_paper("2605.10396")
have("2605.10396")

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

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

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

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

Connect an agent — have() is free.