Papers › HashNet: Deep Learning to Hash by Continuation

HashNet: Deep Learning to Hash by Continuation

2 Feb 2017ICCV 2017 10arXiv:1702.00758archive 2025-07-28

Zhangjie Cao, Mingsheng Long, Jian-Min Wang, Philip S. Yu

Learning to hash has been widely applied to approximate nearest neighbor search for large-scale multimedia retrieval, due to its computation efficiency and retrieval quality. Deep learning to hash, which improves retrieval quality by end-to-end representation learning and hash encoding, has received increasing attention recently. Subject to the ill-posed gradient difficulty in the optimization with sign activations, existing deep learning to hash methods need to first learn continuous representations and then generate binary hash codes in a separated binarization step, which suffer from substantial loss of retrieval quality. This work presents HashNet, a novel deep architecture for deep learning to hash by continuation method with convergence guarantees, which learns exactly binary hash codes from imbalanced similarity data. The key idea is to attack the ill-posed gradient problem in optimizing deep networks with non-smooth binary activations by continuation method, in which we begin from learning an easier network with smoothed activation function and let it evolve during the training, until it eventually goes back to being the original, difficult to optimize, deep network with the sign activation function. Comprehensive empirical evidence shows that HashNet can generate exactly binary hash codes and yield state-of-the-art multimedia retrieval performance on standard benchmarks.

PaperPDFConference PDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="1702.00758")

Code

Syntology Ran 2 of 16 code samples harvested from 2 repositories linked to this paper; 14 have no recorded run. Of those that ran: 1 ran · honoured contract; 1 ran · our draft was wrong.

By repository: official repository: 11 samples from 1 repository, 2 ran; community (archive-listed): 5 samples from 1 repository, 0 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

thuml/HashNet officialmentioned in paperpytorchMIT report
hatimwen/paddle_hashnet paddleApache-2.0 report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

16 samples harvested; 2 ran; 1 honoured the contract we drafted; 14 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · honoured contract
1ran · our draft was wrong
14unverified

Licence: 0 of the 16 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 2 repositories linked to this paper, official or community; each sample names its own and says which. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

inv_lr_scheduler thuml/HashNet/pytorch/src/lr_schedule.py official repository ran · our draft was wrong MIT (permissive) · 3ce1df52d4a961b8 · report
pil_loader thuml/HashNet/pytorch/src/data_list.py official repository ran · honoured contract MIT (permissive) · 1df9a5ffd9b38c34 · report
accimage_loader thuml/HashNet/pytorch/src/data_list.py official repository unverified MIT (permissive) · 9dcef767571b38d7 · report
image_test thuml/HashNet/pytorch/src/pre_process.py official repository unverified MIT (permissive) · dff451db0315485c · report
image_test_10crop thuml/HashNet/pytorch/src/pre_process.py official repository unverified MIT (permissive) · 9a338479bd269e9b · report
image_train thuml/HashNet/pytorch/src/pre_process.py official repository unverified MIT (permissive) · 3331c5176304df6a · report
make_dataset thuml/HashNet/pytorch/src/data_list.py official repository unverified MIT (permissive) · 2301055cb33836bc · report
multistep_lr_scheduler thuml/HashNet/pytorch/src/lr_schedule.py official repository unverified MIT (permissive) · b0c5a2db3d6ec084 · report
pairwise_loss thuml/HashNet/pytorch/src/loss.py official repository unverified MIT (permissive) · 1cef1cb746b4c73f · report
pairwise_loss_updated thuml/HashNet/pytorch/src/loss.py official repository unverified MIT (permissive) · 77901aeefce81a76 · report
step_lr_scheduler thuml/HashNet/pytorch/src/lr_schedule.py official repository unverified MIT (permissive) · 0dfc49084aa7fa24 · report
CalcHammingDist hatimwen/paddle_hashnet/utils/tools.py community (archive-listed) unverified Apache-2.0 (permissive) · fec8bc71986e9775 · report
CalcTopMap hatimwen/paddle_hashnet/utils/tools.py community (archive-listed) unverified Apache-2.0 (permissive) · ac4069aac5bd1718 · report
config_dataset hatimwen/paddle_hashnet/utils/datasets.py community (archive-listed) unverified Apache-2.0 (permissive) · 5a36b6fd1493e872 · report
get_args hatimwen/paddle_hashnet/deploy/inference_python/infer.py community (archive-listed) unverified Apache-2.0 (permissive) · a66b5598134a7bcd · report
get_logger hatimwen/paddle_hashnet/main_multi_gpu.py community (archive-listed) unverified Apache-2.0 (permissive) · 3d300924bfb82d8f · report

Tasks

BinarizationDeep LearningRepresentation LearningRetrieval

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections