SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2504.03755 · 2025

ProtoGCD: Unified and Unbiased Prototype Learning for Generalized Category Discovery

arXiv · PDF · Open in the Atlas

Code that ran

14 of 15 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; 1 honoured the contract we drafted, 0 violated it and 8 have no contract verdict; 5 failures of our instrument; 1 no recorded run), measured 2026-11-24; 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/2504.03755.json · badge: /api/ran/2504.03755.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
mashijie1028/protogcd canonical (classifier label)
classifier basis not recorded on the link
14 ran · 1 no recorded run
FunctionStatusWhere it lives
drop_path Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
mashijie1028/protogcd/models/vision_transformer.py
pointer only (licence: MIT); the stored copy get_code serves, from gladzhang/Xformer, is pointer only (licence: NONE) · get_code("55120f2026b56aa2")
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 gladzhang/Xformer, 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.

entropy_regularization_loss Ran
ran on a synthesized input
mashijie1028/protogcd/models/loss.py
code served (permissive licence) · get_code("7a96a31292b7e97a")
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 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 torch
import math

torch.manual_seed(0)

# The function expects:
# - logits: a tensor that will be divided by temperature and passed to softmax
#   The function uses dim=1 for softmax and dim=0 for mean, so it needs shape (batch, num_classes)
# - temperature: a scalar value for temperature scaling

logits = torch.randn(2, 4)  # batch_size=2, num_classes=4
temperature = 0.5

ARGS = {
    "logits": logits,
    "temperature": temperature,
}
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 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
get_ood_scores Ran
ran on a synthesized input
mashijie1028/protogcd/my_utils/ood_utils.py
code served (permissive licence) · get_code("655d96ad1b7b3de4")
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 float, shape (4,) as a later run recorded it. 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, 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
import torch.nn as nn
import numpy as np

torch.manual_seed(0)

# Build a minimal model that returns (feats, _, logits, prototypes)
class DummyModel(nn.Module):
    def __init__(self, num_classes=5, feat_dim=4, logit_dim=5):
        super().__init__()
        self.num_classes = num_classes
        self.feat_dim = feat_dim
        self.logit_dim = logit_dim
        
    def forward(self, x):
        batch_size = x.shape[0]
        feats = torch.randn(batch_size, self.feat_dim)
        logits = torch.randn(batch_size, self.logit_dim)
        prototypes = torch.randn(self.num_classes, self.feat_dim)
        return feats, None, logits, prototypes

# Build a minimal args config
class Args:
    def __init__(self):
        self.batch_size = 2
        self.temp_logits = 1.0
        self.T = 1.0
        self.score = 'energy'

args = Args()

# Build a minimal loader (list of batches)
# Each batch is a tuple of (images, labels)
loader = [
    (torch.randn(2, 3, 8, 8), torch.tensor([0, 1])),
    (torch.randn(2, 3, 8, 8), torch.tensor([2, 3])),
    (torch.randn(2, 3, 8, 8), torch.tensor([4, 0])),
]

model = DummyModel(num_classes=5, feat_dim=4, logit_dim=5)
ood_num_examples = 4

ARGS = {
    'loader': loader,
    'model': model,
    'ood_num_examples': ood_num_examples,
    'args': args,
}
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 ndarray, ndim 1, dtype family float, shape (4,) — shape (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
get_ood_scores_in Ran
ran on a synthesized input
mashijie1028/protogcd/my_utils/ood_utils.py
code served (permissive licence) · get_code("db00ee40ebe7a2dd")
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. 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)

# Build a minimal model that returns (feats, _, logits, prototypes)
class MinimalModel(nn.Module):
    def __init__(self, num_classes=3):
        super().__init__()
        self.num_classes = num_classes
        self.fc = nn.Linear(4, num_classes)
    
    def forward(self, x):
        # x shape: (batch_size, 4)
        logits = self.fc(x)
        feats = x  # dummy features
        prototypes = torch.randn(self.num_classes, 4)  # dummy prototypes
        return feats, None, logits, prototypes

model = MinimalModel(num_classes=3)
model.eval()

# Build a minimal data loader: list of (images, labels, _) tuples
# Batch size 2, image feature dim 4, 3 classes
loader = [
    (torch.randn(2, 4), torch.tensor([0, 1]), None),
    (torch.randn(2, 4), torch.tensor([2, 0]), None),
]

# Build args object with all required attributes
class Args:
    def __init__(self):
        self.temp_logits = 1.0
        self.T = 1.0
        self.score = 'energy'  # one of: 'energy', 'mls', 'xent', 'proto', 'margin', or default

args = Args()

ARGS = {
    'loader': loader,
    'model': model,
    'args': args,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch, tqdm — 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_params_groups Ran
ran; our contract draft was wrong, not the code
mashijie1028/protogcd/models/model.py
code served (permissive licence) · get_code("ec22c16f1e0653f7")
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 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 torch.nn as nn

torch.manual_seed(0)

class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        # Create parameters with different shapes to test the logic
        self.linear1 = nn.Linear(4, 3)  # weight: (3, 4), bias: (3,)
        self.linear2 = nn.Linear(3, 2)  # weight: (2, 3), bias: (2,)
        self.register_parameter('scalar_param', nn.Parameter(torch.tensor(1.0)))
    
    def forward(self, x):
        x = self.linear1(x)
        x = self.linear2(x)
        return x

model = SimpleModel()

ARGS = {
    'model': model
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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 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
info_nce_logits Ran
ran; our contract draft was wrong, not the code
mashijie1028/protogcd/models/loss.py
code served (permissive licence) · get_code("b3c2e94d4887d26b")
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 tuple. 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.functional as F

torch.manual_seed(0)

# The function expects:
# - features: a tensor of shape (batch_size, feature_dim)
#   The function does: features.size(0), F.normalize(features, dim=1), matmul with transpose
# - n_views: int, default 2
# - temperature: float, default 1.0
# - device: str, default 'cuda'

# Create features tensor
# With n_views=2, the function expects features.size(0) to be even (b_ = 0.5 * features.size(0))
# Let's use batch_size=4, feature_dim=8
features = torch.randn(4, 8)

ARGS = {
    'features': features,
    'n_views': 2,
    'temperature': 1.0,
    'device': 'cpu'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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
init_experiment Ran
ran on a synthesized input
mashijie1028/protogcd/my_utils/general_utils.py
code served (permissive licence) · get_code("3c5ee964462a01ff")
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 Namespace. 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 torch
import tempfile
from argparse import Namespace

torch.manual_seed(0)

# Create a temporary directory for experiment outputs
temp_dir = tempfile.mkdtemp()

# Build the args object with all required attributes
args = Namespace(
    exp_root=temp_dir,
    dataset_name='test_dataset',
    exp_name='test_experiment',
    logger=None,
    log_dir=None,
    model_dir=None,
    model_path=None,
    # Additional attributes that might be used in hparam_dict
    learning_rate=0.001,
    batch_size=32,
    num_epochs=10,
    use_dropout=True,
    seed=42,
    model_name='test_model',
    small_tensor=torch.randn(2, 4),
)

ARGS = {
    'args': args,
    'runner_name': None,
    'exp_id': None,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
loguru, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Namespace — a Namespace output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Namespace 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
init_experiment_estimate_k Ran
ran on a synthesized input
mashijie1028/protogcd/my_utils/general_utils.py
code served (permissive licence) · get_code("ce9a1c162b7bb795")
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 Namespace. 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 torch
import tempfile
from argparse import Namespace

torch.manual_seed(0)

# Create a temporary directory for experiment root
temp_exp_root = tempfile.mkdtemp()

# Create args namespace with all required attributes
args = Namespace(
    exp_root=temp_exp_root,
    dataset_name='test_dataset',
    exp_name='test_experiment',
    estimate_novel_k=5,
    learning_rate=0.001,
    batch_size=32,
    epochs=10,
    model_name='test_model',
    seed=42,
    verbose=True,
    some_tensor=torch.randn(2, 4),
    some_float=3.14,
    some_bool=False
)

ARGS = {
    'args': args,
    'runner_name': None,
    'exp_id': None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
loguru, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Namespace — a Namespace output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Namespace 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
old_cluster_acc Ran
ran on a synthesized input
mashijie1028/protogcd/my_utils/cluster_and_log_utils.py
code served (permissive licence) · get_code("fde9e423d59feca8")
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

# Set seed for reproducibility
np.random.seed(0)

# Create small sample data for clustering accuracy evaluation
# y_true: ground truth labels
y_true = np.array([0, 0, 1, 1, 2, 2], dtype=int)

# y_pred: predicted cluster labels
y_pred = np.array([0, 0, 1, 1, 2, 2], dtype=int)

# return_ind: whether to return the assignment indices and confusion matrix
return_ind = False

ARGS = {
    "y_true": y_true,
    "y_pred": y_pred,
    "return_ind": return_ind,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — 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
prototype_separation_loss Ran
ran on a synthesized input
mashijie1028/protogcd/models/loss.py
code served (permissive licence) · get_code("502c820b11521b6a")
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 0, dtype family float, shape () as a later run recorded it. 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, 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)

# The function expects:
# - prototypes: a tensor of shape (num_classes, embedding_dim)
# - temperature: a float
# - base_temperature: a float
# - device: a string

# Create a small prototype tensor with 4 classes and 3-dim embeddings
num_classes = 4
embedding_dim = 3
prototypes = torch.randn(num_classes, embedding_dim)

ARGS = {
    'prototypes': prototypes,
    'temperature': 0.1,
    'base_temperature': 0.1,
    'device': 'cpu'
}
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 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
split_cluster_acc_v2 Ran
ran on a synthesized input
mashijie1028/protogcd/my_utils/cluster_and_log_utils.py
code served (permissive licence) · get_code("965fcd5f9ab03841")
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, 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 numpy as np

# Create small sample data
# y_true: ground truth labels (5 samples, labels from 0-2)
y_true = np.array([0, 0, 1, 2, 2], dtype=int)

# y_pred: predicted labels (5 samples, labels from 0-2)
y_pred = np.array([0, 0, 1, 2, 1], dtype=int)

# mask: boolean array indicating which instances are from old classes (True) vs new classes (False)
# First 3 instances are from old classes, last 2 from new classes
mask = np.array([True, True, True, False, False], dtype=bool)

ARGS = {
    "y_true": y_true,
    "y_pred": y_pred,
    "mask": mask,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple 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
split_cluster_acc_v2_balanced Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
mashijie1028/protogcd/my_utils/cluster_and_log_utils.py
code served (permissive licence) · get_code("50edbf115e750bdd")
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, 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 numpy as np

# Set random seed for reproducibility
np.random.seed(0)

# Create small synthetic data for clustering evaluation
n_samples = 10
n_classes = 4

# y_true: ground truth labels
y_true = np.array([0, 0, 1, 1, 2, 2, 3, 3, 0, 1], dtype=np.int64)

# y_pred: predicted cluster labels
y_pred = np.array([0, 0, 1, 1, 2, 2, 3, 3, 0, 1], dtype=np.int64)

# mask: True for old classes (indices 0-5), False for new classes (indices 6-9)
# This distinguishes between instances from old classes vs new classes
mask = np.array([True, True, True, True, True, True, False, False, True, True], dtype=bool)

ARGS = {
    "y_true": y_true,
    "y_pred": y_pred,
    "mask": mask,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple 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
stable_cumsum Ran
ran, honoured the contract we drafted
mashijie1028/protogcd/my_utils/ood_utils.py
pointer only (licence: MIT); the stored copy get_code serves, from fanghenshaometeor/ood-kernel-pca-ext, is pointer only (licence: NONE) · get_code("d4acb3120a027622")
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 fanghenshaometeor/ood-kernel-pca-ext, 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.

trunc_normal_ Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
mashijie1028/protogcd/models/vision_transformer.py
code served (permissive licence) · get_code("fabe0899316ffaa5")
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 Tensor, ndim 2, dtype family float, shape (2, 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
import math

torch.manual_seed(0)

# Create a small tensor to be initialized
tensor = torch.empty(2, 4)

# Define arguments for trunc_normal_
ARGS = {
    'tensor': tensor,
    'mean': 0.0,
    'std': 1.0,
    'a': -2.0,
    'b': 2.0
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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, shape (2, 4) — shape (2, 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
vit_tiny Not yet run
unverified (harvested, no recorded run)
mashijie1028/protogcd/models/vision_transformer.py
code served (permissive licence) · get_code("059df77687f34567")
How it ran

no invocation recorded.

Also present in other papers' code

Of 15 samples lifted from this paper's linked repositories, 15 carry a function identity and 0 do not. Of the 15 distinct functions with an identity, 7 are also present in other papers whose code we hold (7 with at least one paper dated earlier, 1 the same month, 4 later) and 8 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
drop_path 224 other papers
209 dated earlier, 11 later, 3 same year, order not determinable, 1 undated · 38 only as an assembly brick
2003.12039 (2020-03)
RAFT: Recurrent All-Pairs Field Transforms for Optical Flow
2007.09384 (2020-07)
Multi-Scale Positive Sample Refinement for Few-Shot Object Detection
2010.11929 (2020-10)
An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
and 221 more not named here
trunc_normal_ 160 other papers
141 dated earlier, 1 the same month, 16 later, 2 same year, order not determinable · 36 only as an assembly brick
1911.10194 (2019-11)
Panoptic-DeepLab: A Simple, Strong, and Fast Baseline for Bottom-Up Panoptic Segmentation
2005.10242 (2020-05)
Understanding Contrastive Representation Learning through Alignment and Uniformity on the Hypersphere
2007.12911 (2020-07)
Tighter risk certificates for neural networks
and 157 more not named here
vit_tiny 33 other papers
29 dated earlier, 3 later, 1 undated
2201.02609 (2022-01)
Generalized Category Discovery
2202.11929 (2022-02)
Word Segmentation on Discovered Phone Units with Dynamic Programming and Self-Supervised Scoring
2203.08414 (2022-03)
Unsupervised Semantic Segmentation by Distilling Feature Correspondences
and 30 more not named here
stable_cumsum 29 other papers
27 dated earlier, 2 later · 1 only as an assembly brick
1911.11132 (2019-11)
Scaling Out-of-Distribution Detection for Real-World Settings
2003.08440 (2020-03)
Synthesize then Compare: Detecting Failures and Anomalies for Semantic Segmentation
2104.08812 (2021-04)
Contrastive Out-of-Distribution Detection for Pretrained Transformers
and 26 more not named here
get_params_groups 10 other papers
8 dated earlier, 2 same year, order not determinable · 1 only as an assembly brick
2104.14294 (2021-04)
Emerging Properties in Self-Supervised Vision Transformers
2211.11727 (2022-11)
Parametric Classification for Generalized Category Discovery: A Baseline Study
2308.12112 (2023-08)
Category Adaptation Meets Projected Distillation in Generalized Continual Category Discovery
and 7 more not named here
info_nce_logits 7 other papers
5 dated earlier, 2 same year, order not determinable · 1 only as an assembly brick
2211.11727 (2022-11)
Parametric Classification for Generalized Category Discovery: A Baseline Study
2310.01376 (2023-10)
Towards Distribution-Agnostic Generalized Category Discovery
2403.04272 (2024-03)
Active Generalized Category Discovery
and 4 more not named here
split_cluster_acc_v2_balanced 1 other paper
1 dated earlier
2310.01376 (2023-10)
Towards Distribution-Agnostic Generalized Category Discovery

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-24.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Generalized category discovery (GCD) is a pragmatic but underexplored problem, which requires models to automatically cluster and discover novel categories by leveraging the labeled samples from old classes. The challenge is that unlabeled data contain both old and new classes. Early works leveraging pseudo-labeling with parametric classifiers handle old and new classes separately, which brings about imbalanced accuracy between them. Recent methods employing contrastive learning neglect potential positives and are decoupled from the clustering objective, leading to biased representations and sub-optimal results. To address these issues, we introduce a unified and unbiased prototype learning framework, namely ProtoGCD, wherein old and new classes are modeled with joint prototypes and unified learning objectives, {enabling unified modeling between old and new classes}. Specifically, we propose a dual-level adaptive pseudo-labeling mechanism to mitigate confirmation bias, together with two regularization terms to collectively help learn more suitable representations for GCD. Moreover, for practical considerations, we devise a criterion to estimate the number of new classes. Furthermore, we extend ProtoGCD to detect unseen outliers, achieving task-level unification. Comprehensive experiments show that ProtoGCD achieves state-of-the-art performance on both generic and fine-grained datasets. The code is available at https://github.com/mashijie1028/ProtoGCD.

For agents

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

get_harvested_code_for_paper("2504.03755")
get_code_for_paper("2504.03755")
have("2504.03755")

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

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

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

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

Connect an agent — have() is free.