SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · openreview_YA3AvVx2Ze

CoGe-GCD: Reframing Generalized Category Discovery with Compositional Generalization

Cheng Chen, Chaoqi Chen, Luyao Tang, Yue Huang, Kunze Huang, Jiewei Zheng

OpenReview · Open in the Atlas

Code that ran

6 of 9 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 1 has no contract verdict; 4 failures of our instrument; 3 no recorded run), measured 2026-11-24; 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/openreview_YA3AvVx2Ze.json · badge: /api/ran/openreview_YA3AvVx2Ze.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
lytang63/CoGe-GCD canonical (classifier label)
classifier basis: census
6 ran · 3 no recorded run
FunctionStatusWhere it lives
calibrate_memberships Ran
ran on a synthesized input
lytang63/CoGe-GCD/models/compositional.py
code served (permissive licence) · get_code("f4aaae2710ba1c3b")
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
import torch.nn.functional as F

torch.manual_seed(0)

# Small tensors with distinct dimensions for probing
batch_size = 2
height = 4
width = 3
token_count = height * width  # 12
primitive_count = 5
token_dim = 8

# scores: (batch, token_count, primitive_count)
scores = torch.randn(batch_size, token_count, primitive_count)

# tokens: (batch, token_count, token_dim)
tokens = torch.randn(batch_size, token_count, token_dim)

# temperature parameter
temperature = 1.0

ARGS = {
    'scores': scores,
    'tokens': tokens,
    'height': height,
    'width': width,
    'temperature': temperature,
    'eps': 1e-12,
}
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
drop_add_residual_stochastic_depth Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
lytang63/CoGe-GCD/models/vision_transformer2.py
code served (permissive licence) · get_code("167e169f064431a0")
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 3, dtype family float, shape (2, 3, 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 torch.nn as nn

torch.manual_seed(0)

class SimpleResidualFunc(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 4)
    
    def forward(self, x):
        return self.linear(x)

# Create a simple residual function
residual_func = SimpleResidualFunc()

# Create input tensor: (batch_size=2, sequence_length=3, embedding_dim=4)
x = torch.randn(2, 3, 4)

# Define arguments
ARGS = {
    "x": x,
    "residual_func": residual_func,
    "sample_drop_ratio": 0.5,
}
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 3, dtype family float, shape (2, 3, 4) — shape (2, 3, 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
drop_path Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
lytang63/CoGe-GCD/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.

make_2tuple Ran
ran, honoured the contract we drafted
lytang63/CoGe-GCD/models/vision_transformer2.py
code served (permissive licence) · get_code("3c04490a215299f2")
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, ndim 1, dtype family int; 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 numpy as np

torch.manual_seed(0)

# Test case 1: tuple input with length 2
test_tuple = (5, 7)

# Test case 2: integer input
test_int = 3

# We'll create ARGS with the integer case
ARGS = {
    "x": test_int
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, torch — 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 int — 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
named_apply Ran
ran; our contract draft was wrong, not the code
lytang63/CoGe-GCD/models/vision_transformer2.py
code served (permissive licence) · get_code("e9858e26f4c51e98")
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 SimpleModel. 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 Callable

torch.manual_seed(0)

# Define a simple callback function that will be applied to modules
def apply_fn(module: nn.Module, name: str):
    """Simple function that gets applied to each module"""
    pass

# Build a small nested nn.Module to traverse
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear1 = nn.Linear(4, 3)
        self.linear2 = nn.Linear(3, 2)
        self.nested = nn.Sequential(
            nn.Linear(2, 5),
            nn.ReLU()
        )
    
    def forward(self, x):
        x = self.linear1(x)
        x = self.linear2(x)
        x = self.nested(x)
        return x

module = SimpleModel()

ARGS = {
    'fn': apply_fn,
    'module': module,
    'name': '',
    'depth_first': True,
    'include_root': False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type SimpleModel — a SimpleModel output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a SimpleModel 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
pairwise_distance Ran
ran; our contract draft was wrong, not the code
lytang63/CoGe-GCD/methods/clustering/faster_mix_k_means_pytorch.py
code served (permissive licence) · get_code("980dd2e8fa24f9da")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family float, shape (4, 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 small tensors for pairwise distance computation
# data1: N1 x M matrix (4 points, 3 dimensions)
# data2: N2 x M matrix (2 points, 3 dimensions)
data1 = torch.randn(4, 3)
data2 = torch.randn(2, 3)

ARGS = {
    "data1": data1,
    "data2": data2,
    "batch_size": None,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (4, 2) — shape (4, 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
info_nce_logits Not yet run
unverified (harvested, no recorded run)
lytang63/CoGe-GCD/methods/contrastive_training/contrastive_training.py
code served (permissive licence) · get_code("40f5a2f8b0143f94")
How it ran

no invocation recorded.

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

no invocation recorded.

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

no invocation recorded.

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 8 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 1 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
224 same year, order not determinable · 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
33 same year, order not determinable
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
named_apply 26 other papers
25 same year, order not determinable, 1 undated
2010.11929 (2020-10)
An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
2204.07683 (2022-04)
Safe Self-Refinement for Transformer-based Domain Adaptation
2304.07193 (2023-04)
DINOv2: Learning Robust Visual Features without Supervision
and 23 more not named here
vit_small 22 other papers
22 same year, order not determinable
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
drop_add_residual_stochastic_depth 21 other papers
20 same year, order not determinable, 1 undated
2010.11929 (2020-10)
An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
2304.07193 (2023-04)
DINOv2: Learning Robust Visual Features without Supervision
2312.02366 (2023-12)
Evaluating General Purpose Vision Foundation Models for Medical Image Analysis: An Experimental Study of DINOv2 on Radiology Benchmarks
and 18 more not named here
make_2tuple 20 other papers
20 same year, order not determinable · 1 only as an assembly brick
2010.11929 (2020-10)
An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
2304.07193 (2023-04)
DINOv2: Learning Robust Visual Features without Supervision
2312.02366 (2023-12)
Evaluating General Purpose Vision Foundation Models for Medical Image Analysis: An Experimental Study of DINOv2 on Radiology Benchmarks
and 17 more not named here
pairwise_distance 7 other papers
7 same year, order not determinable
2201.02609 (2022-01)
Generalized Category Discovery
2212.05590 (2022-12)
PromptCAL: Contrastive Affinity Learning via Auxiliary Prompts for Generalized Novel Category Discovery
2308.11063 (2023-08)
MetaGCD: Learning to Continually Learn in Generalized Category Discovery
and 4 more not named here
info_nce_logits 1 other paper
1 same year, order not determinable
2408.14371 (2024-08)
SelEx: Self-Expertise in Fine-Grained 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) assigns unlabeled instances, mixed with labeled data, to known or novel categories, requiring humanlike compositional reasoning: reusing primitives learned from known classes and deciding when new combinations imply new categories. Existing GCD methods operate on unstructured token features and struggle to extrapolate to novel compositions. We propose CoGe-GCD, which rethinks GCD through compositional generalization with two coupled stages. (i) Compositional Perception structures patch tokens by mapping them to a small vocabulary of primitives and refining token embeddings via competitive token-primitive assignment and information passing, yielding coherent groups for discovery. (ii) Generalizing Induction exploits the induced geometric structure and applies a structure-preserving calibration over spatial relations, maintaining probabilistic semantics while improving extrapolation to unseen primitive combinations. CoGe-GCD is implemented as an inductive-bias module between backbone and projection head, without modifying heads or losses, and can be plugged into diverse GCD frameworks. On standard benchmarks, it consistently improves all-class accuracy, unknown-class number estimation, and geometric quality, with marginal computational overhead. Code is available at github.com/lytang63/CoGe-GCD.

For agents

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

get_harvested_code_for_paper("openreview_YA3AvVx2Ze")
get_code_for_paper("openreview_YA3AvVx2Ze")
have("openreview_YA3AvVx2Ze")

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

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

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

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

Connect an agent — have() is free.