Graph Regularised Hashing code
Matlab C
Latest commit 462f5e3 Dec 26, 2015 Sean Moran Updated readme
Failed to load latest commit information.
baselines/sbq Added code Dec 26, 2015
evaluation Added code Dec 26, 2015
grh Deleted unecessary files Dec 26, 2015
libraries Added code Dec 26, 2015 Updated readme Dec 26, 2015
get_baseline.m Added code Dec 26, 2015
initialise.m Added code Dec 26, 2015
run_hash.m Added code Dec 26, 2015

Graph Regularised Hashing (GRH)

Current version: 0.1. Distributed under a Creative Commons Attribution-NonCommercial License:

This code is an implementation of the Graph Regularised Hashing model described in the publication:

Graph Regularised Hashing. Sean Moran and Victor Lavrenko. European Conference on Information Retrieval, 2015.

GRH learns effective hash functions for approximate nearest neighbour search using a modicum of supervision. The model achieves state-of-the-art retrieval effectiveness on standard image datasets.


  2. libSVM:
  3. liblinear:
  4. BudgetedSVM:

Compile the three SVM libraries for your machine and place in the grh/libraries directory.

If you use the GRH code for a publication, please cite the following paper:

@incollection{ year={2015}, isbn={978-3-319-16353-6}, booktitle={Advances in Information Retrieval}, volume={9022}, series={Lecture Notes in Computer Science}, editor={Hanbury, Allan and Kazai, Gabriella and Rauber, Andreas and Fuhr, Norbert}, doi={10.1007/978-3-319-16354-3_15}, title={Graph Regularised Hashing}, url={}, publisher={Springer International Publishing}, author={Moran, Sean and Lavrenko, Victor}, pages={135-146}, language={English} }


  1. Obtain the pre-processed dataset files for MNIST, CIFAR-10 and NUSWIDE here:

  2. Compile libsvm, liblinear and budgetedsvm for your system and place into grh/libraries folder.

  3. Edit the properties in initialise.m to fit your system and requirements (e.g. hashcode length, dataset, amount of supervision, paths to datasets and results directory etc).

  4. run_hash.m


Copyright (C) by Sean Moran, University of Edinburgh

Please send any bug reports to