Learning to Hash with Binary Deep Neural Network

  • Thanh-Toan DoEmail author
  • Anh-Dzung Doan
  • Ngai-Man Cheung
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9909)


This work proposes deep network models and learning algorithms for unsupervised and supervised binary hashing. Our novel network design constrains one hidden layer to directly output the binary codes. This addresses a challenging issue in some previous works: optimizing non-smooth objective functions due to binarization. Moreover, we incorporate independence and balance properties in the direct and strict forms in the learning. Furthermore, we include similarity preserving property in our objective function. Our resulting optimization with these binary, independence, and balance constraints is difficult to solve. We propose to attack it with alternating optimization and careful relaxation. Experimental results on three benchmark datasets show that our proposed methods compare favorably with the state of the art.


Learning to hash Neural network Discrete optimizatization 


  1. 1.
    Gionis, A., Indyk, P., Motwani, R.: Similarity search in high dimensions via hashing. In: VLDB (1999)Google Scholar
  2. 2.
    Kulis, B., Grauman, K.: Kernelized locality-sensitive hashing for scalable image search. In: ICCV (2009)Google Scholar
  3. 3.
    Raginsky, M., Lazebnik, S.: Locality-sensitive binary codes from shift-invariant kernels. In: NIPS (2009)Google Scholar
  4. 4.
    Kulis, B., Jain, P., Grauman, K.: Fast similarity search for learned metrics. PAMI 31(2), 2143–2157 (2009)CrossRefGoogle Scholar
  5. 5.
    Weiss, Y., Torralba, A., Fergus, R.: Spectral hashing. In: NIPS (2008)Google Scholar
  6. 6.
    Gong, Y., Lazebnik, S.: Iterative quantization: a procrustean approach to learning binary codes. In: CVPR (2011)Google Scholar
  7. 7.
    He, K., Wen, F., Sun, J.: K-means hashing: an affinity-preserving quantization method for learning binary compact codes. In: CVPR (2013)Google Scholar
  8. 8.
    Heo, J.P., Lee, Y., He, J., Chang, S.F. Yoon, S.E.: Spherical hashing. In: CVPR (2012)Google Scholar
  9. 9.
    Kong, W., Li, W.J.: Isotropic hashing. In: NIPS (2012)Google Scholar
  10. 10.
    Strecha, C., Bronstein, A.M., Bronstein, M.M., Fua, P.: LDAHash: improved matching with smaller descriptors. PAMI 34(1), 66–78 (2012)CrossRefGoogle Scholar
  11. 11.
    Liu, W., Wang, J., Ji, R., Jiang, Y.G., Chang, S.F.: Supervised hashing with kernels. In: CVPR (2012)Google Scholar
  12. 12.
    Norouzi, M., Fleet, D.J., Salakhutdinov, R.: Hamming distance metric learning. In: NIPS (2012)Google Scholar
  13. 13.
    Lin, G., Shen, C., Shi, Q., van den Hengel, A., Suter, D.: Fast supervised hashing with decision trees for high-dimensional data. In: CVPR (2014)Google Scholar
  14. 14.
    Kulis, B., Darrell, T.: Learning to hash with binary reconstructive embeddings. In: NIPS (2009)Google Scholar
  15. 15.
    Shen, F., Shen, C., Liu, W., Tao Shen, H.: Supervised discrete hashing. In: CVPR (2015)Google Scholar
  16. 16.
    Wang, J., Liu, W., Kumar, S., Chang, S.: Learning to hash for indexing big data - a survey. CoRR (2015)Google Scholar
  17. 17.
    Wang, J., Shen, H.T., Song, J., Ji, J.: Hashing for similarity search: a survey. CoRR (2014)Google Scholar
  18. 18.
    Grauman, K., Fergus, R.: Learning binary hash codes for large-scale image search. In: Cipolla, R., Battiato, S., Farinella, G.M. (eds.) Machine Learning for Computer Vision. SCI, vol. 411, pp. 55–93. Springer, Heidelberg (2013)CrossRefGoogle Scholar
  19. 19.
    Erin Liong, V., Lu, J., Wang, G., Moulin, P., Zhou, J.: Deep hashing for compact binary codes learning. In: CVPR (2015)Google Scholar
  20. 20.
    Wang, J., Kumar, S., Chang, S.: Semi-supervised hashing for large-scale search. PAMI 34(12), 2393–2406 (2012)CrossRefGoogle Scholar
  21. 21.
    Salakhutdinov, R., Hinton, G.E.: Semantic hashing. Int. J. Approximate Reasoning 50(7), 969–978 (2009)CrossRefGoogle Scholar
  22. 22.
    Carreira-Perpinan, M.A., Raziperchikolaei, R.: Hashing with binary autoencoders. In: CVPR (2015)Google Scholar
  23. 23.
    Nocedal, J., Wright, S.J.: Numerical Optimization, 2nd edn. World Scientific, New York (2006). Chap. 17zbMATHGoogle Scholar
  24. 24.
    Liu, D.C., Nocedal, J.: On the limited memory BFGS method for large scale optimization. Math. Program. 45, 503–528 (1989)MathSciNetCrossRefzbMATHGoogle Scholar
  25. 25.
    Krizhevsky, A.: Learning multiple layers of features from tiny images. Technical report, University of Toronto (2009)Google Scholar
  26. 26.
    Jia, Y., Shelhamer, E., Donahue, J., Karayev, S., Long, J., Girshick, R., Guadarrama, S., Darrell, T.: Caffe: Convolutional architecture for fast feature embedding (2014). arXiv preprint: arXiv:1408.5093
  27. 27.
    Lecun, Y., Cortes, C.: The MNIST database of handwritten digits.
  28. 28.
    Jégou, H., Douze, M., Schmid, C.: Product quantization for nearest neighbor search. PAMI 33(1), 117–128 (2011)CrossRefGoogle Scholar
  29. 29.
    Lowe, D.G.: Distinctive image features from scale-invariant keypoints. IJCV 60(2), 91–110 (2004)CrossRefGoogle Scholar
  30. 30.
    Oliva, A., Torralba, A.: Modeling the shape of the scene: a holistic representation of the spatial envelope. IJCV 42(3), 145–175 (2001)CrossRefzbMATHGoogle Scholar
  31. 31.
    Nguyen, V.A., Lu, J., Do, M.N.: Supervised discriminative hashing for compact binary codes. In: ACM MM (2014)Google Scholar
  32. 32.
    Zhao, F., Huang, Y., Wang, L., Tan, T.: Deep semantic ranking based hashing for multi-label image retrieval. In: CVPR (2015)Google Scholar
  33. 33.
    Zhang, R., Lin, L., Zhang, R., Zuo, W., Zhang, L.: Bit-scalable deep hashing with regularized similarity learning for image retrieval and person re-identification. IEEE Trans. Image Process. 24(12), 4766–4779 (2015)MathSciNetCrossRefGoogle Scholar
  34. 34.
    Donahue, J., Jia, Y., Vinyals, O., Hoffman, J., Zhang, N., Tzeng, E., Darrell, T.: DeCAF: a deep convolutional activation feature for generic visual recognition. In: ICML (2014)Google Scholar

Copyright information

© Springer International Publishing AG 2016

Authors and Affiliations

  • Thanh-Toan Do
    • 1
    Email author
  • Anh-Dzung Doan
    • 1
  • Ngai-Man Cheung
    • 1
  1. 1.Singapore University of Technology and DesignSingaporeSingapore

Personalised recommendations