SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2201.08984 · ICLR · 2022

PiCO+: Contrastive Label Disambiguation for Robust Partial Label Learning

Lei Feng, Gang Niu, Yixuan Li, Gang Chen, Haobo Wang, Ruixuan Xiao, Junbo Zhao

arXiv · PDF · Open in the Atlas

Code that ran

2 of 2 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (2 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 2 have no contract verdict; 0 failures of our instrument; 0 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/2201.08984.json · badge: /api/ran/2201.08984.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
hbzju/pico canonical (classifier label)
classifier basis: classifier_2025
2 ran · 0 no recorded run
FunctionStatusWhere it lives
PiCO Ran
ran on a synthesized input · constructed an object; no result was computed
hbzju/pico/model.py
code served (permissive licence) · get_code("ffa1c2d3b959c9b2")
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, PiCO: the run constructed the object and did not call it, so no result was computed. 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 torch.nn.functional as F

torch.manual_seed(0)

class SimpleEncoder(nn.Module):
    def __init__(self, num_class, feat_dim, name, pretrained):
        super().__init__()
        self.num_class = num_class
        self.feat_dim = feat_dim
        self.name = name
        self.pretrained = pretrained
        self.fc = nn.Linear(8, feat_dim)
        self.classifier = nn.Linear(feat_dim, num_class)
    
    def forward(self, x):
        feat = self.fc(x)
        output = self.classifier(feat)
        feat = F.normalize(feat, dim=1)
        return output, feat

class ArgsStandIn:
    def __init__(self):
        self.dataset = 'imagenet'
        self.num_class = 5
        self.low_dim = 4
        self.arch = 'resnet50'
        self.moco_queue = 8
        self.moco_m = 0.999
        self.proto_m = 0.999

def mock_distributed_init():
    """Mock torch.distributed functions for CPU"""
    if not hasattr(torch.distributed, '_initialized'):
        torch.distributed._initialized = False
    
    if not torch.distributed._initialized:
        torch.distributed._world_size = 1
        torch.distributed._rank = 0
        torch.distributed._initialized = True
        
        original_get_world_size = torch.distributed.get_world_size
        original_get_rank = torch.distributed.get_rank
        original_all_gather = torch.distributed.all_gather
        original_broadcast = torch.distributed.broadcast
        
        def mock_get_world_size():
            return 1
        
        def mock_get_rank():
            return 0
        
        def mock_all_gather(tensor_list, tensor, async_op=False):
            tensor_list[0].copy_(tensor)
        
        def mock_broadcast(tensor, src):
            pass
        
        torch.distributed.get_world_size = mock_get_world_size
        torch.distributed.get_rank = mock_get_rank
        torch.distributed.all_gather = mock_all_gather
        torch.distributed.broadcast = mock_broadcast

mock_distributed_init()

args = ArgsStandIn()
base_encoder = SimpleEncoder

ARGS = {
    'args': args,
    'base_encoder': base_encoder
}
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 PiCO — 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 PiCO 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
PiCO_PLUS Ran
ran on a synthesized input · constructed an object; no result was computed
hbzju/pico/model.py
code served (permissive licence) · get_code("912c59f6ef98b666")
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, PiCO_PLUS: the run constructed the object and did not call it, so no result was computed. 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 torch.nn.functional as F

torch.manual_seed(0)

# Mock base_encoder that satisfies how it's used
class MockEncoder(nn.Module):
    def __init__(self, num_class, feat_dim, name, pretrained=False):
        super().__init__()
        self.num_class = num_class
        self.feat_dim = feat_dim
        self.fc = nn.Linear(8, num_class)
        self.feat_layer = nn.Linear(8, feat_dim)
    
    def forward(self, x):
        # x shape: (batch, channels, height, width) or similar
        # Return (output, features)
        batch_size = x.shape[0]
        feat = self.feat_layer(x.view(batch_size, -1))
        output = self.fc(x.view(batch_size, -1))
        return output, feat

# Mock args object
class MockArgs:
    def __init__(self):
        self.dataset = 'cifar100'
        self.num_class = 5
        self.low_dim = 4
        self.arch = 'resnet18'
        self.moco_queue = 8
        self.moco_m = 0.999
        self.proto_m = 0.999

def mock_base_encoder(num_class, feat_dim, name, pretrained=False):
    return MockEncoder(num_class, feat_dim, name, pretrained)

ARGS = {
    'args': MockArgs(),
    'base_encoder': mock_base_encoder,
}
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 PiCO_PLUS — 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 PiCO_PLUS 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

Also present in other papers' code

Of 2 samples lifted from this paper's linked repositories, 2 carry a function identity and 0 do not. Of the 2 distinct functions with an identity, 0 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 2 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.

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

Partial label learning (PLL) is an important problem that allows each training example to be labeled with a coarse candidate set, which well suits many real-world data annotation scenarios with label ambiguity. Despite the promise, the performance of PLL often lags behind the supervised counterpart. In this work, we bridge the gap by addressing two key research challenges in PLL-representation learning and label disambiguation-in one coherent framework. Specifically, our proposed framework PiCO consists of a contrastive learning module along with a novel class prototype-based label disambiguation algorithm. PiCO produces closely aligned representations for examples from the same classes and facilitates label disambiguation. Theoretically, we show that these two components are mutually beneficial, and can be rigorously justified from an expectation-maximization (EM) algorithm perspective. Moreover, we study a challenging yet practical noisy partial label learning setup, where the ground-truth may not be included in the candidate set. To remedy this problem, we present an extension PiCO+ that performs distance-based clean sample selection and learns robust classifiers by a semi-supervised contrastive learning algorithm. Extensive experiments demonstrate that our proposed methods significantly outperform the current state-of-the-art approaches in standard and noisy PLL tasks and even achieve comparable results to fully supervised learning.

For agents

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

get_harvested_code_for_paper("2201.08984")
get_code_for_paper("2201.08984")
have("2201.08984")

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

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

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

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

Connect an agent — have() is free.