SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2009.13504 · ICML · 2021

Information Obfuscation of Graph Neural Networks

Ruslan Salakhutdinov, Tommi Jaakkola, Han Zhao, Keyulu Xu, Peiyuan Liao, Geoffrey Gordon, Stefanie Jegelka

arXiv · PDF · Open in the Atlas

Code that ran

6 of 6 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (5 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 5 have no contract verdict; 1 failure of our instrument; 0 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/2009.13504.json · badge: /api/ran/2009.13504.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
liaopeiyuan/GAL marked official in Papers with Code
Papers with Code archive
6 ran · 0 no recorded run
FunctionStatusWhere it lives
GAL Ran
ran on a synthesized input · constructed an object; no result was computed
liaopeiyuan/GAL/Movielens_Wasserstein/models.py
code served (permissive licence) · get_code("c1f6ba6fe31cbb58")
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, GAL: the run constructed the object and did not call it, so no result was computed. 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
import torch.nn as nn
import numpy as np
from torch_geometric.nn import GCNConv, ChebConv, SAGEConv, GINConv, GATConv

torch.manual_seed(0)

# Define a minimal decoder that has the required methods
class MinimalDecoder(nn.Module):
    def __init__(self, embed_dim):
        super().__init__()
        self.linear = nn.Linear(embed_dim * 2, 1)
    
    def forward(self, head_embeds, tail_embeds, rels):
        combined = torch.cat([head_embeds, tail_embeds], dim=1)
        preds = self.linear(combined)
        loss = preds.mean()
        return loss, preds
    
    def predict(self, head_embeds, tail_embeds):
        combined = torch.cat([head_embeds, tail_embeds], dim=1)
        preds = self.linear(combined)
        return preds

# Define a minimal args object with required attributes
class MinimalArgs:
    def __init__(self):
        self.gnn_layers = 2
        self.gnn_type = 'GCNConv'
        self.device = 'cpu'

# Create decoder
embed_dim = 4
decoder = MinimalDecoder(embed_dim)

# Create args
args = MinimalArgs()

# Create num_ent (number of entities)
num_ent = 10

# Create edges tensor (2, num_edges) - small edge list
edges = torch.LongTensor([[0, 1, 2, 3], [1, 2, 3, 0]])

# Final ARGS dictionary
ARGS = {
    'decoder': decoder,
    'embed_dim': embed_dim,
    'num_ent': num_ent,
    'edges': edges,
    'args': args,
    'encoder': None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch, torch_geometric — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type GAL — 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 GAL 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
GNN Ran
ran on a synthesized input · constructed an object; no result was computed
liaopeiyuan/GAL/Movielens_Wasserstein/models.py
code served (permissive licence) · get_code("c64894d0c9a6c279")
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, GNN: 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_geometric.nn import GCNConv, ChebConv, SAGEConv, GINConv, GATConv

torch.manual_seed(0)

# Create sample arguments
embed = 8
gnn_layers = 2
gnn_type = 'GCNConv'
device = 'cpu'

ARGS = {
    'embed': embed,
    'gnn_layers': gnn_layers,
    'gnn_type': gnn_type,
    'device': device
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, torch_geometric — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type GNN — 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 GNN 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
GradReverse Ran
ran on a synthesized input · constructed an object; no result was computed
liaopeiyuan/GAL/Movielens_Wasserstein/models.py
code served (permissive licence) · get_code("764b8adf807dbb5c")
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, GradReverse: 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)

# GradReverse.forward takes ctx and x as parameters
# x should be a tensor since the forward method calls x.view_as(x)
x = torch.randn(2, 4)

ARGS = {
    'ctx': None,  # ctx is handled internally by autograd
    'x': x
}
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 GradReverse — 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 GradReverse 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
GradientReversalLayer Ran
ran on a synthesized input · constructed an object; no result was computed
liaopeiyuan/GAL/Movielens_Wasserstein/models.py
code served (permissive licence) · get_code("e1eae100d2f87967")
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, GradientReversalLayer: 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)

# GradientReversalLayer only has __init__ which takes no parameters beyond self
# The forward method takes inputs (a tensor)
# We need to test by creating an instance and passing a tensor through it

# Create a small test tensor
test_input = torch.randn(2, 4)

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 GradientReversalLayer — 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 GradientReversalLayer 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
SimpleGCMC Ran
ran on a synthesized input · constructed an object; no result was computed
liaopeiyuan/GAL/Movielens_Wasserstein/models.py
code served (permissive licence) · get_code("6dba9a1d82f4f646")
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, SimpleGCMC: the run constructed the object and did not call it, so no result was computed. 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
import torch.nn as nn
import numpy as np

torch.manual_seed(0)

class SimpleDecoder(nn.Module):
    def __init__(self, embed_dim, num_rels):
        super(SimpleDecoder, self).__init__()
        self.embed_dim = embed_dim
        self.num_rels = num_rels
        self.rel_embed = nn.Embedding(num_rels, embed_dim)
    
    def forward(self, head_embeds, tail_embeds, rels):
        rel_embeds = self.rel_embed(rels)
        preds = torch.sum(head_embeds * rel_embeds * tail_embeds, dim=1)
        loss = torch.tensor(0.5, dtype=torch.float32)
        return loss, preds
    
    def predict(self, head_embeds, tail_embeds):
        preds = torch.sum(head_embeds * tail_embeds, dim=1)
        return preds

embed_dim = 4
num_ent = 9992
num_rels = 5

decoder = SimpleDecoder(embed_dim=embed_dim, num_rels=num_rels)

ARGS = {
    'decoder': decoder,
    'embed_dim': embed_dim,
    'num_ent': num_ent,
    'encoder': None
}
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 SimpleGCMC — 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 SimpleGCMC 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
to_device Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
liaopeiyuan/GAL/Movielens_Wasserstein/models.py
code served (permissive licence) · get_code("40011387371e919d")
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 float; no output shape is stated. 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 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)

# The function takes a tensor and calls .to('cuda') on it
# We need to pass a tensor (or None)
tensor = torch.randn(2, 4)

ARGS = {
    'tensor': tensor
}
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 float — no output shape is stated: observe_signature.py could not observe it (call:AssertionError)
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

Also present in other papers' code

Of 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 6 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 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.

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

While the advent of Graph Neural Networks (GNNs) has greatly improved node and graph representation learning in many applications, the neighborhood aggregation scheme exposes additional vulnerabilities to adversaries seeking to extract node-level information about sensitive attributes. In this paper, we study the problem of protecting sensitive attributes by information obfuscation when learning with graph structured data. We propose a framework to locally filter out pre-determined sensitive attributes via adversarial training with the total variation and the Wasserstein distance. Our method creates a strong defense against inference attacks, while only suffering small loss in task performance. Theoretically, we analyze the effectiveness of our framework against a worst-case adversary, and characterize an inherent trade-off between maximizing predictive accuracy and minimizing information leakage. Experiments across multiple datasets from recommender systems, knowledge graphs and quantum chemistry demonstrate that the proposed approach provides a robust defense across various graph structures and tasks, while producing competitive GNN encoders for downstream tasks.

For agents

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

get_harvested_code_for_paper("2009.13504")
get_code_for_paper("2009.13504")
have("2009.13504")

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

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

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

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

Connect an agent — have() is free.