SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · ijcai2025_0115 · IJCAI · 2025

Reliable and Diverse Hierarchical Adapter for Zero-shot Video Classification

Rui Yan, Xiangbo Shu, Hongyu Qu, Peng Huang, Guosen Xie, Wenxuan Ge

Open in the Atlas

Code that ran

10 of 17 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 0 have no contract verdict; 10 failures of our instrument; 7 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/ijcai2025_0115.json · badge: /api/ran/ijcai2025_0115.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
Gwxer/Hierarchical-Adapter canonical (classifier label)
classifier basis: census
10 ran · 7 no recorded run
FunctionStatusWhere it lives
basic_clean Ran
ran; our contract draft was wrong, not the code
Gwxer/Hierarchical-Adapter/clip/simple_tokenizer.py
pointer only (licence: MIT); the stored copy get_code serves, from ltpwy/MSCI, is pointer only (licence: NONE) · get_code("98f385d847636a3e")
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 ltpwy/MSCI, 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_entropy Ran
ran; our contract draft was wrong, not the code
Gwxer/Hierarchical-Adapter/tda_help.py
code served (permissive licence) · get_code("f61d80185edfb078")
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 float, ndim 0, dtype family float, shape () 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 math

torch.manual_seed(0)

# Analyze the function:
# - loss: used in division, should be a numeric value (float or tensor)
# - clip_weights: has .size(1) method called on it, so it's a torch.Tensor
#   The function accesses dimension 1, so it should be at least 2D

loss = torch.tensor(2.4)

clip_weights = torch.randn(2, 4)

ARGS = {
    "loss": loss,
    "clip_weights": clip_weights,
}
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 float, ndim 0, dtype family float, shape () — shape () 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_pairs Ran
ran; our contract draft was wrong, not the code
Gwxer/Hierarchical-Adapter/clip/simple_tokenizer.py
code served (permissive licence) · get_code("d919ae32e5e4e616")
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 set. 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

torch.manual_seed(0)

# The function get_pairs takes a word parameter
# A word is represented as a tuple of symbols (variable-length strings)
# The function iterates through the word and creates pairs of consecutive symbols

word = ("hello", "world", "test")

ARGS = {
    "word": word
}
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 set — a set output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a set 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
mmcv_collate Ran
ran; our contract draft was wrong, not the code
Gwxer/Hierarchical-Adapter/datasets/build.py
code served (permissive licence) · get_code("df8d21531cfb89cb")
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. 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
from collections.abc import Sequence, Mapping

torch.manual_seed(0)

# Create a batch of data - using a list of dictionaries with tensors
batch = [
    {
        'image': torch.randn(2, 4),
        'label': torch.tensor([0]),
        'id': torch.tensor([1])
    },
    {
        'image': torch.randn(2, 4),
        'label': torch.tensor([1]),
        'id': torch.tensor([2])
    }
]

ARGS = {
    'batch': batch,
    'samples_per_gpu': 1
}
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 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
one_hot Ran
ran; our contract draft was wrong, not the code
Gwxer/Hierarchical-Adapter/datasets/blending.py
code served (permissive licence) · get_code("4728dc2025227bba")
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, 4) as a later run recorded it. 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, 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 a small input tensor with class indices
# Shape: (2,) - batch of 2 samples with class indices
x = torch.tensor([0, 2], dtype=torch.long)

# Number of classes
num_classes = 4

# On value for one-hot encoding
on_value = 1.0

# Off value for one-hot encoding
off_value = 0.0

# Device - use CPU only
device = 'cpu'

ARGS = {
    'x': x,
    'num_classes': num_classes,
    'on_value': on_value,
    'off_value': off_value,
    'device': device
}
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, 4) — shape (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
shear_x Ran
ran; our contract draft was wrong, not the code
Gwxer/Hierarchical-Adapter/datasets/rand_augment.py
code served (permissive licence) · get_code("e866e1196986f728")
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 Image. 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 random
import PIL
from PIL import Image, ImageEnhance, ImageOps

# Create a simple PIL Image object
img = Image.new('RGB', (100, 100), color='red')

# Define ARGS dict with all parameters for shear_x
ARGS = {
    'img': img,
    'factor': 0.5,
    'resample': Image.BILINEAR,
    'fillcolor': (255, 255, 255)
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Image — a Image output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Image output the recorded ndim 3 and dtype family int 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
shear_y Ran
ran; our contract draft was wrong, not the code
Gwxer/Hierarchical-Adapter/datasets/rand_augment.py
code served (permissive licence) · get_code("7b2503c99c9447fb")
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 Image. 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 random
import PIL
from PIL import Image, ImageEnhance, ImageOps

# Create a simple PIL Image for testing
img = Image.new('RGB', (100, 100), color='red')

# Define ARGS dict with all parameters for shear_y function
ARGS = {
    'img': img,
    'factor': 0.5,
    'resample': Image.BILINEAR,
    'fillcolor': (255, 255, 255)
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Image — a Image output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Image output the recorded ndim 3 and dtype family int 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
softmax_entropy Ran
ran; our contract draft was wrong, not the code
Gwxer/Hierarchical-Adapter/tda_help.py
code served (permissive licence) · get_code("c2df94ca3de67eb0")
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 1, dtype family float, shape (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)

# The function expects a tensor x with:
# - .softmax(1) method
# - .log_softmax(1) method
# - .sum(1) method
# These are standard PyTorch tensor operations

# Create a small tensor: batch_size=2, features=4
x = torch.randn(2, 4)

ARGS = {
    "x": x
}
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 1, dtype family float, shape (2,) — shape (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
translate_x_rel Ran
ran; our contract draft was wrong, not the code
Gwxer/Hierarchical-Adapter/datasets/rand_augment.py
code served (permissive licence) · get_code("323759f906fbb394")
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 Image. 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 random
import PIL
from PIL import Image
import numpy as np

# Create a small PIL Image object for testing
# The function uses img.size[0] and img.transform()
test_img = Image.new('RGB', (100, 80), color='red')

# Define ARGS dict with all parameters for translate_x_rel
ARGS = {
    'img': test_img,
    'pct': 0.2,
    'resample': Image.BILINEAR,
    'fillcolor': (255, 255, 255)
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Image — a Image output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Image output the recorded ndim 3 and dtype family int 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
whitespace_clean Ran
ran; our contract draft was wrong, not the code
Gwxer/Hierarchical-Adapter/clip/simple_tokenizer.py
pointer only (licence: MIT); the stored copy get_code serves, from ltpwy/MSCI, is pointer only (licence: NONE) · get_code("9542161e9640b858")
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 ltpwy/MSCI, 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.

DTWDistance Not yet run
unverified (harvested, no recorded run)
Gwxer/Hierarchical-Adapter/model/logits_compute.py
code served (permissive licence) · get_code("2bef20abe3f9d703")
How it ran

no invocation recorded.

build_model Not yet run
unverified (harvested, no recorded run)
Gwxer/Hierarchical-Adapter/clip/model.py
code served (permissive licence) · get_code("c2cd1c3643471ec2")
How it ran

no invocation recorded.

cls_acc Not yet run
unverified (harvested, no recorded run)
Gwxer/Hierarchical-Adapter/tda_help.py
code served (permissive licence) · get_code("f2a0a5061e7c204e")
How it ran

no invocation recorded.

compute_cache_logits Not yet run
unverified (harvested, no recorded run)
Gwxer/Hierarchical-Adapter/model/logits_compute.py
code served (permissive licence) · get_code("296fbc20ffeb0a22")
How it ran

no invocation recorded.

compute_cache_logits_DTW Not yet run
unverified (harvested, no recorded run)
Gwxer/Hierarchical-Adapter/model/logits_compute.py
code served (permissive licence) · get_code("8a039950f82b2adf")
How it ran

no invocation recorded.

load Not yet run
unverified (harvested, no recorded run)
Gwxer/Hierarchical-Adapter/clip/clip.py
code served (permissive licence) · get_code("a8400efcfd69e3a2")
How it ran

no invocation recorded.

update_cache Not yet run
unverified (harvested, no recorded run)
Gwxer/Hierarchical-Adapter/model/cache_update.py
code served (permissive licence) · get_code("3d2b657cedf0cecc")
How it ran

no invocation recorded.

Also present in other papers' code

Of 17 samples lifted from this paper's linked repositories, 17 carry a function identity and 0 do not. Of the 17 distinct functions with an identity, 12 are also present in other papers whose code we hold (12 with at least one paper dated earlier, 0 the same month, 9 later) and 5 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
get_pairs 258 other papers
208 dated earlier, 22 later, 27 same year, order not determinable, 1 undated · 4 only as an assembly brick
1802.06474 (2018-02)
A Closed-form Solution to Photorealistic Image Stylization
1803.01128 (2018-03)
Seq2Sick: Evaluating the Robustness of Sequence-to-Sequence Models with Adversarial Examples
1809.00125 (2018-09)
Simple Fusion: Return of the Language Model
and 255 more not named here
whitespace_clean 231 other papers
186 dated earlier, 15 later, 29 same year, order not determinable, 1 undated · 4 only as an assembly brick
1901.07441 (2019-01)
PadChest: A large chest x-ray image dataset with multi-label annotated reports
2107.06383 (2021-07)
How Much Can CLIP Benefit Vision-and-Language Tasks?
2108.10904 (2021-08)
SimVLM: Simple Visual Language Model Pretraining with Weak Supervision
and 228 more not named here
basic_clean 218 other papers
186 dated earlier, 2 later, 29 same year, order not determinable, 1 undated · 4 only as an assembly brick
1901.07441 (2019-01)
PadChest: A large chest x-ray image dataset with multi-label annotated reports
2107.06383 (2021-07)
How Much Can CLIP Benefit Vision-and-Language Tasks?
2108.10904 (2021-08)
SimVLM: Simple Visual Language Model Pretraining with Weak Supervision
and 215 more not named here
load 88 other papers
71 dated earlier, 7 later, 9 same year, order not determinable, 1 undated
2203.05557 (2022-03)
Conditional Prompt Learning for Vision-Language Models
2206.01986 (2022-06)
Delving into the Openness of CLIP
2207.12819 (2022-07)
S-Prompts Learning with Pre-trained Transformers: An Occam's Razor for Domain Incremental Learning
and 85 more not named here
build_model 30 other papers
23 dated earlier, 3 later, 4 same year, order not determinable
2210.03117 (2022-10)
MaPLe: Multi-modal Prompt Learning
2212.03640 (2022-12)
Fine-tuned CLIP Models are Efficient Video Learners
2304.04704 (2023-04)
Prompt Pre-Training with Twenty-Thousand Classes for Open-Vocabulary Visual Recognition
and 27 more not named here
shear_x 27 other papers
26 dated earlier, 1 later
1811.12814 (2018-11)
Graph-Based Global Reasoning Networks
2109.03508 (2021-09)
RepNAS: Searching for Efficient Re-parameterizing Blocks
2109.06165 (2021-09)
CDTrans: Cross-domain Transformer for Unsupervised Domain Adaptation
and 24 more not named here
shear_y 27 other papers
26 dated earlier, 1 later
1811.12814 (2018-11)
Graph-Based Global Reasoning Networks
2109.03508 (2021-09)
RepNAS: Searching for Efficient Re-parameterizing Blocks
2109.06165 (2021-09)
CDTrans: Cross-domain Transformer for Unsupervised Domain Adaptation
and 24 more not named here
translate_x_rel 26 other papers
25 dated earlier, 1 later
1811.12814 (2018-11)
Graph-Based Global Reasoning Networks
2109.03508 (2021-09)
RepNAS: Searching for Efficient Re-parameterizing Blocks
2109.06165 (2021-09)
CDTrans: Cross-domain Transformer for Unsupervised Domain Adaptation
and 23 more not named here
cls_acc 12 other papers
7 dated earlier, 2 later, 3 same year, order not determinable · 2 only as an assembly brick
2210.01253 (2022-10)
PLOT: PROMPT LEARNING WITH OPTIMAL TRANS-PORT FOR VISION-LANGUAGE MODELS
2402.04087 (2024-02)
A Hard-to-Beat Baseline for Training-free CLIP-based Adaptation
2403.12964 (2024-03)
Enhancing Vision-Language Few-Shot Adaptation with Negative Learning
and 9 more not named here
one_hot 12 other papers
12 dated earlier · 1 only as an assembly brick
1710.09412 (2017-10)
mixup: BEYOND EMPIRICAL RISK MINIMIZATION
2109.03508 (2021-09)
RepNAS: Searching for Efficient Re-parameterizing Blocks
2212.00776 (2022-12)
ResFormer: Scaling ViTs with Multi-Resolution Training
and 9 more not named here
softmax_entropy 7 other papers
7 dated earlier
2310.02575 (2023-10)
AdaMerging: Adaptive Model Merging for Multi-Task Learning
2402.02705 (2024-02)
Representation Surgery for Multi-Task Model Merging
2407.07089 (2024-07)
Fine-Tuning Attention Modules Only: Enhancing Weight Disentanglement in Task Arithmetic
and 4 more not named here
get_entropy 1 other paper
1 dated earlier
2410.15430 (2024-10)
BoostAdapter: Improving Vision-Language Test-Time Adaptation via Regional Bootstrapping

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

Adapting pre-trained vision-language models to downstream tasks has emerged as a novel paradigm for zero-shot learning. Existing test-time adaptation (TTA) methods such as TPT attempt to finetune visual or textual representations to accommodate downstream tasks but still require expensive optimization costs. To this end, Training-free Dynamic Adapter (TDA) maintains a cache containing visual features for each category in a parameterfree manner and measures sample confidence based on prediction entropy of test samples. Inspired by TDA, this work aims to develop the first trainingfree adapter for zero-shot video classification. Capturing the intrinsic temporal relationships within video data to construct and maintain the video cache is key to extending TDA to the video domain. In this work, we propose a reliable and diverse Hierarchical Adapter for zero-shot video classification, which consists of Frame-level Cache Refiner and Video-level Cache Updater. Before each video sample enters the corresponding cache, it needs to be refined at frame level based on prediction entropy and temporal probability difference. Due to the limited capacity of the cache, we update the cache during inference based on the principle of diversity. Experiments on four popular video classification benchmarks demonstrate the effectiveness of Hierarchical Adapter. The code is available at https://github.com/Gwxer/Hierarchical-Adapter.

For agents

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

get_harvested_code_for_paper("ijcai2025_0115")
get_code_for_paper("ijcai2025_0115")
have("ijcai2025_0115")

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

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

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

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

Connect an agent — have() is free.