Skip to content

xud-yan/TOMCAT

Repository files navigation

[NeurIPS 2025] TOMCAT: Test-time Comprehensive Knowledge Accumulation for Compositional Zero-Shot Learning

  • 🧑‍💻 Authors: Xudong Yan, Songhe Feng
  • 🏛️ Affiliations: Beijing Jiaotong University
  • 🔍 More details: [arXiv version] | [NeurIPS version] | [code]
  • 🕰️ Latest Update Time:2026.3.25 ( Please use the newest config/cgqa.yml file because we update some hyperparameters for CGQA, and use the newset model/tomcat_bm.py file because we comment out line 256 of the "with torch.no_grad():" code. 原来CGQA达不到论文报告的结果是因为tomcat_bm.py在cgqa数据集上去掉了部分可学习参数的梯度,具体来说是256行的"with torch.no_grad():",注释掉即可,另外还因为上传的并非最优的config文件,我们现在已修复这个问题,请使用最新版本的config/cgqa.yml和model/tomcat_bm.py文件。)

📝 Overview

TL;DR: We introduce a new setting OTTA-CZSL, and propose to accumulate multimodal knowledge to overcome the label distribution shift caused by unseen compositions recombined from attributes and objects by leveraging unsupervised data at test time.

We look forward to more work focusing on test-time strategies for addressing the CZSL task!

⚙️ Setup

Our work is implemented in PyTorch framework. Create a conda environment tomcat using:

conda create --name tomcat python=3.8.0
conda activate tomcat
pip install -r requirements.txt

⬇️ Download

Datasets: In our work, we conduct experiments on four datasets: UT-Zappos, MIT-States, C-GQA, and Clothing16K. For Clothing16K, you can download this dataset from this website. For UT-Zappos, MIT-States and C-GQA, please using:

bash utils/download_data.sh

Pre-trained models: ViT-Large-Patch14 can be downloaded using the following command:

cd {CLIP_Model_Path}
wget https://openaipublic.azureedge.net/clip/models/b8cca3fd41ae0c99ba7e8951adf17d267cdb84cd88be6f7c2e0eca1737a03836/ViT-L-14.pt

🏋️ Training Phase

Train the Base Model of TOMCAT with a specified configure file using:

python train.py --cfg config/{DATASET_NAME}.yml

📊 Test Time

Implement TOMCAT model using:

python test.py --cfg config/{DATASET_NAME}.yml

Note

📚 Citation

If you find our work helpful, please star the repository and cite our paper:

@article{Yan_2025_NeurIPS,
  title={TOMCAT: Test-time Comprehensive Knowledge Accumulation for Compositional Zero-Shot Learning},
  author={Yan, Xudong and Feng, Songhe},
  journal={arXiv preprint arXiv:2510.20162},
  year={2025}
}

or

@inproceedings{Yan_2025_NeurIPS,
 author = {Yan, Xudong and Feng, Songhe},
 booktitle = {Advances in Neural Information Processing Systems},
 pages = {94673--94701},
 title = {TOMCAT: Test-time Comprehensive Knowledge Accumulation for Compositional Zero-Shot Learning},
 volume = {38},
 year = {2025}
}

🙏 Acknowledgement

Thanks for the publicly available code of AdapterFormer, Troika, TDA, TPS, and DPE.

📬 Contact

If you have any questions or are interested in collaboration, please feel free to contact me at xud_yan@bjtu.edu.cn .

About

[NeurIPS 2025] Official code for “TOMCAT: Test-Time Comprehensive Knowledge Accumulation for Compositional Zero-Shot Learning”

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages