Skip to main content

Long-Tailed Hashing with Wasserstein Quantization

  • Conference paper
  • First Online:
Pattern Recognition (ICPR 2024)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 15321))

Included in the following conference series:

  • 281 Accesses

Abstract

Long-tailed hashing is to learn hash functions in unbalanced distribution datasets to represent images as binary hash codes for fast and accurate image retrieval. In contrast to balanced distribution datasets, unbalanced distributions are more common in the real world. However, Existing long-tailed hashing methods only focus on how to better learn from unbalanced datasets to improve performance, without giving good consideration to quantization error, which is very crucial in hash learning. In this paper, we propose a simple but efficient quantization method for long-tailed hashing. Specifically, to address the lack of samples in the tail classes, we take a uniform discrete distribution as the optimal target distribution. We use the Sliced Wasserstein distance as a measure of distribution distance. It makes good use of the discrete nature of hash functions and has low computational complexity. Then we formulate the optimization objective of the quantization error as minimizing the distance between the output of the learned hash function and this objective distribution, which can be added as an additional term of the loss function to existing long-tailed hashing methods. We conduct experiments on two long-tailed datasets, and the results show that our proposed method greatly improves the performance of existing long-tailed hashing methods.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

References

  1. Arjovsky, M., Bottou, L.: Towards principled methods for training generative adversarial networks. In: International Conference on Learning Representations (2017)

    Google Scholar 

  2. Arjovsky, M., Chintala, S., Bottou, L.: Wasserstein generative adversarial networks. In: International conference on machine learning. pp. 214–223. PMLR (2017)

    Google Scholar 

  3. Cao, Z., Long, M., Wang, J., Yu, P.S.: Hashnet: Deep learning to hash by continuation. In: Proceedings of the IEEE international conference on computer vision. pp. 5608–5617 (2017)

    Google Scholar 

  4. Chawla, N.V., Bowyer, K.W., Hall, L.O., Kegelmeyer, W.P.: Smote: synthetic minority over-sampling technique. Journal of artificial intelligence research 16, 321–357 (2002)

    Article  Google Scholar 

  5. Chen, Y., Hou, Y., Leng, S., Zhang, Q., Lin, Z., Zhang, D.: Long-tail hashing. In: Proceedings of the 44th International ACM SIGIR Conference on Research and Development in Information Retrieval. pp. 1328–1338 (2021)

    Google Scholar 

  6. Cui, Y., Jia, M., Lin, T.Y., Song, Y., Belongie, S.: Class-balanced loss based on effective number of samples. In: Proceedings of the IEEE/CVF conference on computer vision and pattern recognition. pp. 9268–9277 (2019)

    Google Scholar 

  7. Deshpande, I., Zhang, Z., Schwing, A.G.: Generative modeling using the sliced wasserstein distance. In: Proceedings of the IEEE conference on computer vision and pattern recognition. pp. 3483–3491 (2018)

    Google Scholar 

  8. Doan, K.D., Manchanda, S., Mahapatra, S., Reddy, C.K.: Interpretable graph similarity computation via differentiable optimal alignment of node embeddings. In: Proceedings of the 44th International ACM SIGIR Conference on Research and Development in Information Retrieval. pp. 665–674 (2021)

    Google Scholar 

  9. He, J., Chang, S.F., Radhakrishnan, R., Bauer, C.: Compact hashing with joint optimization of search accuracy and time. In: CVPR 2011. pp. 753–760. IEEE (2011)

    Google Scholar 

  10. Huang, C.Q., Yang, S.M., Pan, Y., Lai, H.J.: Object-location-aware hashing for multi-label image retrieval via automatic mask learning. IEEE Trans. Image Process. 27(9), 4490–4502 (2018)

    Article  MathSciNet  Google Scholar 

  11. Kang, Q., Chen, X., Li, S., Zhou, M.: A noise-filtered under-sampling scheme for imbalanced classification. IEEE transactions on cybernetics 47(12), 4263–4274 (2016)

    Article  Google Scholar 

  12. Kolouri, S., Nadjahi, K., Simsekli, U., Badeau, R., Rohde, G.: Generalized sliced wasserstein distances. Advances in neural information processing systems 32 (2019)

    Google Scholar 

  13. Kou, X., Xu, C., Yang, X., Deng, C.: Attention-guided contrastive hashing for long-tailed image retrieval. In: IJCAI. pp. 1017–1023 (2022)

    Google Scholar 

  14. Krizhevsky, A., Hinton, G., et al.: Learning multiple layers of features from tiny images (2009)

    Google Scholar 

  15. Lai, H., Pan, Y., Liu, Y., Yan, S.: Simultaneous feature learning and hash coding with deep neural networks. In: Proceedings of the IEEE conference on computer vision and pattern recognition. pp. 3270–3278 (2015)

    Google Scholar 

  16. Lai, H., Yan, P., Shu, X., Wei, Y., Yan, S.: Instance-aware hashing for multi-label image retrieval. IEEE Trans. Image Process. 25(6), 2469–2479 (2016)

    Article  MathSciNet  Google Scholar 

  17. Li, Q., Sun, Z., He, R., Tan, T.: Deep supervised discrete hashing. Advances in neural information processing systems 30 (2017)

    Google Scholar 

  18. Li, W.J., Wang, S., Kang, W.C.: Feature learning based deep supervised hashing with pairwise labels. In: IJCAI. pp. 1711–1717 (2016)

    Google Scholar 

  19. Liang, Y., Pan, Y., Lai, H., Liu, W., Yin, J.: Deep listwise triplet hashing for fine-grained image retrieval. IEEE Trans. Image Process. 31, 949–961 (2021)

    Article  Google Scholar 

  20. Lin, T.Y., Goyal, P., Girshick, R., He, K., Dollár, P.: Focal loss for dense object detection. In: Proceedings of the IEEE international conference on computer vision. pp. 2980–2988 (2017)

    Google Scholar 

  21. Liu, W., Wang, J., Ji, R., Jiang, Y.G., Chang, S.F.: Supervised hashing with kernels. In: 2012 IEEE conference on computer vision and pattern recognition. pp. 2074–2081. IEEE (2012)

    Google Scholar 

  22. Liu, Z., Miao, Z., Zhan, X., Wang, J., Gong, B., Yu, S.X.: Large-scale long-tailed recognition in an open world. In: Proceedings of the IEEE/CVF conference on computer vision and pattern recognition. pp. 2537–2546 (2019)

    Google Scholar 

  23. Nguyen, K., Ho, N., Pham, T., Bui, H.: Distributional sliced-wasserstein and applications to generative modeling. arXiv preprint arXiv:2002.07367 (2020)

  24. Shen, F., Shen, C., Liu, W., Tao Shen, H.: Supervised discrete hashing. In: Proceedings of the IEEE conference on computer vision and pattern recognition. pp. 37–45 (2015)

    Google Scholar 

  25. Wang, L., Pan, Y., Liu, C., Lai, H., Yin, J., Liu, Y.: Deep hashing with minimal-distance-separated hash centers. In: Proceedings of the IEEE/CVF conference on computer vision and pattern recognition. pp. 23455–23464 (2023)

    Google Scholar 

  26. Wang, Y.X., Ramanan, D., Hebert, M.: Learning to model the tail. Advances in neural information processing systems 30 (2017)

    Google Scholar 

  27. Weiss, Y., Torralba, A., Fergus, R.: Spectral hashing. Advances in neural information processing systems 21 (2008)

    Google Scholar 

  28. Xia, R., Pan, Y., Lai, H., Liu, C., Yan, S.: Supervised hashing for image retrieval via image representation learning. In: Proceedings of the AAAI conference on artificial intelligence. vol. 28 (2014)

    Google Scholar 

  29. Yuan, L., Wang, T., Zhang, X., Tay, F.E., Jie, Z., Liu, W., Feng, J.: Central similarity quantization for efficient image and video retrieval. In: Proceedings of the IEEE/CVF conference on computer vision and pattern recognition. pp. 3083–3092 (2020)

    Google Scholar 

Download references

Acknowledgements

This work was supported by Guangdong Basic and Applied Basic Research Foundation (2023A1515011400). The corresponding author is Yan Pan.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Yan Pan .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2025 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Fu, Z., Lai, H., Pan, Y. (2025). Long-Tailed Hashing with Wasserstein Quantization. In: Antonacopoulos, A., Chaudhuri, S., Chellappa, R., Liu, CL., Bhattacharya, S., Pal, U. (eds) Pattern Recognition. ICPR 2024. Lecture Notes in Computer Science, vol 15321. Springer, Cham. https://doi.org/10.1007/978-3-031-78305-0_1

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-78305-0_1

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-78304-3

  • Online ISBN: 978-3-031-78305-0

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics