| Encoder |
Ran ran on a synthesized input · constructed an object; no result was computed |
junhocho/HGCAE/models/encoders.py code served (permissive licence) · get_code("77e4a84f7b06b98d") How it ranRan 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, Encoder: 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
torch.manual_seed(0)
# Create a minimal graph convolution layer that the encoder will use
class GraphConvLayer(nn.Module):
def __init__(self, in_features, out_features):
super(GraphConvLayer, self).__init__()
self.linear = nn.Linear(in_features, out_features)
def forward(self, xx):
x, adj = xx
# Simple graph convolution: apply linear transformation
out = self.linear(x)
return (out, adj)
# Create a minimal encoder subclass for testing
class TestEncoder(nn.Module):
def __init__(self, c, use_cnn=None):
super(TestEncoder, self).__init__()
self.c = c
self.encode_graph = True
# Create two graph conv layers
self.layers = nn.ModuleList([
GraphConvLayer(4, 5),
GraphConvLayer(5, 6)
])
def encode(self, x, adj):
self.features = []
if self.encode_graph:
input = (x, adj)
xx = input
for i in range(len(self.layers)):
out = self.layers[i].forward(xx)
self.features.append(out[0])
xx = out
output, _ = xx
else:
output = self.layers.forward(x)
return output
# Set up valid arguments
c = 10 # some config or channel parameter
use_cnn = False # optional parameter
ARGS = {
'c': c,
'use_cnn': use_cnn
}
- 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 Encoder — 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 Encoder 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
|
| GeometricAwareHypAggAtt |
Ran ran on a synthesized input · constructed an object; no result was computed |
junhocho/HGCAE/models/encoders.py code served (permissive licence) · get_code("12913b08638cdab8") How it ranRan 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, GeometricAwareHypAggAtt: 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
torch.manual_seed(0)
# Create a minimal manifold class that implements sqdist method
class MinimalManifold:
def sqdist(self, x1, x2, c):
# Return squared distance as a tensor
return torch.sum((x1 - x2) ** 2, dim=1, keepdim=True)
# Create input tensors
n_nodes = 2
in_features = 4
# Create feature tensor x: shape (n_nodes, in_features)
x = torch.randn(n_nodes, in_features)
# Create sparse adjacency matrix as COO tensor
# We need edges between nodes
edge_indices = torch.tensor([[0, 1], [1, 0]], dtype=torch.long).t().contiguous() # shape (2, 2)
edge_values = torch.ones(2, dtype=torch.float32)
adj = torch.sparse_coo_tensor(edge_indices, edge_values, (n_nodes, n_nodes))
# Create activation function
def relu_act(x):
return torch.relu(x)
# Create the arguments dictionary
ARGS = {
'in_features': in_features,
'manifold': MinimalManifold(),
'dropout': 0.1,
'act': relu_act,
'att_logit': torch.tanh,
'beta': 0.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 GeometricAwareHypAggAtt — 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 GeometricAwareHypAggAtt 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
|
| HypAct |
Ran ran on a synthesized input · constructed an object; no result was computed |
junhocho/HGCAE/models/encoders.py code served (permissive licence) · get_code("3f3addbba6aadb18") How it ranRan 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, HypAct: 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
from torch.nn.modules.module import Module
torch.manual_seed(0)
# Define a minimal manifold class that supports the required interface
class PoincareBallManifold:
def __init__(self):
self.name = 'PoincareBall'
def activation(self, x, act, c_in, c_out):
# Minimal implementation: apply activation and return
return act(x)
def logmap0(self, x, c):
# Minimal implementation: return x scaled by c
return x / (c + 1e-8)
# Define a simple activation function
def simple_activation(x):
return torch.relu(x)
# Create the manifold instance
manifold = PoincareBallManifold()
# Create a tiny input tensor: batch_size=2, dim=4
x = torch.randn(2, 4)
# Define curvature parameters
c_in = 1.0
c_out = 0.5
# Define activation function
act = simple_activation
ARGS = {
'manifold': manifold,
'c_in': c_in,
'c_out': c_out,
'act': act
}
- 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 HypAct — 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 HypAct 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
|
| HypAgg |
Ran ran on a synthesized input · constructed an object; no result was computed |
junhocho/HGCAE/models/encoders.py code served (permissive licence) · get_code("d3afe60057d3d7fa") How it ranRan 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, HypAgg: 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
from torch.nn.modules.module import Module
torch.manual_seed(0)
# Build a minimal manifold class that satisfies the interface used in HypAgg
class MinimalManifold(Module):
def __init__(self):
super(MinimalManifold, self).__init__()
def logmap0(self, x, c=1):
# Return tangent space representation (same shape as input)
return x
def expmap0(self, x, c=1):
# Map from tangent space back to manifold (same shape as input)
return x
def proj(self, x, c=1):
# Project onto manifold (same shape as input)
return x
def sqdist(self, x, y, c):
# Squared distance between points
return torch.sum((x - y) ** 2, dim=1, keepdim=True)
# Create a sparse adjacency matrix (COO format)
n_nodes = 2
edge_indices = torch.tensor([[0, 1, 1, 0], [1, 0, 1, 0]], dtype=torch.long)
edge_values = torch.ones(4, dtype=torch.float32)
adj = torch.sparse_coo_tensor(edge_indices, edge_values, (n_nodes, n_nodes))
# Create node features
in_features = 4
x = torch.randn(n_nodes, in_features)
# Create manifold
manifold = MinimalManifold()
# Build ARGS dict with all parameters for HypAgg
ARGS = {
'manifold': manifold,
'c': 1,
'use_att': True,
'in_features': in_features,
'dropout': 0.1,
'att_type': 'sparse_adjmask_dist',
'att_logit': 'tanh',
'beta': 0.0,
'decode': 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 HypAgg — 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 HypAgg 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
|
| HypAggAtt |
Ran ran; our contract draft was wrong, not the code |
junhocho/HGCAE/models/encoders.py code served (permissive licence) · get_code("5af2c641fe540582") How it ranRan 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 GeometricAwareHypAggAtt. 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
torch.manual_seed(0)
# Create a minimal manifold class that implements the required methods
class MinimalManifold:
def sqdist(self, x1, x2, c):
# Return squared distance between two points
return torch.sum((x1 - x2) ** 2, dim=1, keepdim=True)
# Create test data
n_nodes = 2
in_features = 4
# Create feature matrix
x = torch.randn(n_nodes, in_features)
# Create a sparse adjacency matrix
edge_indices = torch.LongTensor([[0, 1], [1, 0]]).t()
edge_values = torch.ones(2)
adj = torch.sparse_coo_tensor(edge_indices, edge_values, (n_nodes, n_nodes))
# Create minimal manifold
manifold = MinimalManifold()
# Build arguments
ARGS = {
"in_features": in_features,
"manifold": manifold,
"dropout": 0.5,
"act": lambda x: x,
"att_type": None,
"att_logit": "tanh",
"beta": 0.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 GeometricAwareHypAggAtt — a GeometricAwareHypAggAtt output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a GeometricAwareHypAggAtt 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
|
| HypLinear |
Ran ran on a synthesized input · constructed an object; no result was computed |
junhocho/HGCAE/models/encoders.py code served (permissive licence) · get_code("e437debd2b06548e") How it ranRan 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, HypLinear: 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 math
torch.manual_seed(0)
class MockManifold:
"""Mock manifold with required methods for HypLinear."""
def mobius_matvec(self, weight, x, c):
"""Matrix-vector multiplication in Möbius space."""
# Simple mock: just do standard matmul
return torch.matmul(weight, x.t()).t()
def proj(self, x, c):
"""Project onto manifold."""
# Mock: return as-is
return x
def expmap0(self, x, c):
"""Exponential map from origin."""
# Mock: return as-is
return x
def mobius_add(self, x, y, c):
"""Möbius addition."""
# Mock: simple addition
return x + y
# Create mock manifold
manifold = MockManifold()
# Create input tensor: batch_size=2, in_features=4
# Shape: (2, 4)
x = torch.randn(2, 4)
# Arguments for HypLinear
ARGS = {
'manifold': manifold,
'in_features': 4,
'out_features': 3,
'c': torch.tensor(1.0),
'dropout': 0.5,
'use_bias': 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 HypLinear — 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 HypLinear 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
|
| SpecialSpmm |
Ran ran on a synthesized input |
junhocho/HGCAE/models/encoders.py code served (permissive licence) · get_code("a0ffa737ca2c2186") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 2, 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 torch.nn as nn
class SpecialSpmmFunction(torch.autograd.Function):
"""Special function for only sparse region backpropataion layer."""
@staticmethod
def forward(ctx, indices, values, shape, b):
assert indices.requires_grad == False
a = torch.sparse_coo_tensor(indices, values, shape, device=b.device)
ctx.save_for_backward(a, b)
ctx.N = shape[0]
return torch.matmul(a, b)
@staticmethod
def backward(ctx, grad_output):
assert not torch.isnan(grad_output).any()
a, b = ctx.saved_tensors
grad_values = grad_b = None
if ctx.needs_input_grad[1]:
grad_a_dense = grad_output.matmul(b.t())
edge_idx = a._indices()[0, :] * ctx.N + a._indices()[1, :]
grad_values = grad_a_dense.view(-1)[edge_idx]
if ctx.needs_input_grad[3]:
grad_b = a.t().matmul(grad_output)
return (None, grad_values, None, grad_b)
class SpecialSpmm(nn.Module):
def forward(self, indices, values, shape, b):
return SpecialSpmmFunction.apply(indices, values, shape, b)
INIT_ARGS = {}
ARGS = {
'indices': torch.tensor([[0, 1, 2], [1, 2, 0]], dtype=torch.long),
'values': torch.tensor([1.0, 2.0, 3.0], dtype=torch.float32, requires_grad=True),
'shape': (3, 4),
'b': torch.randn(4, 2, dtype=torch.float32, requires_grad=True)
}
- Setup block drafted by
- a language model, class construct-then-call prompt, model not recorded
- 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 float — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
- 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
|
| SpecialSpmmFunction |
Ran ran on a synthesized input · constructed an object; no result was computed |
junhocho/HGCAE/models/encoders.py code served (permissive licence) · get_code("074c8b15e5bd660d") How it ranRan 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, SpecialSpmmFunction: 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
torch.manual_seed(0)
# Build sparse tensor indices and values
# Create a small sparse matrix: 4x3 with a few non-zero entries
indices = torch.tensor([[0, 1, 2, 3], [0, 1, 2, 0]], dtype=torch.long)
values = torch.tensor([1.0, 2.0, 3.0, 4.0], dtype=torch.float32)
shape = (4, 3)
# Build dense tensor b that will be multiplied with sparse matrix
# Shape should be (3, 2) to match sparse matrix columns
b = torch.randn(3, 2, dtype=torch.float32, requires_grad=True)
ARGS = {
'indices': indices,
'values': values,
'shape': shape,
'b': b
}
- 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 SpecialSpmmFunction — 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 SpecialSpmmFunction 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_att_logit |
Ran ran; our contract draft was wrong, not the code |
junhocho/HGCAE/models/encoders.py code served (permissive licence) · get_code("eabedf90b49f2f4b") How it ranRan 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
torch.manual_seed(0)
# The function get_att_logit takes two parameters:
# 1. att_logit: a string (or falsy value) that will be used with getattr(torch, att_logit)
# 2. att_type: appears to be unused in the function body, but we need to provide it
# Based on the function body:
# - att_logit is checked for truthiness
# - If truthy, it's passed to getattr(torch, att_logit) to retrieve a torch attribute
# - att_type is not used in the function, so any value works
# Valid torch attribute names that could be used:
att_logit_value = "sin" # or any other valid torch function/attribute name
att_type_value = "some_type" # unused but required parameter
ARGS = {
"att_logit": att_logit_value,
"att_type": att_type_value,
}
- 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_dim_act_curv |
Ran ran; our contract draft was wrong, not the code |
junhocho/HGCAE/models/encoders.py code served (permissive licence) · get_code("16ac17aa0ccb2abf") How it ranRan 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
import torch.nn as nn
import torch.nn.functional as F
torch.manual_seed(0)
class Args:
def __init__(self):
self.act = 'relu'
self.num_layers = 3
self.feat_dim = 4
self.hidden_dim = '8,6'
self.dim = 5
self.c = 1.0
self.c_trainable = 0
self.cuda = -1
self.device = 'cpu'
ARGS = {'args': Args()}
- 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
|
| HGCAE |
Not yet run unverified (harvested, no recorded run) |
junhocho/HGCAE/models/encoders.py code served (permissive licence) · get_code("480b551018b3650b") How it ran |
| HyperbolicGraphConvolution |
Not yet run unverified (harvested, no recorded run) |
junhocho/HGCAE/models/encoders.py code served (permissive licence) · get_code("09a0d5d032765b3c") How it ran |