Skip to main content

When sparse coding meets ranking: a joint framework for learning sparse codes and ranking scores


Sparse coding, which represents a data point as a sparse reconstruction code with regard to a dictionary, has been a popular data representation method. Meanwhile, in database retrieval problems, learning the ranking scores from data points plays an important role. Up to now, these two problems have always been considered separately, assuming that data coding and ranking are two independent and irrelevant problems. However, is there any internal relationship between sparse coding and ranking score learning? If yes, how to explore and make use of this internal relationship? In this paper, we try to answer these questions by developing the first joint sparse coding and ranking score learning algorithm. To explore the local distribution in the sparse code space, and also to bridge coding and ranking problems, we assume that in the neighborhood of each data point, the ranking scores can be approximated from the corresponding sparse codes by a local linear function. By considering the local approximation error of ranking scores, the reconstruction error and sparsity of sparse coding, and the query information provided by the user, we construct a unified objective function for learning of sparse codes, the dictionary and ranking scores. We further develop an iterative algorithm to solve this optimization problem.

This is a preview of subscription content, access via your institution.

Fig. 1
Fig. 2
Fig. 3


  1. 1.

    Al Marri WJ, Malluhi Q, Ouzzani M, Tang M, Aref WG (2016) The similarity-aware relational database set operators. Inf Syst 59:79–93

    Article  Google Scholar 

  2. 2.

    Al-Shedivat M, Wang JJY, Alzahrani M, Huang J, Gao X (2014) Supervised transfer sparse coding. In: AAAI, vol 3, pp 1665–1672

  3. 3.

    Evett IW, Spiehler EJ (1987) Rule induction in forensic science. Tech. rep, Central Research Establishment, Home Office Forensic Science Service

  4. 4.

    Fan J, Liang RZ (2016) Stochastic learning of multi-instance dictionary for earth mover’s distance-based histogram comparison. Neural Comput Appl. doi:10.1007/s00521-016-2603-2

  5. 5.

    Fan X, Malone B, Yuan C (2014) Finding optimal Bayesian network structures with constraints learned from data. In: UAI, pp 200–209

  6. 6.

    Fan X, Yuan C (2015) An improved lower bound for Bayesian network structure learning. In: AAAI, pp 3526–3532

  7. 7.

    Fan X, Yuan C, Malone B (2014) Tightening bounds for Bayesian network structure learning. AAAI 4:2439–2445

    Google Scholar 

  8. 8.

    Gao S, Tsang IW, Chia LT, Zhao P (2010) Local features are not lonely—Laplacian sparse coding for image classification. In: CVPR, pp 3555–3561

  9. 9.

    Georghiades A, Belhumeur P, Kriegman D (2001) From few to many: illumination cone models for face recognition under variable lighting and pose. TPAMI 23(6):643–660

    Article  Google Scholar 

  10. 10.

    Kaynak C (1995) Methods of combining multiple classifiers and their applications to handwritten digit recognition. Master’s thesis, Institute of Graduate Studies in Science and Engineering, Bogazici University

  11. 11.

    Lee H, Battle A, Raina R, Ng AY (2006) Efficient sparse coding algorithms. In: NIPS, pp 801–808

  12. 12.

    Liang RZ, Shi L, Wang H, Meng J, Wang JJY, Sun Q, Gu Y (2016) Optimizing top precision performance measure of content-based image retrieval by learning similarity function. In: 2016 23rd International conference on pattern recognition (ICPR), pp 2954–2958. IEEE

  13. 13.

    Lucas DD, Klein R, Tannahill J, Ivanova D, Brandon S, Domyancic D, Zhang Y (2013) Failure analysis of parameter-induced simulation crashes in climate models. Geosci Model Dev Discuss 6(1):585–623

    Article  Google Scholar 

  14. 14.

    Mairal J, Ponce J, Sapiro G, Zisserman A, Bach FR (2009) Supervised dictionary learning. In: NIPS, pp 1033–1040

  15. 15.

    Nene SA, Nayar SK, Murase H, et al (1996) Columbia object image library (coil-20). Tech. rep., Technical Report CUCS-005-96

  16. 16.

    Sigillito VG, Wing SP, Hutton LV, Baker KB (1989) Classification of radar returns from the ionosphere using neural networks. Johns Hopkins APL Tech. Dig, vol 10, pp 262–266

  17. 17.

    Tang M, Tahboub RY, Aref WG, Atallah MJ, Malluhi QM, Ouzzani M, Silva YN (2016) Similarity group-by operators for multi-dimensional relational data. IEEE Trans Knowl Data Eng 28(2):510–523

    Article  Google Scholar 

  18. 18.

    Tang M, Yu Y, Malluhi QM, Ouzzani M, Aref WG (2016) Locationspark: a distributed in-memory data management system for big spatial data. Proc VLDB Endow 9(13):1565–1568

    Article  Google Scholar 

  19. 19.

    Wang J, Gao X, Wang Q, Li Y (2012) Prodis-contshc: learning protein dissimilarity measures and hierarchical context coherently for protein–protein comparison in protein database retrieval. BMC Bioinform 13(SUPPL.7), S2

  20. 20.

    Wang JJY, Bensmail H, Gao X (2012) Multiple graph regularized protein domain ranking. BMC Bioinform 13(1):307

    Article  Google Scholar 

  21. 21.

    Wang JJY, Bensmail H, Gao X (2014) Feature selection and multi-kernel learning for sparse representation on a manifold. Neural Netw 51:9–16

    Article  MATH  Google Scholar 

  22. 22.

    Wang JJY, Bensmail H, Yao N, Gao X (2013) Discriminative sparse coding on multi-manifolds. Knowl Based Syst 54:199–206

    Article  Google Scholar 

  23. 23.

    Wang JJY, Gao X (2014) Semi-supervised sparse coding. In: IJCNN, pp 1630–1637

  24. 24.

    Wang JJY, Gao X (2015) Partially labeled data tuple can optimize multivariate performance measures. In: CIKM, pp 1915–1918

  25. 25.

    Wang JJY, Sun Y, Gao X (2014) Sparse structure regularized ranking. Multimed Tools Appl 74(2):635–654

    Article  Google Scholar 

  26. 26.

    Wang JJY, Tsang IWH, Gao X (2016) Optimizing multivariate performance measures from multi-view data. In: AAAI

  27. 27.

    Yang Y, Xu D, Nie F, Luo J, Zhuang Y (2009) Ranking with local regression and global alignment for cross media retrieval. In: ACM MM, pp 175–184

  28. 28.

    Zhou D, Weston J, Gretton A, Bousquet O, Schölkopf B (2004) Ranking on data manifolds. In: NIPS, pp 169–176

Download references


The research reported in this publication was supported by funding from King Abdullah University of Science and Technology (KAUST) and the National Natural Science Foundation of China under the Grant No. 61502463.

Author information



Corresponding author

Correspondence to Xin Gao.

Ethics declarations

Conflict of interest

The authors declare no conflict of interests.

Rights and permissions

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Wang, J.JY., Cui, X., Yu, G. et al. When sparse coding meets ranking: a joint framework for learning sparse codes and ranking scores. Neural Comput & Applic 31, 701–710 (2019).

Download citation


  • Database retrieval
  • Data representation
  • Sparse coding
  • Learning to rank
  • Nearest neighbors