CAF · Contextual Adaptive Fusion

When to Trust Adaptation: Contextual Fusion for Transferable Vision-Language Prompting

Paper · GitHub code · Training logs

CAF fuses frozen and prompted CLIP routes using prediction entropy and evaluation collection context.

CAF weights four vision-language routes using prediction entropy and unlabeled statistics of the evaluation collection. Each released checkpoint contains the learned visual and text prompts and the two fusion scalars, approximately 0.50 MB in total. The CAF implementation downloads and verifies the frozen OpenAI CLIP ViT-B/16 backbone on first use.

Downloads

Archive Contents
CAF_transfer_models.zip Table 1. Three ImageNet source checkpoints at epoch 5, one per seed.
CAF_base2new_models.zip Table 2. CAF with shared loss coefficients across 11 datasets and three seeds, at epoch 20.
CAF_star_base2new_models.zip Table 2. CAF* with dataset-specific loss coefficients across 11 datasets and three seeds, at epoch 20.
CAF_reproducibility_assets.zip Required for all runs. Contains the exact sample lists, class order, prompt initializations, and frozen text features.
CAF_logs.zip Original training logs and exported evaluation records for bulk download.

The three model archives contain 69 checkpoint entries from 66 distinct training runs. CAF and CAF* share the three Flowers102 checkpoints. See the checkpoint index and archive checksums for provenance and verification.

Reproduce the evaluation

Follow the installation instructions and dataset instructions for the original images and evaluation environment. Use the Hugging Face CLI to download the archives and the CAF environment to run the evaluation. Extract the archives from the CAF source directory, where assets/ and pretrained/ are expected beside train.py.

git clone https://github.com/zhenyuanchenai/CAF.git
cd CAF
git checkout --detach b0167635cf51f61348856faad427f3a6fb9fda6d

hf download ZhenyuanChen/CAF CAF_reproducibility_assets.zip SHA256SUMS.txt --local-dir .
sha256sum -c --ignore-missing SHA256SUMS.txt
unzip CAF_reproducibility_assets.zip

DATA=/path/to/datasets

Table 1 · Cross-dataset and cross-domain transfer

The source checkpoints were trained for five epochs using 16 images per class from all 1,000 ImageNet classes. Evaluation covers the ImageNet validation set, ten cross-dataset targets, and four ImageNet variants.

hf download ZhenyuanChen/CAF CAF_transfer_models.zip --local-dir .
sha256sum -c --ignore-missing SHA256SUMS.txt
unzip CAF_transfer_models.zip
CUDA_VISIBLE_DEVICES=0 bash scripts/reproduce/transfer.sh "$DATA" test pretrained
ImageNet Avg-10 Avg-4
72.26 ± 0.03 69.96 ± 0.14 61.36 ± 0.08

Values are accuracy in percent, reported as mean ± sample standard deviation over seeds 1, 2, and 3. Avg-10 and Avg-4 weight their respective target datasets equally within each seed. Full transfer results

Table 2 · Base-to-new generalization

Both variants use 16-shot Base training and the final epoch-20 checkpoints. The evaluation uses CAF fusion on ImageNet Base and all New splits. The VT route is used on the other ten Base splits.

hf download ZhenyuanChen/CAF CAF_base2new_models.zip CAF_star_base2new_models.zip --local-dir .
sha256sum -c --ignore-missing SHA256SUMS.txt
unzip CAF_base2new_models.zip
unzip CAF_star_base2new_models.zip
CUDA_VISIBLE_DEVICES=0 bash scripts/reproduce/base2new.sh "$DATA" caf test pretrained
CUDA_VISIBLE_DEVICES=0 bash scripts/reproduce/base2new.sh "$DATA" caf_star test pretrained
Variant Average Base Average New HM
CAF 85.78 79.52 82.53
CAF* 86.09 79.77 82.81

The aggregate row averages Base and New accuracies over the 11 datasets before taking their harmonic mean. Full base-to-new results

The paper's evaluation estimates context over each complete unlabeled evaluation split. Base and New each use their own split statistics. The reported scores apply to this collection-based evaluation protocol. Experiment details

Code license

CAF source code is available under the MIT license. See the code repository's third-party notices for upstream attribution.

Citation

@misc{chen2026trustadaptationcontextualfusion,
  title={When to Trust Adaptation: Contextual Fusion for Transferable Vision-Language Prompting},
  author={Zhenyuan Chen and Wenshuo Tao and Zhuo Huang and Shuo Chen and Ming-Ming Cheng and Xiang Li},
  year={2026},
  eprint={2611.11824},
  archivePrefix={arXiv},
  primaryClass={cs.CV},
  url={https://arxiv.org/abs/2611.11824}
}
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Paper for ZhenyuanChen/CAF