SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · ijcai2023_0504 · IJCAI · 2023

CLE-ViT: Contrastive Learning Encoded Transformer for Ultra-Fine-Grained Visual Categorization

Jun Wang, Yongsheng Gao, Xiaohan Yu

Open in the Atlas

Code that ran

12 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; 0 honoured the contract we drafted, 1 violated it and 6 have no contract verdict; 5 failures of our instrument; 3 no recorded run); 1 of them was also run on the host, not in the jail, by the peer-agreement lane that set its level, 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/ijcai2023_0504.json · badge: /api/ran/ijcai2023_0504.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
Markin-Wang/CLEViT canonical (classifier label)
classifier basis: census
12 ran · 3 no recorded run
FunctionStatusWhere it lives
window_partition Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
Markin-Wang/CLEViT/models/swin_mlp.py
pointer only (licence: MIT) · get_code("144d10b49baeb8a6")
How it ran

The body of this sample is withheld: MIT, as GitHub detects it on this paper's repository, Markin-Wang/CLEViT, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with it. 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.

build_optimizer Ran
ran on a synthesized input
Markin-Wang/CLEViT/optimizer.py
pointer only (licence: MIT) · get_code("1b35270a6be791d4")
How it ran

The body of this sample is withheld: MIT, as GitHub detects it on this paper's repository, Markin-Wang/CLEViT, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with it. 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.

build_scheduler Ran
ran; our contract draft was wrong, not the code
Markin-Wang/CLEViT/lr_scheduler.py
code served (permissive licence) · get_code("016895042cc7e7ef")
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 CosineLRScheduler. 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 torch.optim as optim

torch.manual_seed(0)

# Create a simple model for the optimizer
model = nn.Linear(4, 3)

# Create an optimizer
optimizer = optim.SGD(model.parameters(), lr=0.1)

# Create a config object with all required attributes
class Config:
    class TRAIN:
        EPOCHS = 100
        WARMUP_EPOCHS = 5
        MIN_LR = 1e-5
        WARMUP_LR = 1e-4
        
        class LR_SCHEDULER:
            NAME = 'cosine'
            WARMUP_PREFIX = False
            DECAY_EPOCHS = 20
            DECAY_RATE = 0.1
            MULTISTEPS = [30, 60, 90]
            GAMMA = 0.1

config = Config()

# Number of iterations per epoch
n_iter_per_epoch = 100

# Define ARGS dict with all parameters for build_scheduler
ARGS = {
    'config': config,
    'optimizer': optimizer,
    'n_iter_per_epoch': n_iter_per_epoch,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
timm, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type CosineLRScheduler — a CosineLRScheduler output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a CosineLRScheduler 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
check_keywords_in_name Ran
ran, violated the contract we drafted
Markin-Wang/CLEViT/optimizer.py
pointer only (licence: MIT); the stored copy get_code serves, from leaplabthu/inline, is pointer only (licence: NONE) · get_code("b0a5beb34716d5a6")
How it ran

The body of this sample is withheld: MIT, as GitHub detects it on this paper's repository, Markin-Wang/CLEViT, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with it. 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.

con_loss Ran
ran on a synthesized input
Markin-Wang/CLEViT/utils.py
pointer only (licence: MIT) · get_code("913188a7065b7b63")
How it ran

The body of this sample is withheld: MIT, as GitHub detects it on this paper's repository, Markin-Wang/CLEViT, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with it. 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.

create_logger Ran
ran; our contract draft was wrong, not the code
Markin-Wang/CLEViT/logger.py
pointer only (licence: MIT); the stored copy get_code serves, from ghrua/seqpe, is pointer only (licence: NONE) · get_code("80450600f7f09b0a")
How it ran

The body of this sample is withheld: MIT, as GitHub detects it on this paper's repository, Markin-Wang/CLEViT, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with it. 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.

instance_con_loss Ran
ran on a synthesized input
Markin-Wang/CLEViT/utils.py
pointer only (licence: MIT) · get_code("97b2d29599998b62")
How it ran

The body of this sample is withheld: MIT, as GitHub detects it on this paper's repository, Markin-Wang/CLEViT, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with it. 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.

my_con_loss Ran
ran on a synthesized input
Markin-Wang/CLEViT/utils.py
pointer only (licence: MIT) · get_code("78f15f56c6f6c4ad")
How it ran

The body of this sample is withheld: MIT, as GitHub detects it on this paper's repository, Markin-Wang/CLEViT, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with it. 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.

norm_targets Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
Markin-Wang/CLEViT/models/simmim.py
code served (permissive licence) · get_code("c438fe1587079a16")
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 4, dtype family float, shape (2, 1, 4, 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.functional as F

torch.manual_seed(0)

# Create a small 4D tensor (batch=2, channels=1, height=4, width=3)
# This is the targets tensor that will be normalized
targets = torch.randn(2, 1, 4, 3)

# patch_size must be odd
patch_size = 3

ARGS = {
    "targets": targets,
    "patch_size": patch_size,
}
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 4, dtype family float, shape (2, 1, 4, 3) — shape (2, 1, 4, 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
reshape_transform Ran
ran on a synthesized input
Markin-Wang/CLEViT/extract_features.py
pointer only (licence: MIT) · get_code("dc43fbe761e75812")
How it ran

The body of this sample is withheld: MIT, as GitHub detects it on this paper's repository, Markin-Wang/CLEViT, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with it. 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.

set_weight_decay Ran
ran on a synthesized input
Markin-Wang/CLEViT/optimizer.py
pointer only (licence: MIT) · get_code("78862c82805c0e53")
How it ran

The body of this sample is withheld: MIT, as GitHub detects it on this paper's repository, Markin-Wang/CLEViT, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with it. 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.

window_reverse Ran
ran; our contract draft was wrong, not the code
Markin-Wang/CLEViT/models/swin_mlp.py
pointer only (licence: MIT) · get_code("61bf152e6a42a184")
How it ran

The body of this sample is withheld: MIT, as GitHub detects it on this paper's repository, Markin-Wang/CLEViT, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with it. 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.

build_model Not yet run
unverified (harvested, no recorded run)
Markin-Wang/CLEViT/models/build.py
pointer only (licence: MIT); the stored copy get_code serves, from YT3DVision/MVGDNet, is pointer only (licence: NONE) · get_code("aacc86165a54d602")
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 YT3DVision/MVGDNet, 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. No invocation recorded.

get_config Not yet run
unverified (harvested, no recorded run)
Markin-Wang/CLEViT/config.py
pointer only (licence: MIT) · get_code("5ce06d3fc2c667d1")
How it ran

The body of this sample is withheld: MIT, as GitHub detects it on this paper's repository, Markin-Wang/CLEViT, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with it. 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. No invocation recorded.

update_config Not yet run
unverified (harvested, no recorded run)
Markin-Wang/CLEViT/config.py
pointer only (licence: MIT) · get_code("e417cd36f7d40e18")
How it ran

The body of this sample is withheld: MIT, as GitHub detects it on this paper's repository, Markin-Wang/CLEViT, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with it. 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. 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, 8 are also present in other papers whose code we hold (6 with at least one paper dated earlier, 0 the same month, 7 later) and 7 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
window_reverse 227 other papers
74 dated earlier, 78 later, 75 same year, order not determinable · 34 only as an assembly brick
1608.03983 (2016-08)
SGDR: Stochastic Gradient Descent with Warm Restarts
1711.10925 (2017-11)
Deep Image Prior
2003.13678 (2020-03)
Designing Network Design Spaces
and 224 more not named here
window_partition 223 other papers
69 dated earlier, 76 later, 78 same year, order not determinable · 32 only as an assembly brick
1706.03762 (2017-06)
Attention Is All You Need
1711.10925 (2017-11)
Deep Image Prior
2003.13678 (2020-03)
Designing Network Design Spaces
and 220 more not named here
get_config 51 other papers
15 dated earlier, 27 later, 9 same year, order not determinable
2103.14030 (2021-03)
Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
2106.03650 (2021-06)
Shuffle Transformer: Rethinking Spatial Shuffle for Vision Transformer
2106.03746 (2021-06)
Efficient Training of Visual Transformers with Small Datasets
and 48 more not named here
create_logger 35 other papers
12 dated earlier, 16 later, 7 same year, order not determinable
2104.13840 (2021-04)
Twins: Revisiting the Design of Spatial Attention in Vision Transformers
2106.03650 (2021-06)
Shuffle Transformer: Rethinking Spatial Shuffle for Vision Transformer
2106.03746 (2021-06)
Efficient Training of Visual Transformers with Small Datasets
and 32 more not named here
check_keywords_in_name 31 other papers
10 dated earlier, 14 later, 7 same year, order not determinable
2103.14030 (2021-03)
Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
2106.03650 (2021-06)
Shuffle Transformer: Rethinking Spatial Shuffle for Vision Transformer
2106.03746 (2021-06)
Efficient Training of Visual Transformers with Small Datasets
and 28 more not named here
build_scheduler 3 other papers
3 later
2403.20320 (2024-03)
MTLoRA: A Low-Rank Adaptation Approach for Efficient Multi-Task Learning
2404.07794 (2024-04)
DGMamba: Domain Generalization via Generalized State Space Model
2406.08773 (2024-06)
DenoiseRep: Denoising Model for Representation Learning
build_model 1 other paper
1 later
2601.13715 (2026-01)
MVGD-Net: A Novel Motion-aware Video Glass Surface Detection Method
norm_targets 1 other paper
1 dated earlier
2111.06377 (2021-11)
Masked Autoencoders Are Scalable Vision Learners

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

Ultra-fine-grained visual classification (ultra-FGVC) targets at classifying sub-grained categories of fine-grained objects. This inevitably requires discriminative representation learning within a limited training set. Exploring intrinsic features from the object itself, e.g., predicting the rotation of a given image, has demonstrated great progress towards learning discriminative representation. Yet none of these works consider explicit supervision for learning mutual information at instance level. To this end, this paper introduces CLE-ViT, a novel contrastive learning encoded transformer, to address the fundamental problem in ultra-FGVC. The core design is a self-supervised module that performs self-shuffling and masking and then distinguishes these altered images from other images. This drives the model to learn an optimized feature space that has a large inter-class distance while remaining tolerant to intra-class variations. By incorporating this self-supervised module, the network acquires more knowledge from the intrinsic structure of the input data, which improves the generalization ability without requiring extra manual annotations. CLE-ViT demonstrates strong performance on 7 publicly available datasets, demonstrating its effectiveness in the ultra-FGVC task. The code is available at https://github.com/Markin-Wang/CLEViT

For agents

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

get_harvested_code_for_paper("ijcai2023_0504")
get_code_for_paper("ijcai2023_0504")
have("ijcai2023_0504")

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

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

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

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

Connect an agent — have() is free.