SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2407.01290 · 2024

Hypformer: Exploring Efficient Transformer Fully in Hyperbolic Space

arXiv · PDF · Open in the Atlas

Code that ran

5 of 7 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 0 have no contract verdict; 5 failures of our instrument; 2 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/2407.01290.json · badge: /api/ran/2407.01290.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
Graph-and-Geometric-Learning/hyperbolic-transformer canonical (classifier label)
classifier basis: census
5 ran · 2 no recorded run
FunctionStatusWhere it lives
class_rand_splits Ran
ran; our contract draft was wrong, not the code
Graph-and-Geometric-Learning/hyperbolic-transformer/large/data_utils.py
code served (permissive licence) · get_code("de5bdf76ff672322")
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)

# Create a label tensor with class indices
# We need multiple samples per class to allow for train/valid/test splits
# Create 20 samples with 4 classes (5 samples per class)
label = torch.tensor([0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3]).unsqueeze(1)

# Number of samples per class to use for training
label_num_per_class = 2

# Number of validation samples
valid_num = 5

# Number of test samples
test_num = 5

ARGS = {
    "label": label,
    "label_num_per_class": label_num_per_class,
    "valid_num": valid_num,
    "test_num": test_num,
}
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_device Ran
ran; our contract draft was wrong, not the code
Graph-and-Geometric-Learning/hyperbolic-transformer/large/main-batch.py
code served (permissive licence) · get_code("8a190827898c38bb")
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 device. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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)

ARGS = {
    'use_cpu': True,
    'device_id': 0,
}
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 device — a device output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a device 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
load_fixed_splits Ran
ran; our contract draft was wrong, not the code
Graph-and-Geometric-Learning/hyperbolic-transformer/large/data_utils.py
code served (permissive licence) · get_code("ef6b5e211f3c0418")
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 numpy as np
import tempfile
import os

torch.manual_seed(0)

# Create a temporary directory structure for the splits files
temp_dir = tempfile.mkdtemp()
splits_dir = os.path.join(temp_dir, 'geom-gcn', 'splits')
os.makedirs(splits_dir, exist_ok=True)

# Create dummy split files for 'cora' dataset
for i in range(10):
    split_file_path = os.path.join(splits_dir, f'cora_split_0.6_0.2_{i}.npz')
    # Create small dummy masks (10 samples)
    train_mask = np.array([True, True, False, False, False, False, False, False, False, False])
    val_mask = np.array([False, False, True, True, False, False, False, False, False, False])
    test_mask = np.array([False, False, False, False, True, True, True, True, True, True])
    
    np.savez(
        split_file_path,
        train_mask=train_mask,
        val_mask=val_mask,
        test_mask=test_mask
    )

# Create a minimal dataset class with train_idx, valid_idx, test_idx for semi-supervised case
class MinimalDataset:
    def __init__(self):
        self.train_idx = np.array([0, 1])
        self.valid_idx = np.array([2, 3])
        self.test_idx = np.array([4, 5, 6, 7, 8, 9])

dataset = MinimalDataset()

ARGS = {
    'data_dir': temp_dir,
    'dataset': dataset,
    'name': 'cora',
    'protocol': 'semi'
}
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 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
mkdirs Ran
ran; our contract draft was wrong, not the code
Graph-and-Geometric-Learning/hyperbolic-transformer/large/logger.py
code served (permissive licence) · get_code("5c5f4efd8c517968")
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 os
import tempfile

# The function mkdirs takes a single parameter 'path' which is a string
# It checks if the path exists, and if not, creates it using os.makedirs
# We need to provide a valid path string

# Create a temporary directory path that doesn't exist yet
temp_base = tempfile.gettempdir()
test_path = os.path.join(temp_base, "test_mkdirs_dir_12345")

# Clean up if it somehow exists
if os.path.exists(test_path):
    os.rmdir(test_path)

ARGS = {
    "path": test_path
}
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 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
rand_train_test_idx Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
Graph-and-Geometric-Learning/hyperbolic-transformer/large/data_utils.py
pointer only (licence: MIT); the stored copy get_code serves, from CUAI/Non-Homophily-Large-Scale, is pointer only (licence: NONE) · get_code("13234652741e2264")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from CUAI/Non-Homophily-Large-Scale, 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.

load_fb100 Not yet run
unverified (harvested, no recorded run)
Graph-and-Geometric-Learning/hyperbolic-transformer/large/load_data.py
code served (permissive licence) · get_code("67fc014db49b3eba")
How it ran

no invocation recorded.

load_twitch Not yet run
unverified (harvested, no recorded run)
Graph-and-Geometric-Learning/hyperbolic-transformer/large/load_data.py
code served (permissive licence) · get_code("985aeae95edfd025")
How it ran

no invocation recorded.

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 distinct functions with an identity, 5 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 0 the same month, 2 later) and 2 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
rand_train_test_idx 14 other papers
11 dated earlier, 3 later
2110.14446 (2021-10)
Large Scale Learning on Non-Homophilous Graphs: New Benchmarks and Strong Simple Methods
2302.01524 (2023-02)
Ordered GNN: Ordering Message Passing to Deal with Heterophily and Over-smoothing
2306.08274 (2023-06)
A Simple and Scalable Graph Neural Network for Large Directed Graphs
and 11 more not named here
load_fb100 8 other papers
6 dated earlier, 2 later
2110.14446 (2021-10)
Large Scale Learning on Non-Homophilous Graphs: New Benchmarks and Strong Simple Methods
2210.07606 (2022-10)
Revisiting Heterophily For Graph Neural Networks
2302.01524 (2023-02)
Ordered GNN: Ordering Message Passing to Deal with Heterophily and Over-smoothing
and 5 more not named here
load_fixed_splits 3 other papers
3 dated earlier
2306.10759 (2023-06)
SGFormer: Simplifying and Empowering Transformers for Large-Graph Representations
2310.05296 (2023-10)
Tailoring Self-Attention for Graph via Rooted Subtrees
2403.15480 (2024-03)
SpikeGraphormer: A High-Performance Graph Transformer with Spiking Graph Attention
class_rand_splits 2 other papers
2 dated earlier
2306.10759 (2023-06)
SGFormer: Simplifying and Empowering Transformers for Large-Graph Representations
2403.15480 (2024-03)
SpikeGraphormer: A High-Performance Graph Transformer with Spiking Graph Attention
load_twitch 2 other papers
2 dated earlier
2306.10759 (2023-06)
SGFormer: Simplifying and Empowering Transformers for Large-Graph Representations
2402.11494 (2024-02)
Graph Out-of-Distribution Generalization via Causal Intervention

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

Hyperbolic geometry have shown significant potential in modeling complex structured data, particularly those with underlying tree-like and hierarchical structures. Despite the impressive performance of various hyperbolic neural networks across numerous domains, research on adapting the Transformer to hyperbolic space remains limited. Previous attempts have mainly focused on modifying self-attention modules in the Transformer. However, these efforts have fallen short of developing a complete hyperbolic Transformer. This stems primarily from: (i) the absence of well-defined modules in hyperbolic space, including linear transformation layers, LayerNorm layers, activation functions, dropout operations, etc. (ii) the quadratic time complexity of the existing hyperbolic self-attention module w.r.t the number of input tokens, which hinders its scalability. To address these challenges, we propose, Hypformer, a novel hyperbolic Transformer based on the Lorentz model of hyperbolic geometry. In Hypformer, we introduce two foundational blocks that define the essential modules of the Transformer in hyperbolic space. Furthermore, we develop a linear self-attention mechanism in hyperbolic space, enabling hyperbolic Transformer to process billion-scale graph data and long-sequence inputs for the first time. Our experimental results confirm the effectiveness and efficiency of Hypformer across various datasets, demonstrating its potential as an effective and scalable solution for large-scale data representation and large models.

For agents

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

get_harvested_code_for_paper("2407.01290")
get_code_for_paper("2407.01290")
have("2407.01290")

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

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

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

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

Connect an agent — have() is free.