SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 02160 · ECCV · 2024

Prompting Language-Informed Distribution for Compositional Zero-Shot Learning

Heng Huang, Lichang Chen, Yu Kong, Wentao Bao

Open in the Atlas

Code that ran

7 of 8 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 4 have no contract verdict; 3 failures of our instrument; 1 no recorded run), measured 2026-11-22; 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/02160.json · badge: /api/ran/02160.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
Cogito2012/PLID canonical (classifier label)
classifier basis: census
7 ran · 1 no recorded run
FunctionStatusWhere it lives
decompose_texts Ran
ran on a synthesized input
Cogito2012/PLID/models/losses.py
code served (permissive licence) · get_code("4f8ed975b63f1ee7")
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 (3, 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

torch.manual_seed(0)

# Construct arguments for decompose_texts
# features: (K, B, D) - K=5 samples, B=2 batch size, D=4 feature dimension
features = torch.randn(5, 2, 4)

# num_objs: scalar - number of objects to decompose into
num_objs = 3

# obj_idx: (K,) - object index for each of K samples, values in range [0, num_objs)
obj_idx = torch.tensor([0, 1, 2, 0, 1])

ARGS = {
    "features": features,
    "num_objs": num_objs,
    "obj_idx": obj_idx,
}
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 (3, 2, 4) — shape (3, 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
get_text_representations Ran
ran on a synthesized input
Cogito2012/PLID/evaluate.py
code served (permissive licence) · get_code("c888066e5cdf0438")
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 (2, 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
import torch.nn as nn

torch.manual_seed(0)

class MockModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def set_pairs_group(self, dataset):
        pass
    
    def compute_text_representations(self, dataset, norm=True, get_feat=False):
        # Return a small tensor representation
        return torch.randn(2, 3)

class MockDataset:
    def __init__(self):
        self.data = [(torch.randn(2, 4), torch.randint(0, 2, (2,))) for _ in range(2)]
    
    def __iter__(self):
        return iter(self.data)
    
    def __len__(self):
        return len(self.data)

class MockConfig:
    def __init__(self, experiment_name='gencsp'):
        self.experiment_name = experiment_name

model = MockModel()
dataset = MockDataset()
config = MockConfig(experiment_name='gencsp')

ARGS = {
    'model': model,
    'dataset': dataset,
    'config': config,
    'norm': True,
    'get_feat': 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 Tensor, ndim 2, dtype family float, shape (2, 3) — shape (2, 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
kernelMatrixGaussian Ran
ran; our contract draft was wrong, not the code
Cogito2012/PLID/models/hsic.py
pointer only (licence: BSD-3-Clause); the stored copy get_code serves, from liangchen527/RIDG, is pointer only (licence: NONE) · get_code("160bb5f66cd8558e")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (BSD-3-Clause), but get_code serves the stored copy, first harvested from liangchen527/RIDG, 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.

kernelMatrixLinear Ran
ran; our contract draft was wrong, not the code
Cogito2012/PLID/models/hsic.py
pointer only (licence: BSD-3-Clause); the stored copy get_code serves, from liangchen527/RIDG, is pointer only (licence: NONE) · get_code("9ff5c4ac3b4e9b35")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (BSD-3-Clause), but get_code serves the stored copy, first harvested from liangchen527/RIDG, 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.

pairwise_distances Ran
ran; our contract draft was wrong, not the code
Cogito2012/PLID/models/hsic.py
pointer only (licence: BSD-3-Clause); the stored copy get_code serves, from liangchen527/RIDG, is pointer only (licence: NONE) · get_code("21bf8deeec959d90")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (BSD-3-Clause), but get_code serves the stored copy, first harvested from liangchen527/RIDG, 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.

upperbound_group_logits Ran
ran on a synthesized input
Cogito2012/PLID/models/losses.py
code served (permissive licence) · get_code("b9ea6f47549f58c9")
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 (2, 5) 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)

# Define dimensions carefully to be distinct
K = 5  # number of text features
B = 3  # number of prompts
D = 4  # embedding dimension
bs = 2  # batch size
num_objs = 3  # number of objects/classes

# logits: (bs, K) - batch_size x num_text_features
logits = torch.randn(bs, K)

# text_norm: (K, B, D) - num_text_features x num_prompts x embedding_dim
text_norm = torch.randn(K, B, D)

# img_norm: (bs, D) - batch_size x embedding_dim
img_norm = torch.randn(bs, D)

# labels: (bs,) - class indices for each batch element, values in [0, num_objs)
labels = torch.tensor([0, 2], dtype=torch.long)

# scale: () - scalar
scale = torch.tensor(2.5)

# obj_idx: (K,) - object/class assignment for each text feature, values in [0, num_objs)
obj_idx = torch.tensor([0, 0, 1, 1, 2], dtype=torch.long)

ARGS = {
    "logits": logits,
    "text_norm": text_norm,
    "img_norm": img_norm,
    "labels": labels,
    "scale": scale,
    "num_objs": num_objs,
    "obj_idx": obj_idx,
}
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 (2, 5) — shape (2, 5) 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
upperbound_logits Ran
ran on a synthesized input
Cogito2012/PLID/models/losses.py
code served (permissive licence) · get_code("56ed2be1f48ae4e6")
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 (2, 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

torch.manual_seed(0)

# Define dimensions
batch_size = 2
n_class = 3  # K
n_prompt = 5  # B
embed_dim = 4  # D

# Create valid arguments
logits = torch.randn(batch_size, n_class)
text_norm = torch.randn(n_class, n_prompt, embed_dim)
img_norm = torch.randn(batch_size, embed_dim)
labels = torch.tensor([0, 2])  # Valid class indices for batch_size=2
scale = torch.tensor(1.5)

ARGS = {
    "logits": logits,
    "text_norm": text_norm,
    "img_norm": img_norm,
    "labels": labels,
    "scale": scale,
}
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 (2, 3) — shape (2, 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
load_feasibilities Not yet run
unverified (harvested, no recorded run)
Cogito2012/PLID/evaluate.py
code served (permissive licence) · get_code("284a5e2bf37a9aff")
How it ran

no invocation recorded.

Also present in other papers' code

Of 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 distinct functions with an identity, 8 are also present in other papers whose code we hold (8 with at least one paper dated earlier, 0 the same month, 0 later) and 0 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
kernelMatrixGaussian 3 other papers
2 dated earlier, 1 same year, order not determinable
2305.14428 (2023-05)
Prompting Language-Informed Distribution for Compositional Zero-Shot Learning
2308.11158 (2023-08)
Domain Generalization via Rationale Invariance
2403.08649 (2024-03)
A Causal Inspired Early-Branching Structure for Domain Generalization
kernelMatrixLinear 3 other papers
2 dated earlier, 1 same year, order not determinable
2305.14428 (2023-05)
Prompting Language-Informed Distribution for Compositional Zero-Shot Learning
2308.11158 (2023-08)
Domain Generalization via Rationale Invariance
2403.08649 (2024-03)
A Causal Inspired Early-Branching Structure for Domain Generalization
pairwise_distances 3 other papers
2 dated earlier, 1 same year, order not determinable
2305.14428 (2023-05)
Prompting Language-Informed Distribution for Compositional Zero-Shot Learning
2308.11158 (2023-08)
Domain Generalization via Rationale Invariance
2403.08649 (2024-03)
A Causal Inspired Early-Branching Structure for Domain Generalization
decompose_texts 1 other paper
1 dated earlier
2305.14428 (2023-05)
Prompting Language-Informed Distribution for Compositional Zero-Shot Learning
get_text_representations 1 other paper
1 dated earlier
2305.14428 (2023-05)
Prompting Language-Informed Distribution for Compositional Zero-Shot Learning
load_feasibilities 1 other paper
1 dated earlier
2305.14428 (2023-05)
Prompting Language-Informed Distribution for Compositional Zero-Shot Learning
upperbound_group_logits 1 other paper
1 dated earlier
2305.14428 (2023-05)
Prompting Language-Informed Distribution for Compositional Zero-Shot Learning
upperbound_logits 1 other paper
1 dated earlier
2305.14428 (2023-05)
Prompting Language-Informed Distribution for Compositional Zero-Shot Learning

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

Compositional zero-shot learning (CZSL) task aims to recognize unseen compositional visual concepts, e.g., sliced tomatoes, where the model is learned only from the seen compositions, e.g., sliced potatoes and red tomatoes. Thanks to the prompt tuning on large pre-trained visual language models such as CLIP, recent literature shows impressively better CZSL performance than traditional vision-based methods. However, the key aspects that impact the generalization to unseen compositions, including the diversity and informativeness of class context, and the entanglement between visual primitives, i.e., state and object, are not properly addressed in existing CLIP-based CZSL literature. In this paper, we propose a model by prompting the language-informed distribution, aka., PLID, for the CZSL task. Specifically, the PLID leverages pre-trained large language models (LLM) to (i) formulate the language-informed class distributions which are diverse and informative, and (ii) enhance the compositionality of the class embedding. Moreover, a visual-language primitive decomposition (VLPD) module is proposed to dynamically fuse the classification decisions from the compositional and the primitive space. Orthogonal to the existing literature of soft, hard, or distributional prompts, our method advocates prompting the LLM-supported class distributions, leading to a better zero-shot generalization. Experimental results on MIT-States, UT-Zappos, and C-GQA datasets show the superior performance of the PLID to the prior arts. Our code and models are released: https://github.com/Cogito2012/PLID.

For agents

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

get_harvested_code_for_paper("02160")
get_code_for_paper("02160")
have("02160")

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

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

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

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

Connect an agent — have() is free.