Research Article

Open Set Domain Adaptation with Vision-language Models via Gradient-aware Separation

Haoyang Chen*
Nanjing University of Information Science & Technology, Nan Jing, China

* Corresponding author: [email protected]

Abstract

Open-Set Domain Adaptation (OSDA) confronts the dual challenge of aligning known-class distributions across domains while identifying target-domain-specific unknown categories. Current approaches often fail to leverage semantic relationships between modalities and struggle with error accumulation in unknown sample detection. We propose to harness Contrastive Language-Image Pretraining (CLIP) to address these limitations through two key innovations: 1) Prompt-driven cross-domain alignment: Learnable textual prompts conditioned on domain discrepancy metrics dynamically adapt CLIP’s text encoder, enabling semantic consistency between source and target domains without explicit unknown-class supervision. 2) Gradient-aware open-set separation: A gradient analysis module quantifies domain shift by comparing the L2-norm of gradients from the learned prompts, where known/unknown samples exhibit statistically distinct gradient behaviors. Evaluations on Office-Home show that our method consistently outperforms CLIP baseline and standard CoOp baseline. Ablation studies confirm the gradient norm’s critical role.

Keywords: Open Set Domain Adaptation; CLIP; Gradient Norm; Vision-Language Models
Published: July 4, 2025
DOI: 10.54254/2755-2721/2025.PO24672
Volume: ACE Vol.157
pp. 101-111
Download PDF

References

  1. Ganin, Y., & Lempitsky, V. (2015, June). Unsupervised domain adaptation by backpropagation. In International conference on machine learning (pp. 1180-1189). PMLR.
  2. Li, J., Yu, Z., Du, Z., Zhu, L., & Shen, H. T. (2024). A comprehensive survey on source-free domain adaptation. IEEE Transactions on Pattern Analysis and Machine Intelligence.
  3. Panareda Busto, P., & Gall, J. (2017). Open set domain adaptation. In Proceedings of the IEEE international conference on computer vision (pp. 754-763).
  4. Ru, J., Tian, J., Xiao, C., Li, J., & Shen, H. T. (2023). Imbalanced open set domain adaptation via moving-threshold estimation and gradual alignment. IEEE Transactions on Multimedia, 26, 2504-2514.
  5. Zhuang, X., Xie, Y., Deng, Y., Liang, L., Ru, J., Yin, Y., & Zou, Y. (2025). VARGPT: Unified Understanding and Generation in a Visual Autoregressive Multimodal Large Language Model.  arXiv preprint arXiv: 2501.12327.
  6. Du, Z., Li, X., Li, F., Lu, K., Zhu, L., & Li, J. (2024). Domain-agnostic mutual prompting for unsupervised domain adaptation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (pp. 23375-23384).
  7. Radford, A., Kim, J. W., Hallacy, C., Ramesh, A., Goh, G., Agarwal, S., ... & Sutskever, I. (2021, July). Learning transferable visual models from natural language supervision. In International conference on machine learning (pp. 8748-8763). PmLR.
  8. Zhou, K., Yang, J., Loy, C. C., & Liu, Z. (2022). Learning to prompt for vision-language models. International Journal of Computer Vision, 130(9), 2337-2348.
  9. Ming, Y., Cai, Z., Gu, J., Sun, Y., Li, W., & Li, Y. (2022). Delving into out-of-distribution detection with vision-language representations. Advances in neural information processing systems, 35, 35087-35102.
  10. Huang, R., Geng, A., & Li, Y. (2021). On the importance of gradients for detecting distributional shifts in the wild. Advances in Neural Information Processing Systems, 34, 677-689.
  11. Liu, W., Wang, X., Owens, J., & Li, Y. (2020). Energy-based out-of-distribution detection. Advances in neural information processing systems, 33, 21464-21475.
  12. Liu, H. , Cao, Z. , Long, M. , Wang, J. , & Yang, Q. . (2020). Separate to Adapt: Open Set Domain Adaptation via Progressive Separation. 2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). IEEE.
  13. Fort, S., Ren, J., & Lakshminarayanan, B. (2021). Exploring the limits of out-of-distribution detection. Advances in neural information processing systems, 34, 7068-7081.
  14. Yin, Y., Xie, Y., Yang, W., Yang, D., Ru, J., Zhuang, X., ... & Zou, Y. (2025). ATRI: Mitigating Multilingual Audio Text Retrieval Inconsistencies by Reducing Data Distribution Errors.  arXiv preprint arXiv: 2502.14627.
  15. Panareda Busto, P., & Gall, J. (2017). Open set domain adaptation. In Proceedings of the IEEE international conference on computer vision (pp. 754-763).
  16. Ghaffari, R., Helfroush, M. S., Khosravi, A., Kazemi, K., Danyali, H., & Rutkowski, L. (2023). Toward domain adaptation with open-set target data: Review of theory and computer vision applications. Information Fusion, 100, 101912.
  17. Venkateswara, H., Eusebio, J., Chakraborty, S., & Panchanathan, S. (2017). Deep hashing network for unsupervised domain adaptation. In Proceedings of the IEEE conference on computer vision and pattern recognition (pp. 5018-5027).
  18. Zhuang, X., Cheng, X., & Zou, Y. (2024, March). Towards explainable joint models via information theory for multiple intent detection and slot filling. In Proceedings of the AAAI Conference on Artificial Intelligence (Vol. 38, No. 17, pp. 19786-19794).
  19. Saito, K., Yamamoto, S., Ushiku, Y., & Harada, T. (2018). Open set domain adaptation by backpropagation. In Proceedings of the European conference on computer vision (ECCV) (pp. 153-168).
  20. Ru, J., Xie, Y., Zhuang, X., Yin, Y., & Zou, Y. (2025). Do we really have to filter out random noise in pre-training data for language models?.  arXiv preprint arXiv: 2502.06604.