SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2409.08217 · 2024

CliquePH: Higher-Order Information for Graph Neural Networks through Persistent Homology on Clique Graphs

arXiv · PDF · Open in the Atlas

Code that ran

7 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; 3 honoured the contract we drafted, 3 violated it and 0 have no contract verdict; 1 failure of our instrument; 1 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/2409.08217.json · badge: /api/ran/2409.08217.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
DavideBuffelli/CliquePH canonical (classifier label)
classifier basis: census
7 ran · 1 no recorded run
FunctionStatusWhere it lives
fake_persistence_computation Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
DavideBuffelli/CliquePH/topognn/layers.py
code served (permissive licence) · get_code("bc6c2b0bde26d950")
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)

# Analyze the function to determine required shapes and types:
# - filtered_v_: shape (num_vertices, num_filtrations) - used for indexing and unsqueeze
# - edge_index: shape (2, num_edges) - used for indexing filtered_v_
# - vertex_slices: shape (bs+1,) - not directly used in function body
# - edge_slices: shape (bs+1,) - used for slicing and arithmetic
# - batch: not used in function body

# Create small tensors with distinct dimensions
num_vertices = 5
num_filtrations = 3
num_edges = 7
bs = 2  # batch size

# filtered_v_: (num_vertices, num_filtrations)
filtered_v_ = torch.randn(num_vertices, num_filtrations)

# edge_index: (2, num_edges) - contains indices into vertices
edge_index = torch.tensor([
    [0, 1, 2, 0, 1, 2, 3],
    [1, 2, 3, 2, 3, 4, 4]
])

# vertex_slices: (bs+1,) - marks boundaries in vertex dimension
vertex_slices = torch.tensor([0, 3, 5])

# edge_slices: (bs+1,) - marks boundaries in edge dimension
# Must have shape compatible with bs = 2, so shape (3,)
edge_slices = torch.tensor([0, 3, 7])

# batch: not used in function, can be None or a dummy tensor
batch = torch.tensor([0, 0, 0, 1, 1])

ARGS = {
    "filtered_v_": filtered_v_,
    "edge_index": edge_index,
    "vertex_slices": vertex_slices,
    "edge_slices": edge_slices,
    "batch": batch
}
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_label_fromTU Ran
ran, honoured the contract we drafted
DavideBuffelli/CliquePH/topognn/data_utils.py
code served (permissive licence) · get_code("9120b0814815635d")
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 2, dtype family int; 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 torch.nn as nn

torch.manual_seed(0)

class MockGraph:
    def __init__(self, index):
        self.y = torch.tensor([index], dtype=torch.long)

class MockDataset:
    def __init__(self, size=2):
        self.graphs = [MockGraph(i) for i in range(size)]
    
    def __len__(self):
        return len(self.graphs)
    
    def __getitem__(self, idx):
        return self.graphs[idx]

dataset = MockDataset(size=2)

ARGS = {
    "dataset": dataset
}
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 2, dtype family int — 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
get_simplex_boundaries Ran
ran, violated the contract we drafted
DavideBuffelli/CliquePH/topognn/simplicial_utils.py
code served (permissive licence) · get_code("e8b02ed7b3eac8e2")
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 2, dtype family int; 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 itertools

# The function takes a 'simplex' parameter and calls:
# - itertools.combinations(simplex, len(simplex) - 1)
# - tuple() on each boundary
# So simplex needs to be an iterable with elements that can form tuples

# A simplex is typically a collection of vertices (points/nodes)
# For this function, we just need an iterable of hashable items
# Let's use a simple list of integers or tuples representing vertices

simplex = (0, 1, 2, 3)  # A 3-simplex has 4 vertices

ARGS = {
    "simplex": simplex
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 2, dtype family int — 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
int_or_none Ran
ran, honoured the contract we drafted
DavideBuffelli/CliquePH/topognn/cli_utils.py
code served (permissive licence) · get_code("f24a58e63edca3ad")
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 int, ndim 0, dtype family int, 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 argparse

def int_or_none(input: str):
    try:
        return int(input)
    except Exception as e:
        if input.lower() == 'none':
            return None
        else:
            argparse.ArgumentTypeError(f'"{input}" is neither None nor of integer type.')

ARGS = {
    'input': '42'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, 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
my_f Ran
ran, honoured the contract we drafted
DavideBuffelli/CliquePH/topognn/data_utils.py
code served (permissive licence) · get_code("9757f4cc9ad5aafb")
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 int; 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)

# Construct valid arguments for my_f
# The function expects:
# - x: a tuple of two tuples, each containing (index, set)
# - dim: an integer to compare against the size of set intersection

# Create two tuples with (index, set) pairs
x = (
    (0, {1, 2, 3, 4}),
    (1, {2, 3, 4, 5})
)

# The intersection of {1, 2, 3, 4} and {2, 3, 4, 5} is {2, 3, 4} which has length 3
# Set dim to 3 so that len(c1 & c2) == dim evaluates to True
dim = 3

ARGS = {
    "x": x,
    "dim": dim
}
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 int — 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
sort_higher_order_index Ran
ran, violated the contract we drafted
DavideBuffelli/CliquePH/topognn/simplicial_utils.py
code served (permissive licence) · get_code("ef40d1f8e0fcd3e1")
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 2, dtype family int, shape (3, 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 torch

torch.manual_seed(0)

# Create a small higher-order index tensor
# Shape: (dim, num_edges) where dim is the order (e.g., 3 for 3-way hyperedges)
# and num_edges is the number of hyperedges
h_index = torch.tensor([
    [0, 1, 2, 0],  # first dimension indices
    [1, 2, 0, 2],  # second dimension indices
    [2, 0, 1, 1],  # third dimension indices
], dtype=torch.long)

# Number of nodes in the hypergraph
num_nodes = 5

ARGS = {
    "h_index": h_index,
    "num_nodes": num_nodes,
}
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 2, dtype family int, shape (3, 4) — shape (3, 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
str2bool Ran
ran, violated the contract we drafted
DavideBuffelli/CliquePH/topognn/cli_utils.py
code served (permissive licence) · get_code("7c508037b40522af")
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) 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 argparse

def str2bool(v):
    if isinstance(v, bool):
        return v
    if v.lower() in ('yes', 'true', 't', 'y', '1'):
        return True
    elif v.lower() in ('no', 'false', 'f', 'n', '0'):
        return False
    else:
        raise argparse.ArgumentTypeError('Boolean value expected.')

# Test cases for str2bool
ARGS = {
    'v': 'true'  # string input that should convert to boolean
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
none outside the standard library — 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
batch_to_tensor Not yet run
unverified (harvested, no recorded run)
DavideBuffelli/CliquePH/topognn/coord_transforms.py
code served (permissive licence) · get_code("a5495ebb1d60c00f")
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 (2 with at least one paper dated earlier, 1 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
str2bool 175 other papers
138 dated earlier, 3 the same month, 33 later, 1 same year, order not determinable · 2 only as an assembly brick
1406.6247 (2014-06)
Recurrent Models of Visual Attention
1603.09382 (2016-03)
Deep Networks with Stochastic Depth
1710.10196 (2017-10)
Progressive Growing of GANs for Improved Quality, Stability, and Variation
and 172 more not named here
batch_to_tensor 2 other papers
2 dated earlier
2402.16346 (2024-02)
Boosting Graph Pooling with Persistent Homology
2408.13082 (2024-08)
Multivariate Time-Series Anomaly Detection based on Enhancing Graph Attention Networks with Topological Analysis

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

Graph neural networks have become the default choice by practitioners for graph learning tasks such as graph classification and node classification. Nevertheless, popular graph neural network models still struggle to capture higher-order information, i.e., information that goes \emph{beyond} pairwise interactions. Recent work has shown that persistent homology, a tool from topological data analysis, can enrich graph neural networks with topological information that they otherwise could not capture. Calculating such features is efficient for dimension 0 (connected components) and dimension 1 (cycles). However, when it comes to higher-order structures, it does not scale well, with a complexity of $O(n^d)$, where $n$ is the number of nodes and $d$ is the order of the structures. In this work, we introduce a novel method that extracts information about higher-order structures in the graph while still using the efficient low-dimensional persistent homology algorithm. On standard benchmark datasets, we show that our method can lead to up to $31\%$ improvements in test accuracy.

For agents

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

get_harvested_code_for_paper("2409.08217")
get_code_for_paper("2409.08217")
have("2409.08217")

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

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

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

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

Connect an agent — have() is free.