Pith. sign in

REVIEW 4 major objections 4 minor 34 references

Bag of Negatives for Siamese Architectures

T0 review · 4 major / 4 minor · reviewed 2026-08-14 · deepseek-v4-flash

Pith's one-line read An online hash table that bins images during training can supply Siamese networks with high-quality hard negatives at almost no cost, cutting training time by at least three times.

desk verdict BoN is a plausible and useful online negative-mining trick with a controlled comparison, but single-run results, unreleased code/data, and validation-tuned s leave the exact gains unverified. read the letter →

arxiv 1908.02391 v1 pith:P5AIZLNG submitted 2019-08-06 cs.CV

classification cs.CV
keywords Siamesenetworksnegativeminingonlinehashingtripletlosspersonre-identificationmetriclearningbatchhardspectral
verification ladder T0 review T1 audit T2 compute T3 formal

The pith

A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.

The reading

Bag of Negatives (BoN) is a negative-sampling method for Siamese networks that maintains an online hash table of training images: each embedding is projected with a linear autoencoder, binarized against running-mean thresholds, and stored in one of $2^s$ bins. The paper's claim is that drawing negatives randomly from the anchor's bin yields high-quality hard negatives for almost no extra cost, producing more non-zero-loss triplets than vanilla, semi-hard, or batch-hard sampling. In controlled comparisons, BoN-batch hard reaches its best validation mAP in 80k steps, roughly three times fewer than batch-hard's 280k, and reports 69.5/62.1 mAP on Market-1501/DukeMTMC versus 60.8/53.7 for batch-hard. Because the mechanism only affects how negatives are chosen, it is loss-independent, adds negligible overhead, and scales linearly with the number of identities, which matters for re-ID datasets too large for classification layers or offline hash updates.

What carries the argument

The load-bearing object is the continuously updated binary hash table. Each image's descriptor $f(x)$ is projected by a linear autoencoder into $s$ dimensions, the latent vector is compared with a running mean per dimension to produce an $s$-bit codeword, and the codeword indexes one of $2^s$ bins that store (image, identity) pairs; every mini-batch moves its images to their current bins. This carries the argument by inheriting the spectral-hashing assumption that same-bin images are approximate neighbors, so a random same-bin image from a different identity is a plausible hard negative. The method's efficiency comes from making that assumption online: no full embedding recomputation, no distance matrix over identities, just a running projection and a table update whose slowest operation costs $O(N/2^s)$.

What would settle it

Train the same Siamese model with BoN-random but stop updating the linear autoencoder, thresholds, and hash table for a long interval; if validation mAP falls back toward vanilla sampling during that interval, the online update is the active ingredient. A more direct check is to measure, at several training steps, the average embedding distance between anchor and randomly sampled same-bin negatives versus anchor and random dataset negatives: the claim predicts a systematically smaller distance for same-bin pairs, and if that gap vanishes the mechanism is gone.

Watch

Extended reading notes

Core claim

On the paper's own terms, the discovery is that cheap online hashing can replace explicit hard-negative search. BoN updates three components at every training step without backpropagating into the main network: a linear autoencoder that learns a low-dimensional projection of the current embedding, per-dimension running-mean thresholds that binarize the projection, and a hash table whose bins hold image-ID pairs. A negative is then sampled randomly from the anchor's bin, or the bin structure is used to assemble mini-batches for batch-hard loss. The reported consequence is that BoN-batch hard is the fastest method to reach the overfitting regime (70k-100k steps), at least 3 times faster than the other non-hashing baselines, and it beats semi-hard, batch-hard, hierarchical-tree, and 100k-IDs batch creation in final mAP; fine-tuning the model on Market-1501/DukeMTMC gives 77.3/68.6 mAP and on Stanford Online Products it reports 75.8 recall@1.

Load-bearing premise

The assumption that carries the method is that the online hash table keeps tracking the evolving embedding well enough that a random negative drawn from the anchor's bin really is closer than average to the anchor.

Editorial extensions

If this is right

  • Training time falls by a factor of roughly three: BoN-batch hard peaks at 80k steps while batch-hard needs 280k, so large-scale re-ID training becomes cheaper.
  • Validation accuracy improves under identical settings: 69.5/62.1 mAP on Market/Duke versus 60.8/53.7 for batch-hard, with the gap growing after fine-tuning.
  • The method combines with any loss needing negatives, including triplet and contrastive formulations, since BoN only changes which samples are presented.
  • Batch-hard and BoN are complementary: BoN supplies locally relevant negatives while batch-hard performs explicit in-batch selection, and their union outperforms each alone.
  • Because the hash table is updated online, BoN avoids the per-epoch or per-5k-steps recomputation that makes tree- or PCA-based baselines expensive; the paper notes Spectral Hashing alone spends 11.6 minutes per hash table update.

Reading between the lines

Editorial extensions of the paper, not claims the author makes directly.

  • One extension the paper does not run is a control that samples negatives by exact nearest-neighbor distance inside the learned autoencoder space; that would separate the benefit of the learned projection from the benefit of the hash quantization itself.
  • The near-empty-bin regime at $s=18$ (0.68 samples per bin on average) is suggestive: BoN may work not because bins contain true neighbors but because the hash code partitions the embedding into a stable, fine-grained structure that prevents the sampler from collapsing onto trivial negatives.
  • The same online binning mechanism could be ported to negative sampling in self-supervised contrastive learning, where cheap hard negatives are also a bottleneck; BoN's loss-independence is the property that makes this plausible.
Share X Bluesky LinkedIn Reddit HN

Signed reviews

No signed human review yet.

Editorial analysis

A structured set of objections, weighed in public.

Desk editor's note, referee report, and a circularity audit.

Referee Report

4 major / 4 minor

Summary. The paper introduces Bag of Negatives (BoN), an online hashing-based negative mining strategy for Siamese triplet networks. BoN replaces the offline PCA hashing of Spectral Hashing with a linear autoencoder, running-mean quantization thresholds, and a hash table that is updated for mini-batch images at every training step. The authors claim that BoN accelerates training and improves validation accuracy over vanilla sampling, semi-hard, batch hard, hierarchical-tree, and 100k-IDs baselines. Their controlled comparison (same backbone, batch size, margin) reports BoN-batch hard reaching 69.5/62.1 mAP on Market-1501/DukeMTMC-reID in 80k steps versus batch hard's 60.8/53.7 in 280k steps, and results on Stanford Online Products that are competitive with published methods.

Significance. If the empirical claims hold, BoN would be a practically useful, loss-independent, and computationally cheap addition to triplet-based metric learning, particularly for datasets with a very large number of identities. The strengths of the paper are its controlled comparison with several baselines, the inclusion of a Spectral Hashing-batch hard reference that approximates an upper bound, and the intuitive combination of BoN with batch hard. However, the evidence is weakened by single-run experiments without error bars, by selection of the key hyperparameter s on the same validation sets used to report final results, by the lack of released code and the merged dataset, and by the absence of any direct measurement of hash bin quality or staleness. The central mechanism of the method is plausible but not established to the standard needed for the paper's claims.

major comments (4)
  1. [Sec. 5.3.2, Table 1] The load-bearing assumption is that sampling a negative from the anchor's hash bin yields a useful hard negative throughout training. The paper never measures bin precision or staleness. Only images in the current mini-batch are rehashed (Sec. 4.3); with 178,002 images and a mini-batch of 48, the overwhelming majority of entries in any bin at any step are stale, assigned when those images were last visited. The only indirect evidence is the non-zero triplet count of Fig. 2a and two illustrative bins in Fig. 3b, neither of which quantifies how often a random bin-mate is actually a near neighbor in the current embedding. The comparison with SH-batch hard, which rebuilds a fresh PCA/hash every 5k steps, gives a 1.5% edge over BoN-batch hard and is the only hint about the cost of staleness, but it is a single run at a validation-tuned s. Please add ablations that freeze the hash, vary the rehash frequency, and report a bin-precision or staleness statistic over training. Without such evidence, the claimed acceleration and accuracy gains cannot be attributed to the online hashing mechanism rather than to incidental properties of the training setup.
  2. [Sec. 5.3.2, Table 1] The key meta-parameter s is selected by maximizing validation mAP on Market-1501 and DukeMTMC-reID in Fig. 3a, and the same validation sets are then used to report the final results in Table 1. This makes the reported BoN numbers validation-selected, whereas the baseline methods (semi hard, batch hard, HT, 100k IDs) are used with their published hyperparameters and receive no analogous tuning on these validation sets. This is an unfair comparison that could inflate the apparent gain of BoN. Please select s on a held-out split or on the training set, or report results across a range of s together with a sensitivity analysis for the baselines' key hyperparameters.
  3. [Table 1, Fig. 2b] All reported results are single runs without error bars. In deep metric learning, seed-to-seed variance can be several mAP points, which is comparable to several differences that drive the conclusions, e.g., BoN-batch hard (69.5) vs SH-batch hard (71.7), BoN-batch hard vs 100k-IDs (67.8), and BoN-random vs semi hard on Duke. Please provide mean and standard deviation over at least three runs for the primary comparisons, or clearly state the number of runs and justify why variance is negligible.
  4. [Sec. 6, Table 1] The text states that BoN-batch hard reaches the overfitting regime at 70k-100k steps and is 'at least 3 times faster than other methods.' This is inconsistent with Table 1, where batch hard (2x batch) converges at 70k steps. Please qualify the claim to the listed baseline methods other than the 2x-batch variant, or adjust the statement.
minor comments (4)
  1. [Sec. 5.1] The text says eleven datasets are merged but lists only eight names (CUHK01, CUHK02, 3DPeS, VIPeR, airport, MSMT17, Market-1501, DukeMTMC). Please correct the count or add the missing datasets.
  2. [Sec. 5.3.2, Fig. 3a] The text says the maximum is at s=18, but the x-axis tick labels in Fig. 3a appear to be 0,5,10,15,20. Please make the location of the s=18 point explicit in the figure or its caption.
  3. [Sec. 4.2] The claim that varying beta in [0.95,0.999] does not influence results is not supported by any experiment shown. A sensitivity plot or a sentence with quantitative evidence would help.
  4. [Table 2] The text says BoN-batch hard obtains state-of-the-art results on Stanford Online Products, but ABE-8[12] has a higher r1 (76.3 vs 75.8) while BoN has a higher r10 (88.6 vs 86.4). Please clarify that the claim refers to specific metrics or acknowledge the mixed comparison.

Circularity Check

0 steps flagged · score 0.0 of 10

No significant circularity: BoN is evaluated on held-out Market-1501, DukeMTMC-reID, and Stanford Online Products, and no claimed prediction reduces to a fitted input or self-citation by construction.

full rationale

The paper's central claim is empirical: online hashing-based negative mining (BoN) accelerates Siamese training and improves external validation mAP. The derivation chain is constructive, not definitional: mini-batch embeddings are projected by a linear autoencoder (Eq. 2), binarized with running-mean thresholds, stored in an online hash table (Secs. 4.1-4.3), and used only to suggest negative samples (Secs. 4.4-4.5). The reported accuracies in Tables 1-2 are measured on Market-1501 and DukeMTMC-reID, which the paper explicitly excludes from the merged training set, and on Stanford Online Products, an external benchmark. No equation identifies a predicted quantity with a fitted parameter; the one meta-parameter s is selected by a validation sweep and is not renamed as a prediction. The paper's reliance on the spectral-hashing assumption that same-bin samples are neighbors is an acknowledged empirical premise, not a tautology: the paper concedes the assumption is 'overly optimistic' and then tests it via non-zero-triplet counts and external mAP. The comparison against offline spectral hashing is an honest reference implementation, not a self-citation, and no uniqueness theorem or prior author result is used to force the method. Concerns about stale hash entries or using Market/Duke for fine-tuning are correctness or benchmark-validity risks, not circularity, because they do not make the outcome equivalent to the input by construction.

Assumptions & free parameters 2 free parameters · 4 assumptions · 0 invented entities

BoN rests on the spectral hashing neighborhood assumption and on the empirical validity of the online linear autoencoder and running-mean thresholds; no new physical entities are introduced. The main free parameter is s, tuned per dataset. The claimed 'loss-independence' is not backed by experiments with non-triplet losses.

free parameters (2)
  • s (number of hash bits / projection dimension) = 18 (person re-ID); validated in Figure 3a
    Controls the granularity of the hash table; s=18 gives the best validation mAP on Market and Duke. It is a free meta-parameter selected by validation sweep.
  • beta (running mean forgetting factor) = unspecified, in [0.95, 0.999]
    Controls the update of quantization thresholds; the authors state it does not influence results in the tested range, but it remains a hand-set hyperparameter.
assumptions (4)
  • domain assumption Spectral hashing assumption: samples falling into the same binary-code bin are neighbors in the high-dimensional embedding.
    Inherited from [29], explicitly stated as 'overly optimistic' in Section 4, and underlies BoN's negative sampling.
  • domain assumption The linear autoencoder, trained with L2 reconstruction loss without backprop through the Siamese network, provides a projection that preserves neighborhood structure for hashing.
    Section 4.1; no theoretical guarantee, empirical.
  • domain assumption Running-mean thresholds per dimension correctly binarize the dynamically changing latent space.
    Section 4.2; claims beta insensitive in [0.95,0.999].
  • domain assumption The merged person re-ID dataset (11 datasets, 178k images) is a valid training source for transfer to Market-1501 and DukeMTMC-reID.
    Section 5.1; the dataset is created for this paper and not released.

how reviews work

0 comments
Cite this review

Pith. "Pith review of Bag of Negatives for Siamese Architectures." pith.science (2026). https://pith.science/paper/P5AIZLNG

@misc{pith2026190802391,
  author       = {Pith},
  title        = {Pith review of: Bag of Negatives for Siamese Architectures},
  year         = {2026},
  howpublished = {\url{https://pith.science/paper/P5AIZLNG}},
  note         = {Machine review of arXiv:1908.02391}
}
read the original abstract

Training a Siamese architecture for re-identification with a large number of identities is a challenging task due to the difficulty of finding relevant negative samples efficiently. In this work we present Bag of Negatives (BoN), a method for accelerated and improved training of Siamese networks that scales well on datasets with a very large number of identities. BoN is an efficient and loss-independent method, able to select a bag of high quality negatives, based on a novel online hashing strategy.

Figures

Figures reproduced from arXiv: 1908.02391 by the authors.

Figure 1
Figure 1. BoN strategy. Triplets with good quality negatives are formed using the information [PITH_FULL_IMAGE:figures/full_fig_p004_1.png] view at source ↗
Figure 2
Figure 2. a) Percentage of non-zero loss triplets as a function of mAP on the training set. b) [PITH_FULL_IMAGE:figures/full_fig_p007_2.png] view at source ↗
Figure 3
Figure 3. a) Validation mAP as a function of s, b) Samples from 2 random bins. 6 Results and Comparison In this section we perform a controlled comparison of our proposal with the two most commonly used triplet losses: semi hard and batch hard and the two batch creation methods: hierarchical tree [5] and 100k IDs [25]. We avoid extra variables (e.g. augmentation, other architectures, etc.) that could mask the empirical result… view at source ↗

Discussion (0). Continue with ORCID to comment.

Reference graph

Works this paper leans on

34 extracted references · 33 canonical work pages

  1. [1]

    3dpes: 3d people dataset for surveillance and forensics

    Davide Baltieri, Roberto Vezzani, and Rita Cucchiara. 3dpes: 3d people dataset for surveillance and forensics. In Proceedings of the 1st International ACM Workshop on Multimedia access to 3D Human Objects , 2011

  2. [2]

    Online principal component analysis in high dimen- sion: Which algorithm to choose? 2018

    HervÃl’ Cardot and David Degras. Online principal component analysis in high dimen- sion: Which algorithm to choose? 2018

  3. [3]

    Carreira-Perpiñán and Ramin Raziperchikolaei

    Miguel Á. Carreira-Perpiñán and Ramin Raziperchikolaei. Hashing with binary autoen- coders. In Proc. CVPR, 2015

  4. [4]

    Beyond triplet loss: a deep quadruplet network for person re-identification

    Weihua Chen, Xiaotang Chen, Jianguo Zhang, and Kaiqi Huang. Beyond triplet loss: a deep quadruplet network for person re-identification. In Proc. CVPR, 2017

  5. [5]

    Deep metric learning with hierarchical triplet loss

    Weifeng Ge, Weilin Huang, Dengke Dong, and Matthew R Scott. Deep metric learning with hierarchical triplet loss. In Proc. ECCV, 2018

  6. [6]

    Gong and S

    Y . Gong and S. Lazebnik. Iterative quantization: A procrustean approach to learning binary codes. In Proc. CVPR, 2011

  7. [7]

    Viewpoint invariant pedestrian recognition with an ensemble of localized features

    Douglas Gray and Hai Tao. Viewpoint invariant pedestrian recognition with an ensemble of localized features. In Proc. ECCV, 2008

  8. [8]

    Efficient and Deep Person Re-Identification using Multi-Level Similarity

    Yiluan Guo and Ngai-Man Cheung. Efficient and deep person re-identification using multi-level similarity. arXiv preprint arXiv:1803.11353, 2018

Show all 34 references
  1. [9]

    In defense of the triplet loss for person re-identification

    Alexander Hermans, Lucas Beyer, and Bastian Leibe. In defense of the triplet loss for person re-identification. arXiv preprint arXiv:1703.07737, 2017

  2. [10]

    Kalayeh, Emrah Basaran, Muhittin GÃ˝ ukmen, Mustafa E

    Mahdi M. Kalayeh, Emrah Basaran, Muhittin GÃ˝ ukmen, Mustafa E. Kamasak, and Mubarak Shah. Human semantic parsing for person re-identification. In Proc. CVPR, 2018

  3. [11]

    Srikrishna Karanam, Mengran Gou, Ziyan Wu, Angels Rates-Borras, Octavia Camps, and Richard J. Radke. A systematic evaluation and benchmark for person re- identification: Features, metrics, and datasets, 2016

  4. [12]

    Seitz, Daniel Miller, and Evan Brossard

    Ira Kemelmacher-Shlizerman, Steven M. Seitz, Daniel Miller, and Evan Brossard. The megaface benchmark: 1 million faces for recognition at scale. In Proc. CVPR, 2016

  5. [13]

    Attention-based ensemble for deep metric learning

    Wonsik Kim, Bhavya Goyal, Kunal Chawla, Jungmin Lee, and Keunjoo Kwon. Attention-based ensemble for deep metric learning. In Proc. ECCV, 2018

  6. [14]

    Locally aligned feature transforms across views

    Wei Li and Xiaogang Wang. Locally aligned feature transforms across views. In Proc. CVPR, 2013

  7. [15]

    Human reidentification with transferred metric learning

    Wei Li, Rui Zhao, and Xiaogang Wang. Human reidentification with transferred metric learning. In Proc. ACCV, 2012

  8. [16]

    Harmonious attention network for person re-identification

    Wei Li, Xiatian Zhu, and Shaogang Gong. Harmonious attention network for person re-identification. In Proc. CVPR, 2018. 12 GAJI ´C ET AL: BAG OF NEGA TIVES FOR SIAMESE ARCHITECTURES

  9. [17]

    End-to-end comparative attention networks for person re-identification

    Hao Liu, Jiashi Feng, Meibin Qi, Jianguo Jiang, and Shuicheng Yan. End-to-end comparative attention networks for person re-identification. In TIP, 2017

  10. [18]

    Manmatha, Chao-Yuan Wu, Alexander J

    R. Manmatha, Chao-Yuan Wu, Alexander J. Smola, and Philipp Krähenbühl. Sampling matters in deep embedding learning. In Proc. ICCV, 2017

  11. [19]

    Deep metric learning via lifted structured feature embedding

    Hyun Oh Song, Yu Xiang, Stefanie Jegelka, and Silvio Savarese. Deep metric learning via lifted structured feature embedding. In Proc. CVPR, 2016

  12. [20]

    Per- formance measures and a data set for multi-target, multi-camera tracking

    Ergys Ristani, Francesco Solera, Roger Zou, Rita Cucchiara, and Carlo Tomasi. Per- formance measures and a data set for multi-target, multi-camera tracking. In European Conference on Computer Vision workshop on Benchmarking Multi-Target Tracking , 2016

  13. [21]

    A pose- sensitive embedding for person re-identification with expanded cross neighborhood re-ranking

    M Saquib Sarfraz, Arne Schumann, Andreas Eberle, and Rainer Stiefelhagen. A pose- sensitive embedding for person re-identification with expanded cross neighborhood re-ranking. In Proc. CVPR, 2018

  14. [22]

    Schroff, D

    F. Schroff, D. Kalenichenko, and J. Philbin. Facenet: A unified embedding for face recognition and clustering. In Proc. CVPR, 2015

  15. [23]

    Pose-driven deep convolutional model for person re-identification

    Chi Su, Jianing Li, Shiliang Zhang, Junliang Xing, Wen Gao, and Qi Tian. Pose-driven deep convolutional model for person re-identification. In Proc. ICCV, 2017

  16. [24]

    Deepface: Closing the gap to human-level performance in face verification

    Yaniv Taigman, Ming Yang, Marc’Aurelio Ranzato, and Lior Wolf. Deepface: Closing the gap to human-level performance in face verification. In Proc. CVPR, 2014

  17. [25]

    How to train triplet networks with 100k identities? In Proc

    Chong Wang, Xipeng Lan, and Xue Zhang. How to train triplet networks with 100k identities? In Proc. CVPR Workshop, 2017

  18. [26]

    Learning dis- criminative features with multiple granularities for person re-identification

    Guanshuo Wang, Yufeng Yuan, Xiong Chen, Jiwei Li, and Xi Zhou. Learning dis- criminative features with multiple granularities for person re-identification. In ACM Multimedia Conference on Multimedia Conference , 2018

  19. [27]

    Learning fine-grained image similarity with deep ranking

    Jiang Wang, Yang Song, Thomas Leung, Chuck Rosenberg, Jingbin Wang, James Philbin, Bo Chen, and Ying Wu. Learning fine-grained image similarity with deep ranking. In Proc. CVPR, 2014

  20. [28]

    Person transfer gan to bridge domain gap for person re-identification

    Longhui Wei, Shiliang Zhang, Wen Gao, and Qi Tian. Person transfer gan to bridge domain gap for person re-identification. In Proc. CVPR, 2018

  21. [29]

    Spectral hashing

    Yair Weiss, Antonio Torralba, and Rob Fergus. Spectral hashing. In Proc. NIPS, 2009

  22. [30]

    Attention-aware compositional network for person re-identification

    Jing Xu, Rui Zhao, Feng Zhu, Huaming Wang, and Wanli Ouyang. Attention-aware compositional network for person re-identification. arXiv preprint arXiv:1805.03344, 2018

  23. [31]

    Spindle net: Person re-identification with human body region guided feature decomposition and fusion

    Haiyu Zhao, Maoqing Tian, Shuyang Sun, Jing Shao, Junjie Yan, Shuai Yi, Xiaogang Wang, and Xiaoou Tang. Spindle net: Person re-identification with human body region guided feature decomposition and fusion. In Proc. CVPR, 2017

  24. [32]

    Deeply-learned part-aligned representations for person re-identification

    Liming Zhao, Xi Li, Yueting Zhuang, and Jingdong Wang. Deeply-learned part-aligned representations for person re-identification. In Proc. ICCV, 2017. GAJI ´C ET AL: BAG OF NEGA TIVES FOR SIAMESE ARCHITECTURES 13

  25. [33]

    Scalable person re-identification: A benchmark

    Liang Zheng, Liyue Shen, Lu Tian, Shengjin Wang, Jingdong Wang, and Qi Tian. Scalable person re-identification: A benchmark. In Proc. ICCV, 2015

  26. [34]

    Unlabeled samples generated by gan improve the person re-identification baseline in vitro

    Zhedong Zheng, Liang Zheng, and Yi Yang. Unlabeled samples generated by gan improve the person re-identification baseline in vitro. In Proc. ICCV, 2017

Pith tools

Reviewed August 14, 2026 · model on record in the stance chip above.