SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2410.06535 · NeurIPS · 2024

Happy: A Debiased Learning Framework for Continual Generalized Category Discovery

Zhun Zhong, Fei Zhu, Xu-Yao Zhang, Shijie Ma, Wenzhuo Liu, Cheng-Lin Liu

arXiv · PDF · Open in the Atlas

Code that ran

9 of 16 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (1 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 8 failures of our instrument; 7 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/2410.06535.json · badge: /api/ran/2410.06535.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/Happy-CGCD canonical (classifier label)
classifier basis: census
5 ran · 6 no recorded run
mashijie1028/happy-cgcd canonical (classifier label)
classifier basis: classifier_2025
4 ran · 1 no recorded run
FunctionStatusWhere it lives
DistillLoss Ran
ran on a synthesized input · constructed an object; no result was computed
mashijie1028/happy-cgcd/train_happy.py
code served (permissive licence) · get_code("86764d18d325bc37")
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, DistillLoss: 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 numpy as np

torch.manual_seed(0)

# Define ARGS dict with all parameters for DistillLoss.__init__
ARGS = {
    "warmup_teacher_temp_epochs": 2,
    "nepochs": 5,
    "ncrops": 2,
    "warmup_teacher_temp": 0.07,
    "teacher_temp": 0.04,
    "student_temp": 0.1,
}

# Setup test data for forward pass
# student_output: batch_size=2, ncrops=2, num_classes=4
# Total shape should be (2*2, 4) = (4, 4) since it will be chunked by ncrops
student_output = torch.randn(4, 4)

# teacher_output: batch_size=2, num_classes=4
# Will be chunked into 2 parts
teacher_output = torch.randn(2, 4)

epoch = 0

# Create instance and run forward
loss_fn = nn.Module.__new__(type('DistillLoss', (nn.Module,), {
    '__init__': lambda self, warmup_teacher_temp_epochs, nepochs, ncrops=2, warmup_teacher_temp=0.07, teacher_temp=0.04, student_temp=0.1: (
        super(type(self), self).__init__(),
        setattr(self, 'student_temp', student_temp),
        setattr(self, 'ncrops', ncrops),
        setattr(self, 'teacher_temp_schedule', np.concatenate((np.linspace(warmup_teacher_temp, teacher_temp, warmup_teacher_temp_epochs), np.ones(nepochs - warmup_teacher_temp_epochs) * teacher_temp)))
    ),
    'forward': lambda self, student_output, teacher_output, epoch: (
        lambda student_out, temp, teacher_out: (
            lambda total_loss, n_loss_terms: total_loss / n_loss_terms
        )(
            sum(
                torch.sum(-q * torch.nn.functional.log_softmax(student_out[v], dim=-1), dim=-1).mean()
                for iq, q in enumerate(teacher_out)
                for v in range(len(student_out))
                if v != iq
            ),
            sum(1 for iq, q in enumerate(teacher_out) for v in range(len(student_out)) if v != iq)
        )
    )(
        student_output.chunk(self.ncrops),
        self.teacher_temp_schedule[epoch],
        torch.nn.functional.softmax(teacher_output / self.teacher_temp_schedule[epoch], dim=-1).detach().chunk(2)
    )
}))

# Properly instantiate using the actual class
class DistillLoss(nn.Module):
    def __init__(self, warmup_teacher_temp_epochs, nepochs, ncrops=2, warmup_teacher_temp=0.07, teacher_temp=0.04, student_temp=0.1):
        super().__init__()
        self.student_temp = student_temp
        self.ncrops = ncrops
        self.teacher_temp_schedule = np.concatenate((np.linspace(warmup_teacher_temp, teacher_temp, warmup_teacher_temp_epochs), np.ones(nepochs - warmup_teacher_temp_epochs) * teacher_temp))

    def forward(self, student_output, teacher_output, epoch):
        student_out = student_output / self.student_temp
        student_out = student_out.chunk(self.ncrops)
        temp = self.teacher_temp_schedule[epoch]
        teacher_out = torch.nn.functional.softmax(teacher_output / temp, dim=-1)
        teacher_out = teacher_out.detach().chunk(2)
        total_loss = 0
        n_loss_terms = 0
        for iq, q in enumerate(teacher_out):
            for v in range(len(student_out)):
                if v == iq:
                    continue
                loss = torch.sum(-q * torch.nn.functional.log_softmax(student_out[v], dim=-1), dim=-1)
                total_loss += loss.mean()
                n_loss_terms += 1
        total_loss /= n_loss_terms
        return total_loss

loss_module = DistillLoss(**ARGS)

ARGS = {
    "warmup_teacher_temp_epochs": 2,
    "nepochs": 5,
    "ncrops": 2,
    "warmup_teacher_temp": 0.07,
    "teacher_temp": 0.04,
    "student_temp": 0.1,
}
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 DistillLoss — 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 DistillLoss 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
compute_prior_old_new_ratio Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
mashijie1028/Happy-CGCD/models/utils_simgcd_pro.py
code served (permissive licence) · get_code("632bc6894a3dd5ef")
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. 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
from unittest.mock import MagicMock

torch.manual_seed(0)

# Create a minimal model that returns two outputs (features and logits)
class MinimalModel(nn.Module):
    def __init__(self, num_classes=10):
        super().__init__()
        self.fc = nn.Linear(4, num_classes)
    
    def forward(self, x):
        features = self.fc(x)
        logits = self.fc(x)
        return features, logits

# Create a minimal logger
class MinimalLogger:
    def info(self, msg):
        pass

# Create minimal args object
class MinimalArgs:
    def __init__(self):
        self.num_seen_classes = 5
        self.logger = MinimalLogger()

# Create a minimal data loader (list of batches)
def create_data_loader():
    batches = []
    for _ in range(2):
        images = torch.randn(2, 4)
        labels = torch.randint(0, 10, (2,))
        unused1 = torch.tensor([0])
        unused2 = torch.tensor([0])
        batches.append((images, labels, unused1, unused2))
    return batches

model = MinimalModel(num_classes=10)
online_session_train_loader = create_data_loader()
args = MinimalArgs()
device = 'cpu'

ARGS = {
    'model': model,
    'online_session_train_loader': online_session_train_loader,
    'args': args,
    'device': device,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, tqdm — 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
drop_path Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
mashijie1028/Happy-CGCD/models/lora_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.

get_params_groups Ran
ran; our contract draft was wrong, not the code
mashijie1028/Happy-CGCD/models/utils_simgcd.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/Happy-CGCD/models/utils_gcd.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
log_accs_from_preds Ran
ran; our contract draft was wrong, not the code
mashijie1028/happy-cgcd/train_happy.py
code served (permissive licence) · get_code("7afc6259fa7d9425")
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

class Args:
    def __init__(self):
        self.train_session = 'online'

# Create small test data
np.random.seed(0)
n_samples = 10
n_classes = 4

# y_true: ground truth labels (mix of old and new classes)
y_true = np.array([0, 0, 1, 1, 2, 2, 3, 3, 2, 3], dtype=int)

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

# mask: True for old classes (0, 1), False for new classes (2, 3)
mask = np.array([True, True, True, True, False, False, False, False, False, False], dtype=bool)

# eval_funcs: list of evaluation function names
eval_funcs = ['v2']

# save_name: name for logging
save_name = 'test_eval'

# T: epoch number
T = 1

# print_output: whether to print
print_output = True

# args: configuration object
args = Args()

ARGS = {
    'y_true': y_true,
    'y_pred': y_pred,
    'mask': mask,
    'eval_funcs': eval_funcs,
    'save_name': save_name,
    'T': T,
    'print_output': print_output,
    'args': args
}
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 Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
mashijie1028/happy-cgcd/train_happy.py
code served (permissive licence) · get_code("285f08752cf15565")
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

class Args:
    def __init__(self, train_session='online'):
        self.train_session = train_session

# Create small test data
n_samples = 10
y_true = np.array([0, 0, 1, 1, 2, 2, 3, 3, 4, 4], dtype=np.int64)
y_pred = np.array([0, 0, 1, 1, 2, 2, 3, 3, 4, 4], dtype=np.int64)

# mask: True for old classes (indices 0-5), False for new classes (indices 6-9)
mask = np.array([True, True, True, True, True, True, False, False, False, False])

args = Args(train_session='online')

ARGS = {
    'y_true': y_true,
    'y_pred': y_pred,
    'mask': mask,
    'args': args
}
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
test_online Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
mashijie1028/happy-cgcd/train_happy.py
code served (permissive licence) · get_code("57149724fe52a3ab")
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. 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
import torch.nn as nn
import numpy as np
from typing import List

torch.manual_seed(0)

# Create a minimal model that satisfies the usage in test_online
class MinimalModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.fc = nn.Linear(4, 8)
    
    def forward(self, x):
        # Returns (features, logits) as expected by the code
        logits = self.fc(x)
        return logits, logits

# Create a minimal args object
class Args:
    def __init__(self):
        self.train_classes = list(range(3))  # Classes 0, 1, 2 are old
        self.num_seen_classes = 5  # Classes 0-4 are seen
        self.eval_funcs = ['v2']
        self.train_session = 'online'

# Create test data loader - list of (images, labels, _) tuples
def create_test_loader(num_batches=2, batch_size=2):
    loader = []
    for _ in range(num_batches):
        # Images: shape (batch_size, 4)
        images = torch.randn(batch_size, 4)
        # Labels: mix of old classes (0-2) and new classes (3-6)
        labels = torch.tensor([0, 5], dtype=torch.long)
        # Third element (not used, can be anything)
        dummy = None
        loader.append((images, labels, dummy))
    return loader

model = MinimalModel()
test_loader = create_test_loader(num_batches=2, batch_size=2)
epoch = 1
save_name = "test_eval"
args = Args()

ARGS = {
    'model': model,
    'test_loader': test_loader,
    'epoch': epoch,
    'save_name': save_name,
    'args': args
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy, torch, tqdm — 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
vit_small Ran
ran; our contract draft was wrong, not the code
mashijie1028/Happy-CGCD/models/svft_vision_transformer.py
code served (permissive licence) · get_code("6322d561ced017bc")
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 VisionTransformer. 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)

# Build a minimal VisionTransformer instance for testing
vit_small = nn.Module()

# Set up the minimal attributes and methods needed by the forward pass
vit_small.num_features = 192
vit_small.embed_dim = 192

# Create patch embedding
patch_embed = nn.Conv2d(3, 192, kernel_size=8, stride=8)
vit_small.patch_embed = type('PatchEmbed', (), {
    'num_patches': 4,
    'proj': patch_embed
})()

# Create class token and positional embeddings
vit_small.cls_token = nn.Parameter(torch.zeros(1, 1, 192))
vit_small.pos_embed = nn.Parameter(torch.zeros(1, 5, 192))
vit_small.pos_drop = nn.Dropout(p=0.0)

# Create transformer blocks
blocks = []
for i in range(2):
    block = nn.Module()
    block.norm1 = nn.LayerNorm(192)
    block.attn = nn.Module()
    block.attn.num_heads = 3
    block.attn.qkv = nn.Linear(192, 576, bias=False)
    block.attn.scale = (192 // 3) ** (-0.5)
    block.attn.proj = nn.Linear(192, 192)
    block.attn.proj_drop = nn.Dropout(0.0)
    block.attn.attn_drop = nn.Dropout(0.0)
    
    def attn_forward(self, x):
        B, N, C = x.shape
        qkv = self.qkv(x).reshape(B, N, 3, self.num_heads, C // self.num_heads).permute(2, 0, 3, 1, 4)
        q, k, v = qkv[0], qkv[1], qkv[2]
        attn = q @ k.transpose(-2, -1) * self.scale
        attn = attn.softmax(dim=-1)
        attn = self.attn_drop(attn)
        x = (attn @ v).transpose(1, 2).reshape(B, N, C)
        x = self.proj(x)
        x = self.proj_drop(x)
        return (x, attn)
    
    block.attn.forward = attn_forward.__get__(block.attn, type(block.attn))
    
    block.drop_path = nn.Identity()
    block.norm2 = nn.LayerNorm(192)
    
    mlp = nn.Module()
    mlp.fc1 = nn.Linear(192, 384)
    mlp.act = nn.GELU()
    mlp.fc2 = nn.Linear(384, 192)
    mlp.drop = nn.Dropout(0.0)
    
    def mlp_forward(self, x):
        x = self.fc1(x)
        x = self.act(x)
        x = self.drop(x)
        x = self.fc2(x)
        x = self.drop(x)
        return x
    
    mlp.forward = mlp_forward.__get__(mlp, type(mlp))
    block.mlp = mlp
    
    def block_forward(self, x, return_attention=False):
        y, attn = self.attn(self.norm1(x))
        x = x + self.drop_path(y)
        x = x + self.drop_path(self.mlp(self.norm2(x)))
        if return_attention:
            return (x, attn)
        else:
            return x
    
    block.forward = block_forward.__get__(block, type(block))
    blocks.append(block)

vit_small.blocks = nn.ModuleList(blocks)
vit_small.norm = nn.LayerNorm(192)
vit_small.num_classes = 10

# Create input tensor (batch_size=2, channels=3, height=16, width=16)
input_tensor = torch.randn(2, 3, 16, 16)

# Create return_attention parameter
return_attention = False

ARGS = {
    'model': vit_small,
    'x': input_tensor,
    'return_attention': return_attention
}
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 VisionTransformer — a VisionTransformer output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a VisionTransformer 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_kmeans_centroid_for_new_head Not yet run
unverified (harvested, no recorded run)
mashijie1028/Happy-CGCD/models/utils_simgcd_pro.py
code served (permissive licence) · get_code("5d78dc81d83bd6e5")
How it ran

no invocation recorded.

train_online Not yet run
unverified (harvested, no recorded run)
mashijie1028/happy-cgcd/train_happy.py
code served (permissive licence) · get_code("52ca89bb0d0c98aa")
How it ran

no invocation recorded.

vit_small Not yet run
unverified (harvested, no recorded run)
mashijie1028/Happy-CGCD/models/vision_transformer.py
code served (permissive licence) · get_code("995a10f898196998")
How it ran

no invocation recorded.

vit_small Not yet run
unverified (harvested, no recorded run)
mashijie1028/Happy-CGCD/models/lora_vision_transformer.py
code served (permissive licence) · get_code("d08fbcde9f7f23af")
How it ran

no invocation recorded.

vit_tiny Not yet run
unverified (harvested, no recorded run)
mashijie1028/Happy-CGCD/models/vision_transformer.py
code served (permissive licence) · get_code("996780ba4be89ba3")
How it ran

no invocation recorded.

vit_tiny Not yet run
unverified (harvested, no recorded run)
mashijie1028/Happy-CGCD/models/lora_vision_transformer.py
code served (permissive licence) · get_code("abc2090fa89a2d35")
How it ran

no invocation recorded.

vit_tiny Not yet run
unverified (harvested, no recorded run)
mashijie1028/Happy-CGCD/models/svft_vision_transformer.py
code served (permissive licence) · get_code("92e76c9d03c24769")
How it ran

no invocation recorded.

Also present in other papers' code

Of 16 samples lifted from this paper's linked repositories, 16 carry a function identity and 0 do not. Of the 12 distinct functions with an identity, 6 are also present in other papers whose code we hold (6 with at least one paper dated earlier, 3 the same month, 5 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.

FunctionAlso present inEarliest-datedOthers named
drop_path 224 other papers
182 dated earlier, 3 the same month, 31 later, 7 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
vit_tiny 33 other papers
25 dated earlier, 1 the same month, 6 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
vit_small 22 other papers
18 dated earlier, 1 the same month, 2 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 19 more not named here
get_params_groups
brick of this paper's assembly: helper
10 other papers
7 dated earlier, 3 later · 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
brick of this paper's assembly: helper
7 other papers
4 dated earlier, 3 later · 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
DistillLoss
brick of this paper's assembly: helper
1 other paper
1 dated earlier · 1 only as an assembly brick
2403.04272 (2024-03)
Active 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-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

Constantly discovering novel concepts is crucial in evolving environments. This paper explores the underexplored task of Continual Generalized Category Discovery (C-GCD), which aims to incrementally discover new classes from unlabeled data while maintaining the ability to recognize previously learned classes. Although several settings are proposed to study the C-GCD task, they have limitations that do not reflect real-world scenarios. We thus study a more practical C-GCD setting, which includes more new classes to be discovered over a longer period, without storing samples of past classes. In C-GCD, the model is initially trained on labeled data of known classes, followed by multiple incremental stages where the model is fed with unlabeled data containing both old and new classes. The core challenge involves two conflicting objectives: discover new classes and prevent forgetting old ones. We delve into the conflicts and identify that models are susceptible to prediction bias and hardness bias. To address these issues, we introduce a debiased learning framework, namely Happy, characterized by Hardness-aware prototype sampling and soft entropy regularization. For the prediction bias, we first introduce clustering-guided initialization to provide robust features. In addition, we propose soft entropy regularization to assign appropriate probabilities to new classes, which can significantly enhance the clustering performance of new classes. For the harness bias, we present the hardness-aware prototype sampling, which can effectively reduce the forgetting issue for previously seen classes, especially for difficult classes. Experimental results demonstrate our method proficiently manages the conflicts of C-GCD and achieves remarkable performance across various datasets, e.g., 7.5% overall gains on ImageNet-100. Our code is publicly available at https://github.com/mashijie1028/Happy-CGCD.

For agents

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

get_harvested_code_for_paper("2410.06535")
get_code_for_paper("2410.06535")
have("2410.06535")

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

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

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

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

Connect an agent — have() is free.