SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2207.07888 · NeurIPS · 2022

SizeShiftReg: a Regularization Method for Improving Size-Generalization in Graph Neural Networks

Pietro Liò, Davide Buffelli, Fabio Vandin

arXiv · PDF · Open in the Atlas

Code that ran

12 of 14 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 12 have no contract verdict; 0 failures of our instrument; 2 no recorded run), measured 2026-11-23; 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/2207.07888.json · badge: /api/ran/2207.07888.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/SizeShiftReg canonical (classifier label)
classifier basis not recorded on the link
12 ran · 2 no recorded run
FunctionStatusWhere it lives
NMI Ran
ran on a synthesized input
DavideBuffelli/SizeShiftReg/lib/spectralcoarsening/measure.py
code served (permissive licence) · get_code("d1969d403abd4c25")
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 float64, ndim 0, 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 numpy as np

# Construct valid arguments for the NMI function
# e1 and e2 are cluster assignments (arrays of integers from 0 to k-1)
# k is the number of clusters

np.random.seed(0)

n_samples = 10
k_clusters = 3

# Create two arrays of cluster assignments
e1 = np.array([0, 0, 1, 1, 2, 2, 0, 1, 2, 0], dtype=int)
e2 = np.array([0, 0, 1, 1, 2, 2, 1, 2, 0, 0], dtype=int)

ARGS = {
    'e1': e1,
    'e2': e2,
    'k': k_clusters
}
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 float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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
build_mlp Ran
ran on a synthesized input
DavideBuffelli/SizeShiftReg/lib/models.py
code served (permissive licence) · get_code("c58bcdcfacb955cf")
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 Sequential. 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 typing import Tuple, Optional, Callable

torch.manual_seed(0)

# Test case 1: 2D shapes (in_dim, o_dim) with no activation
ARGS_simple = {
    "shapes": (10, 5),
    "act": None,
    "n_hidden": 0,
    "batch_norm": False,
    "dropout": 0.0
}

# Test case 2: 3D shapes (in_dim, h_dim, o_dim) with activation and hidden layers
ARGS_complex = {
    "shapes": (10, 16, 5),
    "act": nn.ReLU,
    "n_hidden": 2,
    "batch_norm": False,
    "dropout": 0.0
}

# Test case 3: 3D shapes with batch norm and dropout
ARGS_with_features = {
    "shapes": (8, 12, 4),
    "act": nn.Tanh,
    "n_hidden": 3,
    "batch_norm": True,
    "dropout": 0.5
}

# Use the complex case as the primary ARGS
ARGS = ARGS_complex
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 Sequential — a Sequential output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Sequential output the recorded ndim 1 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
compute_deg_hist Ran
ran on a synthesized input
DavideBuffelli/SizeShiftReg/lightning_modules.py
code served (permissive licence) · get_code("397dd927942e5077")
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 1, dtype family int, shape (3,) 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
from torch_geometric.data import Data

torch.manual_seed(0)

# Create small graph data objects with edge_index and num_nodes attributes
data1 = Data(
    edge_index=torch.tensor([[0, 1, 2], [1, 2, 0]], dtype=torch.long),
    num_nodes=3
)

data2 = Data(
    edge_index=torch.tensor([[0, 1], [1, 2]], dtype=torch.long),
    num_nodes=3
)

data3 = Data(
    edge_index=torch.tensor([[0, 1, 1, 2], [1, 0, 2, 1]], dtype=torch.long),
    num_nodes=3
)

ds = [data1, data2, data3]

ARGS = {
    "ds": ds
}
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 Tensor, ndim 1, dtype family int, shape (3,) — shape (3,) 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
cosine_distance Ran
ran on a synthesized input
DavideBuffelli/SizeShiftReg/lib/spectralcoarsening/measure.py
code served (permissive licence) · get_code("bc4f109b9a9d0897")
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 float64, ndim 0, 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 numpy as np
import numpy.linalg as LA

# Create two small numpy arrays representing embeddings
e1 = np.array([1.0, 2.0, 3.0, 4.0])
e2 = np.array([2.0, 3.0, 4.0, 5.0])

ARGS = {
    "e1": e1,
    "e2": e2,
}
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 float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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_batch_num_coarse_nodes Ran
ran on a synthesized input
DavideBuffelli/SizeShiftReg/lib/coarsening_utils.py
code served (permissive licence) · get_code("a549b167e11bdf64")
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 dict. 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)

class MockBatch:
    """Mock batch object with dynamic coarse node attributes"""
    def __init__(self):
        self.num_coarse_nodes_25 = 10
        self.num_coarse_nodes_50 = 5
        self.num_coarse_nodes_75 = 3

batch = MockBatch()
coarse_ratios = [0.25, 0.5, 0.75]

ARGS = {
    "batch": batch,
    "coarse_ratios": coarse_ratios,
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
l2diff Ran
ran on a synthesized input
DavideBuffelli/SizeShiftReg/losses.py
code served (permissive licence) · get_code("5cd8693437b867bc")
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 1, dtype family float, shape (2,) 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 two small tensors with shape (batch=2, dim=4)
x1 = torch.randn(2, 4)
x2 = torch.randn(2, 4)

ARGS = {
    "x1": x1,
    "x2": x2,
}
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 1, dtype family float, shape (2,) — shape (2,) 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
normalizeLaplacian Ran
ran on a synthesized input
DavideBuffelli/SizeShiftReg/lib/spectralcoarsening/laplacian.py
code served (permissive licence) · get_code("d524f08b3c8216c1")
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 ndarray, ndim 2, dtype family float, shape (4, 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 numpy as np

# Create a small adjacency matrix G
# The function expects a 2D array (adjacency matrix)
# It computes: I - D^(-1/2) * G * D^(-1/2)
# where D is the degree matrix (diagonal of row sums)

G = np.array([
    [0.0, 1.0, 1.0, 0.0],
    [1.0, 0.0, 1.0, 1.0],
    [1.0, 1.0, 0.0, 1.0],
    [0.0, 1.0, 1.0, 0.0]
], dtype=np.float64)

ARGS = {
    "G": G
}
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 ndarray, ndim 2, dtype family float, shape (4, 4) — shape (4, 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
normalized_L1 Ran
ran on a synthesized input
DavideBuffelli/SizeShiftReg/lib/spectralcoarsening/measure.py
code served (permissive licence) · get_code("4194a9ca7b6a070a")
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 float64, ndim 0, 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 numpy as np

# Create two small numpy arrays for e1 and e2
e1 = np.array([1.0, 2.0, 3.0, 4.0])
e2 = np.array([2.0, 1.0, 4.0, 3.0])

ARGS = {
    "e1": e1,
    "e2": e2,
}
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 float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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
regular_partition Ran
ran on a synthesized input
DavideBuffelli/SizeShiftReg/lib/spectralcoarsening/coarsening.py
code served (permissive licence) · get_code("dbba509e5ffbbcc0")
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 ndarray, ndim 1, dtype family int, shape (10,) 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

# Construct arguments for regular_partition
# The function takes:
# - N: total number of elements (int)
# - n: number of partitions (int)

N = 10  # total number of elements
n = 3   # number of partitions

ARGS = {
    "N": N,
    "n": n,
}
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 ndarray, ndim 1, dtype family int, shape (10,) — shape (10,) 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
spectraLaplacian Ran
ran on a synthesized input
DavideBuffelli/SizeShiftReg/lib/spectralcoarsening/laplacian.py
code served (permissive licence) · get_code("8e93224440d8475a")
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 numpy as np

# Create a small adjacency matrix G for testing
# This should be a square matrix representing a graph
# Using a 4x4 matrix for consistency with the mentioned dimensions
G = np.array([
    [0.0, 1.0, 1.0, 0.0],
    [1.0, 0.0, 1.0, 1.0],
    [1.0, 1.0, 0.0, 1.0],
    [0.0, 1.0, 1.0, 0.0]
], dtype=np.float64)

ARGS = {
    'G': G
}
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 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
spectraLaplacian_two_end_n Ran
ran on a synthesized input
DavideBuffelli/SizeShiftReg/lib/spectralcoarsening/laplacian.py
code served (permissive licence) · get_code("2e4e27a20ff75a66")
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 numpy as np

# Create a small adjacency matrix G
# The function uses G to compute normalized Laplacian
# G should be square, so we'll make it 5x5
# Use a simple symmetric adjacency matrix
G = np.array([
    [0, 1, 1, 0, 0],
    [1, 0, 1, 1, 0],
    [1, 1, 0, 1, 1],
    [0, 1, 1, 0, 1],
    [0, 0, 1, 1, 0]
], dtype=np.float64)

# n should be less than or equal to G.shape[0]
# G.shape[0] = 5, so n can be at most 5
n = 2

ARGS = {
    "G": G,
    "n": n
}
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 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
stratified_ksplit Ran
ran on a synthesized input
DavideBuffelli/SizeShiftReg/lib/data.py
code served (permissive licence) · get_code("32c5157cc6e049fe")
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
from torch.utils.data import Dataset, ConcatDataset

torch.manual_seed(0)

class SimpleDataset(Dataset):
    def __init__(self, data_y, size=10):
        self.data = type('obj', (object,), {'y': data_y})()
        self.size = size
        self._indices = list(range(size))
    
    def __len__(self):
        return len(self._indices)
    
    def __getitem__(self, idx):
        if isinstance(idx, list) or isinstance(idx, torch.Tensor):
            if isinstance(idx, torch.Tensor):
                idx = idx.tolist()
            subset = SimpleDataset(
                self.data.y[idx] if isinstance(self.data.y, torch.Tensor) else torch.tensor([self.data.y[i] for i in idx]),
                size=len(idx)
            )
            subset._indices = [self._indices[i] for i in idx]
            return subset
        elif isinstance(idx, slice):
            start, stop, step = idx.indices(len(self))
            subset_indices = self._indices[start:stop:step]
            subset_y = self.data.y[subset_indices] if isinstance(self.data.y, torch.Tensor) else torch.tensor([self.data.y[i] for i in subset_indices])
            subset = SimpleDataset(subset_y, size=len(subset_indices))
            subset._indices = subset_indices
            return subset
        else:
            return self._indices[idx]
    
    def shuffle(self):
        indices = list(range(len(self)))
        torch.randperm(len(self)).tolist()
        shuffled = SimpleDataset(self.data.y, size=self.size)
        shuffled._indices = indices
        return shuffled

y_tensor = torch.tensor([0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2])
dataset = SimpleDataset(y_tensor, size=12)

ARGS = {
    "dataset": dataset,
    "k": 3,
    "fold": 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 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_batch_coarse_ratios Not yet run
unverified (harvested, no recorded run)
DavideBuffelli/SizeShiftReg/lib/coarsening_utils.py
code served (permissive licence) · get_code("0d99791d10f56d2a")
How it ran

no invocation recorded.

get_induced Not yet run
unverified (harvested, no recorded run)
DavideBuffelli/SizeShiftReg/lib/run_escape.py
code served (permissive licence) · get_code("9d9def7109076311")
How it ran

no invocation recorded.

Also present in other papers' code

Of 14 samples lifted from this paper's linked repositories, 14 carry a function identity and 0 do not. Of the 14 distinct functions with an identity, 1 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 1 later) and 13 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
regular_partition 1 other paper
1 later
2306.08854 (2023-06)
A Gromov-Wasserstein Geometric View of Spectrum-Preserving Graph Coarsening

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

In the past few years, graph neural networks (GNNs) have become the de facto model of choice for graph classification. While, from the theoretical viewpoint, most GNNs can operate on graphs of any size, it is empirically observed that their classification performance degrades when they are applied on graphs with sizes that differ from those in the training data. Previous works have tried to tackle this issue in graph classification by providing the model with inductive biases derived from assumptions on the generative process of the graphs, or by requiring access to graphs from the test domain. The first strategy is tied to the quality of the assumptions made for the generative process, and requires the use of specific models designed after the explicit definition of the generative process of the data, leaving open the question of how to improve the performance of generic GNN models in general settings. On the other hand, the second strategy can be applied to any GNN, but requires access to information that is not always easy to obtain. In this work we consider the scenario in which we only have access to the training data, and we propose a regularization strategy that can be applied to any GNN to improve its generalization capabilities from smaller to larger graphs without requiring access to the test data. Our regularization is based on the idea of simulating a shift in the size of the training graphs using coarsening techniques, and enforcing the model to be robust to such a shift. Experimental results on standard datasets show that popular GNN models, trained on the 50% smallest graphs in the dataset and tested on the 10% largest graphs, obtain performance improvements of up to 30% when trained with our regularization strategy. 36th Conference on Neural Information Processing Systems (NeurIPS 2022).

For agents

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

get_harvested_code_for_paper("2207.07888")
get_code_for_paper("2207.07888")
have("2207.07888")

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

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

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

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

Connect an agent — have() is free.