Elamur Research

SoftTriple Loss: Deep Metric Learning Without Triplet Sampling

Paper · 2019 · Qi Qian, Lei Shang, Baigui Sun et al.

Summary

When an image is used as a query, its closest matches should share the properties that matter for the search. In fine-grained bird retrieval, that may mean finding a photograph of the same species even when it shows a different pose. Distance metric learning trains a network to give images coordinates that make these comparisons useful. A common training rule takes an image, another from its class, and one from a different class. It asks for the same-class image to be nearer by a margin. The difficulty is choosing such triplets. The number of possible combinations grows quickly, and the small batch available for an update may leave out the neighbors that would make the comparison informative.

The authors find a way around this problem in the familiar SoftMax classification objective. When both the image vectors and the final-layer weight vectors have unit length, a class weight can be read as a point of reference in the same space as the images. The normalized SoftMax loss makes a smooth comparison between an image’s similarity to the reference for its own class and its similarities to references for competing classes. This gives a geometric reason why a network trained to predict class labels can also support information retrieval on images. It also shows where the classification objective is restrictive. Images of the same bird species can form several local groups, yet each image has to use the same class reference in normalized SoftMax.

SoftTriple gives a class several trainable reference vectors, called centers. For each image, it calculates a score for each class by averaging its similarities to the centers, with more weight on the better matches. The loss asks the image’s true class to lead the other classes by a margin. The centers live in the final fully connected layer and are available across training batches, so the procedure dispenses with the step of choosing image triplets. An optional penalty draws centers of the same class together, allowing a class to retain fewer distinct locations than it was initially given.

The paper evaluates retrieval and clustering on held-out categories in CUB-2011, Cars196, and Stanford Online Products. Normalized SoftMax is already a strong retrieval baseline, and SoftTriple improves the reported nearest-neighbor recall in all three datasets. On CUB-2011 with 64-dimensional embeddings, the authors report an R@1 gain of 10% over ProxyNCA and 2% over normalized SoftMax. Varying the number of centers on the bird dataset also shows that additional centers help and that the penalty stabilizes recall when more are allocated. The paper gives a conditional explanation of how center comparisons can preserve margins between nearby examples. The experiments establish the usefulness of the resulting geometry for the visual tasks studied, while ordinary classification remains a question for future work.

Deep dive: SoftTriple Loss: Deep Metric Learning Without Triplet Sampling

SoftTriple learns image embeddings through several centers per class, improving fine-grained retrieval without selecting triplets of training images. · about 40 minutes to read

The problem and its context

What an image distance has to express

An embedding is a vector that locates an example in a space where it can be compared with other examples. For image retrieval, the output of interest is an ordering. Given a query photograph, which stored image should come first, and which should come after it? For clustering, the same geometry helps a grouping procedure collect examples that belong together. The paper also names nearest-neighbor classification as an application. There, the labels on nearby examples inform the prediction. In each case, a distance has practical consequences because it determines which evidence is close enough to matter.

The supervision studied in the paper comes from labels. A training image and an image from the same class should generally be closer than a training image and one from another class. That statement guides the learning process without specifying what every direction in the space should mean. In the bird example, a class describes a species. The images can still vary by pose, and the appropriate same-class comparison for a particular image may be with others in the same local group. One reason to learn a representation is to let the image data and the training objective determine which distinctions matter for the neighborhood.

The paper’s emphasis is on the ordering of distances around an example. A requirement that every pair within a class be close treats the class as a unit. A relative requirement can focus on one image and a particular positive comparison. It asks whether the anchor has room to keep an appropriate same-class neighbor closer than a different-class neighbor. That is a useful way to specify local geometry when a class spans several regions. The difficulty emerges when the training process has to turn that specification into a workable collection of comparisons.

From hand-designed features to trainable representations

In the earlier work described by the authors, an image or other example arrived at the metric-learning stage as a vector of features computed in advance. A feature mapping then gave some directions in that vector space more influence on a distance than others. The paper uses the Mahalanobis form to describe this arrangement. The learned matrix determines how differences between input vectors contribute to the distance, and its positive semidefinite constraint makes the resulting quadratic expression non-negative. The expense of maintaining that constraint grows with the input dimension.

Principal component analysis was one response to this cost. It could reduce the space before the metric was trained, although the reduction itself did not know which distinctions the task would need. Other approaches cited by the paper used a low-rank assumption to constrain the number of parameters, reduced the frequency of positive semidefinite projections, or used random projections to learn auxiliary quantities in a smaller space before recovering the metric. These approaches address the optimization problem created by a large input space. The resulting metric still depends on the information delivered by precomputed features. A distinction that the features discard is unavailable to the later training stage.

The authors trace the move toward learned image representations to successes in classification, including ImageNet Classification with Deep Convolutional Neural Networks. Deep metric learning makes the embedding part of the network’s output and learns it from the images. The network can produce a lower-dimensional representation directly, so the original feature dimension is no longer the main constraint in the account given by the paper. Training must still specify which changes in that output are desirable. The problem moves from fitting a metric to a fixed set of features towards choosing relationships that can teach the network what its embedding should preserve.

Why the comparison set matters

The paper describes a progression from pairwise to triplet constraints. A pairwise formulation can encourage a small distance for a pair sharing a label and a large distance for a pair with different labels. A triplet connects those demands. It uses the same anchor in both distances and asks the distance to a negative example to exceed the distance to a positive example by a specified margin. A positive here is a same-class example and a negative is a different-class example. Their roles depend on the anchor. A comparison that matters for one image may have little effect on a different one.

If there are n examples in the dataset, the number of candidate pairs can grow as O(n²), and the number of candidate triplets can reach O(n³). The notation describes how the count can grow with n. The label requirements restrict the valid combinations, but the cubic growth shows why a method typically has to work with a selection. That selection also determines the training signal. A negative that is already far enough from the anchor satisfies the margin. A nearby negative can give the objective something to correct. Similarly, a batch’s available positives may differ from the same-class examples that would be most useful for shaping an anchor’s neighborhood.

The authors distinguish selection at the dataset level from selection within a batch. Stochastic gradient methods update parameters using a mini-batch, a small collection of training examples. With m examples in a batch, the paper gives O(m²) pairs and O(m³) triplets as the possible orders of growth. It points to a batch of 32 as an example where selecting comparisons already matters. At the same time, a batch of that size may include only a small part of the neighborhood around any given image. A good rule for choosing among its members can still miss relationships that the batch never contained.

Larger batches can make more examples available for each update. The paper notes the associated GPU memory costs and the increase in candidate triplets to consider. Another approach it discusses draws batches from neighboring classes, directing training toward classes likely to be confused. These choices change which images are present. The rules for constructing constraints then decide which relationships among those images enter the loss. Useful supervision depends on both decisions.

Earlier ways to find or replace triplets

The authors review several ways to choose negative examples. FaceNet selects semi-hard negatives, which supply informative comparisons without requiring the most extreme negative available. Lifted structured feature embedding considers negatives within the margin for a positive pair. Distance-weighted sampling uses distance from the anchor to determine how examples are sampled. Hierarchical triplet loss chooses hard comparisons through a tree of classes and uses a changing violation margin. The paper presents these as ways to extract a useful learning signal from the candidate pool. That pool still has to cover the relevant parts of the dataset for a selection rule to act on them.

Proxy-based learning changes the participants in the comparison. A proxy is a trainable vector used in place of an original example. In the labeled ProxyNCA setting described by the paper, each class has a proxy. A comparison can involve one actual example and two proxies. The collection of proxies is small enough relative to the original examples to be kept available across updates. An anchor can therefore be compared with a representative even when the current batch contains no image from the corresponding class. The authors also cite earlier conventional metric learning with several latent representatives per class, where the comparisons use the latent representatives themselves.

These precedents give SoftTriple two starting points. The work on proxies makes it practical to retain references across batches. The work on classification losses suggests that existing training objectives already use such references, even when their vocabulary is class scores and probabilities. The paper cites applications of SoftMax embeddings to distance-based tasks and face recognition as motivation for examining that connection. The question it takes into the derivation is how much of the relation between an anchor, a positive, and a negative is already encoded in the classification loss. The answer determines what has to change when a class has several useful local neighborhoods.

The method, step by step

The training pipeline in outline

In SoftTriple, an image becomes a vector of a fixed length, and the last fully connected layer has several trainable vectors for each training label. These vectors are the centers. The embedding and centers have unit Euclidean length, so a dot product measures how closely their directions align. The network computes those dot products, pools the values for each class, and penalizes mistakes in the resulting class comparisons. Images provide the input and labels for the loss. Centers provide the points against which the images are judged.

How SoftTriple trains an image embedding

The steps in order.

How SoftTriple trains an image embeddingStep 1: Produce a unit-length vector for each image1. Produce a unit-length vector for each imageStep 2: Score all learned centers by dot product2. Score all learned centers by dot productStep 3: Weight the centers within each class3. Weight the centers within each classStep 4: Aggregate their similarities into class scores4. Aggregate their similarities into class scoresStep 5: Discount the correct class by the margin5. Discount the correct class by the marginStep 6: Optimize the loss with optional center regularization6. Optimize the loss with optional center regularization

The final layer holds the centers throughout training, so every image in a batch can be compared with centers from classes absent from that batch. That property requires no change to the usual practice of processing a mini-batch at a time. The part that disappears is the assembly of explicit triplets from those images. To see why the class comparisons can take their place, it helps to start with the earlier distance formulation and then follow the change from ordinary SoftMax to SoftTriple.

From a learned distance to an ordering constraint

The older Mahalanobis formulation discussed in the paper writes the squared quadratic distance as follows.

dist_M(xᵢ, xⱼ) = (xᵢ − xⱼ)ᵀ M (xᵢ − xⱼ)

Here dist_M is the distance expression associated with M, the learned positive semidefinite matrix. The indices i and j identify examples, and xᵢ and xⱼ are their feature vectors in this formulation. The superscript ᵀ denotes transposition. The vector difference appears on both sides of the matrix, so M can change how the direction of that difference affects its cost. For an input of dimension d, the paper puts the cost of maintaining the matrix constraint as high as O(d³).

The triplet formulation starts with the relationship that the distances should satisfy. From here on, x denotes a learned embedding. For an anchor xᵢ, a positive xⱼ, and a negative xₖ, the paper writes the requirement using squared Euclidean distances.

‖xᵢ − xₖ‖₂² − ‖xᵢ − xⱼ‖₂² ≥ δ

The indices i, j, and k specify the members of a valid triplet. The anchor and positive share a label, and the negative has a different label. The double bars with subscript ₂ specify Euclidean length, and the superscript ² squares the length. The scalar δ is the margin, the minimum gap required between the distance to the negative and the distance to the positive. Since the negative distance appears first, it contributes positively to a satisfied constraint.

Unit-length vectors let the same ordering be expressed through inner products. In the distance expansion, the squared lengths of the two vectors in each comparison are fixed. The term that changes is their dot product. After absorbing the scale change into the margin, as the authors do, the constraint reads as follows.

xᵢᵀxⱼ − xᵢᵀxₖ ≥ δ

The expression xᵢᵀxⱼ is the dot product between the anchor and positive, and xᵢᵀxₖ compares the anchor and negative. Under unit normalization, a larger dot product corresponds to a shorter Euclidean distance. The symbol δ now measures the margin on the similarity scale. This convention allows the rest of the method to use dot products throughout.

The hinge loss charges for the amount by which the comparison falls short.

ℓ_triplet(xᵢ, xⱼ, xₖ) = [δ + xᵢᵀxₖ − xᵢᵀxⱼ]₊

The quantity ℓ_triplet is the penalty for the indicated anchor, positive, and negative. The subscript plus on the brackets means to take the larger of the bracketed value and zero. The similarity to the negative increases the penalty, while the similarity to the positive decreases it. Once the positive has the required lead, the loss is zero for that comparison. A procedure built on this loss has to decide which particular xⱼ and xₖ to put beside xᵢ.

What normalized SoftMax already compares

Ordinary SoftMax starts from classification scores. If xᵢ is an image embedding and yᵢ is its training label, the probability for that label is obtained from its score and a sum over all class scores.

Pr(Y = yᵢ | xᵢ) = exp(w[yᵢ]ᵀxᵢ) / Σⱼ exp(w[j]ᵀxᵢ)

The notation Pr denotes a conditional probability, with Y standing for the class and the vertical bar meaning given the embedding xᵢ. The vector w[j] is the weight for class j, and w[yᵢ] is the weight associated with the observed label of image i. Each vector is a column in the last fully connected layer, with the same embedding dimension d as xᵢ. The sum Σⱼ runs across all C training classes. The function exp exponentiates the class score so that dividing by the sum yields a probability.

The training loss uses the negative logarithm of the probability assigned to the observed class.

ℓ_SoftMax(xᵢ) = −log Pr(Y = yᵢ | xᵢ)

Here ℓ_SoftMax is the loss of the image indexed by i, log is the natural logarithm, and the probability is the SoftMax value just defined. The loss gets smaller as the true class takes a larger share of the probability. A change to the embedding can affect several scores at once because the same xᵢ appears in every dot product. Classification is therefore already exerting pressure on the image’s position relative to the full collection of weights.

To give that pressure a geometric interpretation, the authors use unit-length weights and embeddings. With lengths fixed, the classes compete on the basis of directions. A scale factor adjusts the differences between similarities before the exponential is applied.

ℓ_norm(xᵢ) = −log {exp(λ w[yᵢ]ᵀxᵢ) / Σⱼ exp(λ w[j]ᵀxᵢ)}

The name ℓ_norm denotes the normalized SoftMax loss. The scalar λ scales the dot products, all of which use unit vectors. The class index j, true label yᵢ, image vector xᵢ, and class weights w have their previous meanings. The operation exp makes differences of the scaled similarities consequential for the ratio. In this setting the weight for a label is a point in the embedding space and can be interpreted as the class center.

The authors’ next step is to rewrite the loss using a maximization over class weights in a probability distribution. These weights are auxiliary quantities in the derivation. They describe how much emphasis each class comparison receives for the image in question.

ℓ_norm(xᵢ) = max over p ∈ Δ {λ Σⱼ pⱼ xᵢᵀ(w[j] − w[yᵢ]) + H(p)}

The vector p is a distribution with a component pⱼ for every class j. The set Δ is the probability simplex, which requires every component to be non-negative and their sum to be one. The function H is entropy, a measure of how spread out a distribution is. The expression inside the sum compares xᵢ with the center w[j] for class j and the center w[yᵢ] for its true class. The scalar λ gives this weighted similarity difference its scale relative to entropy. The maximization chooses the distribution that gives the largest combined value.

The geometry is visible in the sign of the difference. A class whose center fits the image better than its own center produces a positive term. For the true class itself the two dot products cancel, giving a zero reference comparison. Every other term has the form of a triplet comparison, with the image as anchor and learned centers in place of the positive and negative examples. The entropy term supports a spread of weights in the maximization. It makes the loss respond smoothly to several competitors when their scores are close.

The constrained maximization has an explicit solution.

pⱼ = exp(λ xᵢᵀ(w[j] − w[yᵢ])) / Σₗ exp(λ xᵢᵀ(w[l] − w[yᵢ]))

The index l runs over the same classes as j and serves as the summation index of the denominator. The exponent uses the amount by which each center competes with the true center, scaled by λ. The resulting pⱼ is larger for centers with larger relative similarities. The paper obtains this distribution from the optimality conditions for the constrained problem. Substitution gives a log of a sum of exponentials of relative scores.

ℓ_norm(xᵢ) = log {Σⱼ exp(λ xᵢᵀ(w[j] − w[yᵢ]))}

The symbols retain their meanings. In every exponential, the same true-class score is subtracted from a candidate-class score. Its exponential factor can be taken outside the sum. Taking the logarithm gives the earlier SoftMax loss, which subtracts the true-class score from the logarithm of the total exponentiated scores. The equality shows that the center-based form is an exact way to read normalized SoftMax.

The relative ordering encouraged by this formulation can be written directly.

xᵢᵀw[yᵢ] − xᵢᵀw[j] ≥ 0

For image i and any class j, the expression asks the image to have at least as much similarity to its own center as to the other center. The zero on the right is the ordering threshold in this interpretation. The smooth loss can remain positive even when the ranking is correct, because competing classes can still take probability away from the correct one. This gives an incentive to separate the scores further.

Removing entropy from the auxiliary maximization gives all the weight to a class with the largest relative score. In the scale used for the class differences, that comparison can be written as follows.

max over j {xᵢᵀw[j]} − xᵢᵀw[yᵢ]

The maximum includes the true class, and the second term is its similarity. The expression is therefore zero if the true center ties for or achieves the maximum. The version with entropy lets other classes contribute even when one has the largest score. The authors interpret this as reducing the influence of extreme comparisons. They describe λ as controlling how strongly large score differences dominate the smooth objective. This is the argument that motivates retaining a soft competition between classes when the class score itself changes.

What changes when the true class is absent from the sum

The paper uses the same reasoning to examine ProxyNCA. In its formulation, the true proxy still supplies the numerator, while only competing proxies enter the normalizing sum.

ℓ_ProxyNCA(xᵢ) = −log {exp(w[yᵢ]ᵀxᵢ) / Σⱼ≠yᵢ exp(w[j]ᵀxᵢ)}

Here ℓ_ProxyNCA is the per-example loss in the form discussed by the authors, and w[j] now denotes the proxy for class j. The subscript j ≠ yᵢ restricts the sum to labels other than the true label. The other quantities are the same sort of image embedding, exponential, and logarithm as in SoftMax. The absence of the true-class term means the ratio can exceed one.

In the scaled, distribution-based expression, the corresponding change is the set of classes over which the maximization operates.

ℓ_ProxyNCA,scaled(xᵢ) = max over p ∈ Δ {λ Σⱼ≠yᵢ pⱼ xᵢᵀ(w[j] − w[yᵢ]) + H(p)}

As before, p contains the comparison weights, Δ is the applicable simplex, and H is entropy. Here the distribution has C − 1 entries, one per competing class. The expression uses scale λ as in the paper’s comparison of the objectives. With no true-class self-comparison, there is no term fixed at zero among the relative scores. All the differences can be negative together. The authors’ observation about unboundedness concerns the formulation without a floor when scores can separate without bound. With a fixed scale and unit vectors, the dot products themselves remain bounded.

The paper suggests placing a hinge on the ProxyNCA expression.

ℓ_ProxyNCA,hinge(xᵢ) = [−log {exp(w[yᵢ]ᵀxᵢ) / Σⱼ≠yᵢ exp(w[j]ᵀxᵢ)}]₊

The symbol ℓ_ProxyNCA,hinge denotes that proposed version. The brackets with subscript plus impose a floor of zero, and their contents are the ProxyNCA loss without the scale factor as displayed above. This observation helps explain why SoftTriple keeps the true class in its own denominator. The authors leave the proposed ProxyNCA variant unevaluated.

Give each class several possible matches

The SoftMax derivation reveals that each image gets an instructive set of center comparisons, yet the center for its own class is fixed by its label. The pose example suggests a reason to change the score. If different poses yield different neighborhoods, every image can still have a good match within its class without every image having the same best reference direction. The authors allocate K centers to each class and first consider defining the class score by the strongest match.

S(i,c) = max over k {xᵢᵀw[c,k]}

The function S(i,c) is the hard similarity of image i to class c. The index k runs through the K centers allocated to c, and w[c,k] is the corresponding unit vector. The maximum returns the largest of the dot products with xᵢ. The winning center can vary with the image. The operation is applied to each class, so the strongest representative of a competing class is also allowed to determine that class’s score.

The paper mentions other ways to define similarity to several centers. One example asks how well the collection can reconstruct the embedding.

min over z ∈ ℝᴷ {‖[w[c,1], …, w[c,K]] z − xᵢ‖₂}

The bracketed matrix collects the K centers of class c as columns. The vector z lives in ℝᴷ, the space of K real-valued coefficients. Multiplying the matrix by z forms a weighted linear combination, and the Euclidean norm measures the residual from xᵢ. The minimum would describe the best reconstruction under that formulation. The paper uses the best center match as its starting point because it offers a direct way to study the effect of multiple representatives.

With hard similarities, the natural ordering condition asks the score of the true class to reach or exceed that of any other class.

S(i,yᵢ) − S(i,j) ≥ 0

The first term uses the best center for image i in its own class yᵢ, and the second uses the best center in class j. The right-hand side permits a tie. The authors make the requirement stricter for other labels so that the true class must lead by a margin.

S(i,yᵢ) − S(i,j) ≥ δ, for j ≠ yᵢ

Here δ is a positive margin on the similarity scale, and j ranges over competing classes. The score comparison now has room to tolerate a small change in scores when the requirement is met. To incorporate the margin into a probability-style loss, the authors reduce the true-class score by δ. The adjusted score must still compete with the full scores of the other classes. The resulting objective is HardTriple.

ℓ_HardTriple(xᵢ) = −log {exp(λ(S(i,yᵢ) − δ)) / [exp(λ(S(i,yᵢ) − δ)) + Σⱼ≠yᵢ exp(λ S(i,j))]}

The symbol ℓ_HardTriple is the loss for image i when the class similarities come from hard maxima. The scale λ adjusts how the scores enter the exponentials. The margin δ is applied to class yᵢ in both occurrences of its score, and all other class scores enter the sum without that adjustment. The denominator includes the contribution from the true class. An image that only narrowly beats its competitors on unadjusted scores can still receive substantial pressure to improve its separation.

HardTriple allows a class to accommodate different groups, because examples with the same label can use different centers. Its direct maximum also makes the gradient follow the center that wins. When two centers give nearly the same similarity, a small change in either center or the image can switch which center controls the score. At equality the maximum can fail to be differentiable. The next part of the method softens the assignment inside each class.

Turn the nearest-center choice into an average

A maximum can be expressed as a choice of how to distribute weight. If the weights must be non-negative and sum to one, the largest attainable weighted mean is the maximum element. Putting the whole weight on one of the largest similarities achieves it.

max over k {xᵢᵀw[c,k]} = max over q ∈ Δ {Σₖ qₖ xᵢᵀw[c,k]}

The vector q has a component qₖ for each center k of class c. The set Δ is now the simplex for K weights. The sum computes the average dot product for image i according to those weights. Unlike the earlier distribution p over classes, q concerns centers in a single class. There is a different center distribution for each pairing of an image and a class.

Adding entropy to this maximization rewards a distribution with some spread.

max over q ∈ Δ {Σₖ qₖ xᵢᵀw[c,k] + γ H(q)}

Here H(q) is the entropy across the center weights. The scalar γ determines its strength relative to the average similarity. The sum retains its previous meaning. A concentrated distribution can still be advantageous if one center fits much better, but at a close contest the entropy term favors giving weight to several plausible matches. The explicit solution again uses exponentials.

qₖ = exp(xᵢᵀw[c,k] / γ) / Σₗ exp(xᵢᵀw[c,l] / γ)

The index l runs over the K centers of class c in the denominator. The weight qₖ increases when center k has a larger similarity relative to the rest. Dividing by a smaller γ separates the exponentiated scores more sharply, producing weights closer to a hard selection when one center leads. A larger γ brings the weights closer together. As the similarities of the leading centers cross, their weights can exchange roles continuously.

SoftTriple uses these weights to form its relaxed class similarity.

S′(i,c) = Σₖ qₖ xᵢᵀw[c,k]

The prime in S′(i,c) identifies the weighted score for image i and class c. The factors qₖ are the solution to the preceding maximization, and the quantities they multiply are the actual image-to-center similarities. Entropy determines the weights, while the class score is the average of dot products alone. This detail matters when following the derivation. The score omits the extra entropy value from the maximized objective. It consequently stays within the range of the center similarities that enter the average.

The entire calculation is repeated for each class, feeding the resulting smooth scores into the same margin arrangement used in HardTriple.

ℓ_SoftTriple(xᵢ) = −log {exp(λ(S′(i,yᵢ) − δ)) / [exp(λ(S′(i,yᵢ) − δ)) + Σⱼ≠yᵢ exp(λ S′(i,j))]}

The quantity ℓ_SoftTriple is the example’s loss. The term S′(i,yᵢ) is the weighted score for the observed label, and S′(i,j) is the weighted score for a competitor. The parameter δ discounts the true-class score and λ scales the logits, the values supplied to the class-level SoftMax. The sum runs over alternative labels j. The operations inside each class answer which of its centers fit this image. The outer probability calculation answers how well the true class is doing against the alternatives after accounting for the margin.

With one center, the within-class average reduces to that center’s dot product. A positive margin can still distinguish that case of SoftTriple from the paper’s normalized SoftMax baseline. At multiple centers, the objective provides a way for an embedding to fit its own class through a particular region of the space and to be judged against suitable regions in the other classes. The loss supplies these comparisons every time an image is used in training. The participating centers are parameters of the expanded final layer and receive updates along with the image network.

When center comparisons preserve margins between images

The argument for centers would be weaker if a margin between representatives never said anything about a margin between original examples. The authors give a conditional bound to connect the two. Take an anchor xᵢ and a positive xⱼ from the same class that share their nearest center. Let xₖ be from a different class. In the following formulas, the center associated with an example is written with the example’s label, suppressing the center index. That shorthand allows the shared representative and the negative’s own representative to enter the same comparison.

xᵢᵀw[yᵢ] − xᵢᵀw[yₖ] ≥ δ

The vector w[yᵢ] is the relevant center for both the anchor and the positive. The vector w[yₖ] is the representative associated with the negative from class yₖ. The dot products compare the same anchor xᵢ against these centers and δ gives their assumed separation in favor of its own class. The premise concerns particular center comparisons. It can be tested independently of how the scores of all other centers combine.

The second premise limits the distance of each example from its representative.

‖xᵢ − w[yᵢ]‖₂ ≤ ε

Here i stands for any example covered by the assumption, and ε is the upper bound on its Euclidean distance from its associated center. In the argument for this triplet, the distances that directly enter the error bound are those from the positive and negative to their representatives. Since xⱼ and xᵢ share a center, xⱼ is close to w[yᵢ] under the premise.

The paper transfers the center margin to an example margin by adding the relevant differences between examples and centers.

xᵢᵀxⱼ − xᵢᵀxₖ ≥ xᵢᵀ(xⱼ − w[yᵢ]) + xᵢᵀ(w[yₖ] − xₖ) + δ

The left side is the difference in anchor similarity between the actual positive and negative. On the right, the first dot product replaces the positive center with the positive image, and the second replaces the negative center with the negative image. The center margin contributes at least δ. Each replacement can reduce the gap. The absolute value of its dot product is bounded by the length of the residual vector, because the anchor has unit length.

xᵢᵀxⱼ − xᵢᵀxₖ ≥ δ − 2ε

The bound uses ε for each of the two residuals. It describes how much margin may be lost when the positive and negative centers are replaced by the actual images. Placing centers closer to examples improves the bound by reducing the approximation error. The shared-center premise keeps the guarantee local. It applies to a positive in the same representative’s neighborhood, while a member of the same class associated with a different center can fall outside the argument.

This is the reason the paper treats within-class variation as a geometric issue. A single representative may sit too far from many images for the deduction to yield a useful margin. Several representatives can make the nearest-center distances smaller and give the comparison better premises. At the extreme discussed by the authors, providing a center for each example would allow each example to coincide with its center. Such a collection would sacrifice the compactness that made the representative-based method attractive and would also raise the cost of training.

Let redundant centers share a location

The number of useful centers in a class is usually unknown before training. SoftTriple can allocate a sufficiently large K and then penalize separation between centers of the same class. Supervision still rewards differences that help distinguish the images from competing classes. The penalty makes unnecessary differences cost something. The two terms allow different classes to end up with different numbers of distinct center locations even when their initial allocations match.

For one reference center, the authors arrange the differences to all centers of that class in a matrix.

M[j,t] = [w[j,1] − w[j,t], …, w[j,K] − w[j,t]]ᵀ

The matrix M[j,t] belongs to class j and is built relative to its center t. The transpose indicates that the differences are laid out as rows. The vectors w[j,1] through w[j,K] are the allocated centers, and w[j,t] is subtracted from each. A row corresponding to another center vanishes if that center and the reference coincide. The row for the reference itself is always zero.

The mixed norm used in the paper sums the Euclidean lengths of these rows.

‖M[j,t]‖₂,₁ = Σₛ ‖w[j,s] − w[j,t]‖₂

The notation ‖·‖₂,₁ specifies a Euclidean norm within each row followed by a sum over rows. The index s runs over the K centers of class j, and the rows are the vector differences from the previous formula. The norm can encourage a whole difference vector to vanish together. Its role is to bring centers to the same location, rather than to make their coordinate vectors sparse individually.

The class penalty is first described by accumulating the mixed norms over reference centers.

R(w[j,1], …, w[j,K]) = Σₜ ‖M[j,t]‖₂,₁

The symbol R denotes the within-class regularizer and t runs over the class’s K reference centers. The expression sums center distances without comparing centers belonging to different labels. It connects the penalty to the row construction and shows why it encourages repeated locations within a class.

The paper then gives a version expressed through dot products of unit centers.

R(w[j,1], …, w[j,K]) = Σₜ₌₁ᴷ Σₛ₌ₜ₊₁ᴷ √(2 − 2 w[j,s]ᵀw[j,t])

The outer index t is the first center in a pair, and s ranges over centers after it. The square root gives the Euclidean distance between the two unit vectors, since the dot product determines the squared distance when lengths are fixed. This display counts each unordered pair once. The preceding row sum visits both orders of a pair, so the two statements of the penalty differ in scale. They favor the same coincidences, with the scale relevant to the strength assigned to the regularizer.

The final objective combines average SoftTriple loss with the center penalty.

minimize (1/N) Σᵢ ℓ_SoftTriple(xᵢ) + τ Σⱼ R(w[j,1], …, w[j,K]) / [C K (K − 1)]

The count N is the number of training examples, with i indexing those examples. The loss ℓ_SoftTriple is the score-based term defined earlier. The sum over j collects the regularizers for the C training classes, each with K allocated center vectors. The denominator normalizes the penalty by the class and center counts, and the coefficient τ controls its contribution. In configurations that omit the regularizer, training uses the per-example loss without the center penalty.

The training procedure updates the network and centers by using mini-batches, as in classification. The center matrix increases the width of the last fully connected layer because it must supply a similarity for every center. Pooling then produces one score per class. With a fixed collection of training classes and centers, each added training image contributes a set of comparisons against that collection, rather than creating combinations with pairs of other images. The paper uses this to describe linear growth with the number of examples in the center-based construction. The cost of computing each image’s scores still depends on how many centers the layer holds. The authors released the official SoftTriple code alongside the method.

Experiments and results

How the comparisons were run

The experiments ask whether the learned image vectors organize unseen categories into useful neighborhoods. CUB-2011 supplies bird species, Cars196 supplies car categories, and Stanford Online Products supplies product categories. For each dataset, training and evaluation use disjoint sets of classes. During training, the class labels determine which centers take part as the correct or competing references. At evaluation, distances and cluster assignments concern embeddings of images in the held-out classes. These splits give the experiments a bearing on transfer beyond the actual labels of the training centers.

The authors use Inception with batch normalization as the image backbone. Its starting weights come from ImageNet ILSVRC 2012, associated with the ImageNet Large Scale Visual Recognition Challenge. The network then undergoes fine-tuning on the target dataset. Inputs are cropped to 224 × 224. Training uses random crops and random horizontal mirroring. The authors’ test procedure uses a single crop at the center of each image. They freeze batch normalization for CUB-2011 and Cars196, citing similarity to ImageNet, and leave it in training mode for Stanford Online Products.

Training uses Adam with batches of 32 and runs for 50 epochs. The standard initial learning rates are 1e-4 for the backbone and 1e-2 for the centers. Both are divided by 10 at epochs 20 and 40. Embeddings and centers have unit length. The standard SoftTriple configuration sets the center penalty strength τ to 0.2, the smoothing parameter γ to 0.1, the margin δ to 0.01, and the center allocation K to 10. Stanford Online Products uses a different center configuration.

Normalized SoftMax is the closest comparison to the new objective. It uses one representative per class and the probability-style loss derived earlier. ProxyNCA provides another representative-based comparison. The paper also discusses SemiHard, Npairs, and methods for learning from more structured sets of triplets. The authors report comparisons with embeddings of dimension 64 and with larger embeddings. They give the dimensions explicitly because a change in the amount of information the vector can hold would otherwise be mixed into the interpretation of a loss comparison.

How retrieval and clustering are scored

Recall@k is the paper’s retrieval measure. For a query, it asks whether the first k retrieved images include a match from its class. R@1 therefore measures how often the nearest retrieved image is a correct-class match. It makes the first result decisive. A method can have useful images nearby and still miss on this measure if an incorrect-class image comes first. When the paper reports gains on R@1, it is describing a change in the ordering at that first position.

Normalized mutual information measures how well clustering assignments correspond to the class labels. It captures how much knowing a cluster assignment tells us about the label, with normalization for the uncertainty in the two sets of assignments.

NMI = 2 I(Ω; 𝒞) / [H(Ω) + H(𝒞)]

The symbol Ω stands for the ground-truth label assignments and 𝒞 for the assignments produced by clustering. The function I gives their mutual information, and H is the entropy of the indicated assignments. The denominator uses the sum of the two entropies, and the factor 2 gives the stated normalization. The numerical gains the authors discuss are chiefly for R@1. A reported retrieval gain supplies no numerical estimate of the associated change in NMI.

CUB-2011

CUB-2011 contains 11,788 images of 200 bird species. Training uses the first 100 classes, and all other classes are set aside for testing. The distinction by species makes a test query a direct example of the paper’s transfer question. The system has learned which similarities help on the training species, and retrieval measures whether those similarities also put images of an unseen species near each other.

At dimension 64, normalized SoftMax outperforms the other metric-learning baselines in the authors’ comparison. The result is pertinent to the derivation because it shows that the one-center classification objective can already build embeddings with useful nearest neighbors. SoftTriple is the strongest method reported for this comparison. Its gain in R@1 is 10% over ProxyNCA and 2% over normalized SoftMax, using the authors’ reported improvements. These figures refer to the same dataset and dimensional setting, and each uses its named method as the baseline.

The smaller-embedding comparison includes some differences in evaluation procedure. The Npairs entry identified by the authors uses multiscale testing. The comparisons for the other methods use a single crop, and the SemiHard result is taken from the cited work on facility location. The 64-dimensional group controls an important property of the representations, while the sources and procedures for individual benchmark entries can differ.

The bird comparison at larger dimensions reports SoftTriple with a 512-dimensional embedding. Hierarchical triplet loss, or HTL, also uses 512 dimensions and the Inception backbone. SoftTriple improves R@1 over HTL by more than 8%. The reported lead over Margin is about 2% in R@1, with Margin using a 128-dimensional embedding and ResNet50, associated with Deep Residual Learning for Image Recognition. HDC uses 384 dimensions. The comparison with HTL aligns the named backbone and vector size. The comparison with Margin concerns a different overall configuration, and the authors regard its backbone as stronger than Inception.

The paper observes better results for the larger representations in these comparisons and relates them to the extra space available for separating examples. The gains within the 64-dimensional setup and those among the larger systems accordingly answer different questions. The former show what the objective can accomplish with the smaller vectors common in that benchmark. The latter show that the objective remains competitive when the embedding has more dimensions.

Cars196

Cars196 contains 16,185 images from 196 car categories. The training set takes the first 98 categories and the test set takes the rest. The setup again gives the network examples from a portion of the label space and evaluates the relationships it learns on different classes. The kind of object changes from birds to cars, providing another fine-grained setting for the same proposed loss.

With 64-dimensional embeddings, normalized SoftMax records an R@1 gain of 3% over ProxyNCA. SoftTriple improves on normalized SoftMax by about 2% in the same comparison. The outcome echoes the bird experiment: the baseline that uses a representative for each class is competitive, and the full loss with multiple centers makes a further gain. The paper reports this within the fixed dimension, allowing the gain over normalized SoftMax to be read without attributing it to wider embeddings.

In the comparison with larger embeddings, the paper uses the dimensional configurations described for the bird data. It identifies HTL as the strongest earlier result in this comparison and reports a 3% R@1 improvement over it for SoftTriple. The car experiment therefore gives favorable results for the method at both scales of representation considered by the authors.

Stanford Online Products

Stanford Online Products contains 120,053 images from eBay.com and includes 22,634 classes. The standard split assigns 11,318 classes to training and the rest to testing. The paper notes that a class has about 5 images. This makes the product data an important case for the design choice about how many representatives to allocate. There are many labels and relatively few observations available to place the centers for each one.

For this dataset the authors use K = 2 and omit the center regularizer. They raise the initial learning rate for the centers from 0.01 to 0.1. The change applies to the representatives, whose allocation and update rate differ from the standard configuration used on the other data. It allows the product results to demonstrate the use of a small collection of centers under the dataset’s conditions.

On the test classes with 64-dimensional embeddings, normalized SoftMax improves R@1 by 2% over ProxyNCA. The move from 1 to 2 centers gives SoftTriple a further 0.4% gain over normalized SoftMax. In the larger-embedding comparison, both SoftTriple and normalized SoftMax outperform the previously strongest methods discussed by the authors. SoftTriple exceeds the previous best R@1 by more than 3% in that comparison. The larger result concerns the reported group of benchmark systems, while the smaller gain concerns the direct comparison with the normalized baseline at dimension 64.

The following chart shows comparisons for which the reported improvement uses ProxyNCA as the reference and the embedding dimension is 64. Each bar is a gain on the indicated dataset’s held-out classes. The chart compares reported improvements with a common named reference method across datasets. Absolute recall and the difficulty of the queries can vary independently of the bar lengths.

Reported R@1 gains over ProxyNCA on CUB-2011, Cars196, and Stanford Online Products at dimension 64

The comparison objectives improve first-result retrieval over the ProxyNCA result for their respective test classes.

Reported R@1 gains over ProxyNCA on CUB-2011, Cars196, and Stanford Online Products at dimension 64Stanford Online Products, normalized SoftMax: 2Stanford Online Products, normalizedSoftMax2Cars196, normalized SoftMax: 3Cars196, normalized SoftMax3CUB-2011, SoftTriple (this paper): 10CUB-2011, SoftTriple (this paper)10
The numbers
System or settingreported R@1 gain %
Stanford Online Products, normalized SoftMax2
Cars196, normalized SoftMax3
CUB-2011, SoftTriple (this paper)10

Across the experiments, the normalized SoftMax baseline contributes a finding of its own. A classification training pipeline using normalized center similarities produces useful rankings on withheld categories. SoftTriple improves those rankings with a more flexible scoring rule. The test on held-out classes means that the improvement is visible in the embeddings of new images, while the mechanism used to learn those embeddings still operates on centers for the training categories. The analyses of center counts look more directly at which features of the mechanism account for the results.

What the ablations show

What happens when the center count increases

The authors vary the allocation of centers on CUB-2011 and compare R@1 with and without the penalty. Raising the count from 1 to 10 substantially improves the reported retrieval performance. The variable here is closer to the paper’s central design choice than an overall comparison between SoftTriple and a separate method. The result shows that the capacity to use multiple representatives can pay off in the final neighborhood ordering. The additional center slots contribute to performance under the loss, beyond merely changing the architecture of the last layer.

Once the allocation is sufficiently large, the curve for regularized SoftTriple changes little with further increases. This stability is what the authors seek from the penalty. If an additional slot offers little useful distinction, its associated center can end up at substantially the same location as another center. The score can still exploit several locations where they improve the fit, while a large initial count need not imply that every class uses the same number of distinct directions.

The unregularized curve behaves differently at larger allocations. In the paper’s account, recall declines when the method is given too many centers and the penalty is absent. The authors attribute this to overfitting. The test performance measures the effect on generalization, while the experiment gives no independent measurement identifying how particular extra centers contributed to that effect. The comparison supports the narrower conclusion that adding capacity past the useful range is sensitive to regularization in this setting.

This test also helps interpret the relation between the standard loss and the center-based theorem. More centers can make it easier for examples to have close representatives, which is the geometric intuition behind using them. The measured improvement is in R@1. The analysis does not measure the residual bound for individual image triplets. Its evidence is therefore about an outcome expected from better local representations, with the theorem providing a separate, conditional account of how those representations can preserve a margin.

What the center penalty does to the learned layer

A second CUB-2011 comparison starts with K = 20 and examines the number of unique centers found for each training class. The high initial allocation is chosen to make the effect visible. In the unregularized run, the authors describe centers that are similar while remaining distinct. With the penalty, the collection of distinct centers becomes substantially smaller. This is the expected effect of charging Euclidean distance between every pair of centers within a class.

The center count measures a different outcome from retrieval recall. It asks what happens to the representative collection itself, while the recall curve asks what happens to the ordering of test images. Taken together, the analyses show both that the penalty encourages compactness in the learned coordinates and that retrieval is steadier across generous initial allocations. Neither measurement requires a claim that distinct locations correspond to named visual properties. The experiment concerns how many locations remain distinguishable, and the test labels check whether neighborhoods are useful.

The terminology of compactness deserves a precise reading here. The comparison concerns the number of unique centers, whereas the training architecture starts with an explicit number of slots. Several entries in a layer can be redundant in the sense that they occupy the same position. The paper does not report a separate removal step or a resulting reduction in the layer’s allocated width. The result of the ablation can be understood directly as a property of the fitted centers.

What the example queries add

The authors display bird queries beside neighbors retrieved by the normalized SoftMax and SoftTriple embeddings. They highlight returned images whose classes differ from that of the query. The examples show that normalized SoftMax can already place relevant birds near the top. They also illustrate cases where SoftTriple leaves fewer wrong-class images among the leading results. The qualitative comparison gives a concrete meaning to a gain in first-result recall: an incorrect neighbor can lose its position to an image with the label the query is supposed to recover.

Selected queries cannot show the frequency of a particular failure across the test set. The broader recall comparisons give the frequency-based evidence, while the examples illustrate the form the difference can take. The images also leave open which aspect of each photograph drove its ranking. A display of neighbors makes the consequence of the embedding easier to see without identifying the variables associated with individual centers.

The ablations focus more directly on center multiplicity and the penalty than on the other changes introduced in the derivation. HardTriple establishes the hard maximum as a possible objective, and SoftTriple replaces it with the weighted score for analytical reasons. The paper gives no numerical HardTriple comparison that isolates the value of smoothing. It likewise gives no parameter sweep isolating the small margin or the value of γ. The experiments support the combined SoftTriple objective and clarify what happens as centers and regularization change. They provide less direct evidence about the separate contribution of the class margin and the particular soft assignment rule.

Limitations

Limits the authors identify

The authors describe a tradeoff between accuracy of representation and cost. Increasing the number of centers can improve the fit between images and their representatives. It also widens the fully connected layer, requires more similarities to be computed, and can make optimization slower. They identify overfitting as a possible consequence of allocating too many centers. The regularizer addresses redundancy by encouraging coincident locations. That still leaves a decision about the allocation with which to begin. On Stanford Online Products the authors make that choice explicitly based on the small number of images in each class.

The class-level margin suggests that SoftTriple could also be used for classification. The paper leaves its evaluation on ordinary classification for future work. In the reported experiments, labels guide the learning of centers and embeddings, while the tests examine the embeddings through retrieval and clustering. Even a strong result on the withheld classes does not supply the missing classification evaluation. The proposed hinge version of ProxyNCA is another open question the authors identify. It has a stated mathematical motivation, but they leave validation outside the paper’s scope.

What follows from the assumptions of the proof

The margin result transfers a constraint about particular centers to a constraint about particular images. It needs both the margin premise and the bound on how far images are from their representatives. If the deviations are large enough, the lower bound on the original comparison may cease to ensure that the positive leads the negative. The proof also assumes that the anchor and positive have the same nearest center. A same-class pair that spans different neighborhoods is outside that case. These assumptions limit what can be claimed about preservation of the full set of image triplets.

The actual training loss compares weighted class scores. The proof starts from an inequality between similarities to particular centers. A favorable smooth class score can reflect several contributions, and a small loss is not itself a measurement of every point’s distance to its nearest center. The paper offers a mathematical explanation of why good representatives help under stated conditions. Its experiments judge whether the resulting embeddings work. They leave open how frequently every premise of the bound holds in those embeddings.

The claim of avoiding sampling also has a precise scope. The network is trained on batches of images. The method removes the phase that chooses anchor–positive–negative image triplets and substitutes comparisons with persistent trainable centers. It still depends on which images are supplied during training, and the centers summarize the supervision that reaches them through those images. They give the current batch access to representatives from other classes, with the level of detail determined by the learned locations and their allocation.

What the experimental setup allows a reader to infer

The tests establish performance on fine-grained visual categories using the specified network, training protocol, and class splits. A class split tests whether embeddings let a distance transfer to labels unseen during target training. Other kinds of transfer, including a change in image distribution or a move away from images, would require different evidence. The pretrained backbone is also part of the empirical result. The study does not establish how the same objectives would compare if the image network began from an untrained initialization.

Comparisons to previously reported systems have differences in embedding dimensions, backbones, and test procedures. The matched backbone and embedding dimension in the CUB-2011 comparison with HTL make that particular result easier to interpret. The Margin comparison combines changes in objective with differences in architecture and dimension. The multiscale Npairs entry uses a different test procedure from the authors’ single-crop evaluation. The normalized SoftMax comparison is closer to the new method, but the full SoftTriple objective introduces a margin and changes the class score as well as introducing more centers. The center-count analysis gives more direct evidence about multiplicity.

The experiments also adapt the recipe to the dataset. Stanford Online Products changes the center count, center learning rate, and use of regularization. Its results show what the method can do under that configuration. They do not isolate what each of those choices contributes or show that the regularizer would behave the same way when the number of images per class is small. The CUB-2011 regularization results apply most directly to the setting in which their ablations were conducted.

The paper’s stated percentage gains identify particular comparisons on R@1. Those gains are insufficient to recover absolute scores or a numerical account of how rankings change at other recall cutoffs. The clustering measure is specified, but the retrieval gains alone cannot establish the size of any clustering gain. Keeping the metric, dimension, dataset, and baseline attached to each reported number preserves the scope of the comparison.

Finally, the distinct-center measurements have limited implications for efficiency and interpretation. The method eliminates an explicit selection procedure and spends computation on an expanded output layer instead. The paper supplies no end-to-end timing or memory comparison that would quantify the net effect in these settings. It also gives no test that assigns semantic meanings to the trained centers. Pose motivates the possibility of local groups, while the loss itself learns numerical directions from image labels. A reduction in redundant directions is observable without establishing what each retained center represents.

What came after

Topic-Guided Sampling cites SoftTriple in 2023 in a study of data-efficient stance detection across domains. The later work’s stated subject is using topic information to guide sampling for that task. SoftTriple addresses a different sampling decision, the formation of training comparisons among images whose vectors are being learned. The citation establishes that SoftTriple was relevant to the later discussion. It leaves the technical role unspecified, so it provides no basis for attributing a multiple-center loss, a center regularizer, or a measured effect in stance detection to the earlier method.

Cite

Cite as Qi Qian, Lei Shang, Baigui Sun, Juhua Hu, Tacoma Tacoma, Hao Li and Rong Jin. 2019. SoftTriple Loss: Deep Metric Learning Without Triplet Sampling. IEEE/CVF International Conference on Computer Vision (ICCV).

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.1109/iccv.2019.00655 · arXiv 1909.05235

@inproceedings{qian2019softtriple,
  title = {{SoftTriple Loss: Deep Metric Learning Without Triplet Sampling}},
  author = {Qi Qian, Lei Shang, Baigui Sun, Juhua Hu, Tacoma Tacoma, Hao Li and Rong Jin},
  booktitle = {IEEE/CVF International Conference on Computer Vision (ICCV)},
  year = {2019},
  doi = {10.1109/iccv.2019.00655},
  eprint = {1909.05235},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.1109/iccv.2019.00655}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/qian-2019-softtriple-loss-deep-metric-learning/

References

32 references, from the paper's own bibliography.

  1. Stephen Boyd and Lieven Vandenberghe. Convex optimization. Cambridge university press, 2004. OpenAlex ↗ · Scholar ↗
  2. Jiankang Deng, Jia Guo, and Stefanos Zafeiriou. Arcface: Additive angular margin loss for deep face recognition. CoRR, abs/1801.07698, 2018. OpenAlex ↗ · Scholar ↗
  3. Weifeng Ge, Weilin Huang, Dengke Dong, and Matthew R. Scott. Deep metric learning with hierarchical triplet loss. In ECCV, pages 272–288, 2018. OpenAlex ↗ · Scholar ↗
  4. Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, pages 770–778, 2016. our card
  5. Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In ICML, pages 448–456, 2015. OpenAlex ↗ · Scholar ↗
  6. Jonathan Krause, Michael Stark, Jia Deng, and Li Fei-Fei. 3d object representations for fine-grained categorization. In 4th International IEEE Workshop on 3D Representation and Recognition (3dRR-13), Sydney, Australia, 2013. OpenAlex ↗ · Scholar ↗
  7. Alex Krizhevsky, Ilya Sutskever, and Geoffrey E. Hinton. Imagenet classification with deep convolutional neural networks. In NIPS, pages 1106–1114, 2012. our card
  8. Daryl Lim, Gert R. G. Lanckriet, and Brian McFee. Robust structural metric learning. In ICML, pages 615–623, 2013. OpenAlex ↗ · Scholar ↗
  9. Weiyang Liu, Yandong Wen, Zhiding Yu, Ming Li, Bhiksha Raj, and Le Song. Sphereface: Deep hypersphere embedding for face recognition. In CVPR, pages 6738–6746, 2017. OpenAlex ↗ · Scholar ↗
  10. Weiyang Liu, Yandong Wen, Zhiding Yu, and Meng Yang. Large-margin softmax loss for convolutional neural networks. In ICML, pages 507–516, 2016. OpenAlex ↗ · Scholar ↗
  11. Prasanta Chandra Mahalanobis. On the generalized distance in statistics. National Institute of Science of India, 1936. OpenAlex ↗ · Scholar ↗
  12. R. Manmatha, Chao-Yuan Wu, Alexander J. Smola, and Philipp Krähenbühl. Sampling matters in deep embedding learning. In ICCV, pages 2859–2867, 2017. OpenAlex ↗ · Scholar ↗
  13. Christopher Manning, Prabhakar Raghavan, and Hinrich Schütze. Introduction to information retrieval. Natural Language Engineering, 16(1):100–103, 2010. OpenAlex ↗ · Scholar ↗
  14. Yair Movshovitz-Attias, Alexander Toshev, Thomas K. Leung, Sergey Ioffe, and Saurabh Singh. No fuss distance metric learning using proxies. In ICCV, pages 360–368, 2017. OpenAlex ↗ · Scholar ↗
  15. Omkar M. Parkhi, Andrea Vedaldi, and Andrew Zisserman. Deep face recognition. In BMVC, pages 41.1–41.12, 2015. OpenAlex ↗ · Scholar ↗
  16. Qi Qian, Rong Jin, Jinfeng Yi, Lijun Zhang, and Shenghuo Zhu. Efficient distance metric learning by adaptive sampling and mini-batch stochastic gradient descent (SGD). Machine Learning, 99(3):353–372, 2015. OpenAlex ↗ · Scholar ↗
  17. Qi Qian, Rong Jin, Shenghuo Zhu, and Yuanqing Lin. Fine-grained visual categorization via multi-stage metric learning. In CVPR, pages 3716–3724, 2015. OpenAlex ↗ · Scholar ↗
  18. Qi Qian, Jiasheng Tang, Hao Li, Shenghuo Zhu, and Rong Jin. Large-scale distance metric learning with uncertainty. In CVPR, pages 8542–8550, 2018. OpenAlex ↗ · Scholar ↗
  19. Oren Rippel, Manohar Paluri, Piotr Dollár, and Lubomir D. Bourdev. Metric learning with adaptive density discrimination. ICLR, 2016. OpenAlex ↗ · Scholar ↗
  20. Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, Alexander C. Berg, and Li Fei-Fei. ImageNet Large Scale Visual Recognition Challenge. International Journal of Computer Vision (IJCV), 115(3):211–252, 2015. our card
  21. Florian Schroff, Dmitry Kalenichenko, and James Philbin. Facenet: A unified embedding for face recognition and clustering. In CVPR, pages 815–823, 2015. our card
  22. Kihyuk Sohn. Improved deep metric learning with multi-class n-pair loss objective. In NIPS, pages 1849–1857, 2016. OpenAlex ↗ · Scholar ↗
  23. Hyun Oh Song, Stefanie Jegelka, Vivek Rathod, and Kevin Murphy. Deep metric learning via facility location. In CVPR, pages 2206–2214, 2017. OpenAlex ↗ · Scholar ↗
  24. Hyun Oh Song, Yu Xiang, Stefanie Jegelka, and Silvio Savarese. Deep metric learning via lifted structured feature embedding. In CVPR, pages 4004–4012, 2016. OpenAlex ↗ · Scholar ↗
  25. Christian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott E. Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, and Andrew Rabinovich. Going deeper with convolutions. In CVPR, pages 1–9, 2015. OpenAlex ↗ · Scholar ↗
  26. C. Wah, S. Branson, P. Welinder, P. Perona, and S. Belongie. The Caltech-UCSD Birds-200-2011 Dataset. Technical report, 2011. OpenAlex ↗ · Scholar ↗
  27. Feng Wang, Jian Cheng, Weiyang Liu, and Haijun Liu. Additive margin softmax for face verification. IEEE Signal Process. Lett., 25(7):926–930, 2018. OpenAlex ↗ · Scholar ↗
  28. Hao Wang, Yitong Wang, Zheng Zhou, Xing Ji, Dihong Gong, Jingchao Zhou, Zhifeng Li, and Wei Liu. Cosface: Large margin cosine loss for deep face recognition. In CVPR, pages 5265–5274, 2018. OpenAlex ↗ · Scholar ↗
  29. Kilian Q. Weinberger and Lawrence K. Saul. Distance metric learning for large margin nearest neighbor classification. Journal of Machine Learning Research, 10:207–244, 2009. OpenAlex ↗ · Scholar ↗
  30. Yandong Wen, Kaipeng Zhang, Zhifeng Li, and Yu Qiao. A discriminative feature learning approach for deep face recognition. In ECCV, pages 499–515, 2016. OpenAlex ↗ · Scholar ↗
  31. Eric P. Xing, Andrew Y. Ng, Michael I. Jordan, and Stuart J. Russell. Distance metric learning with application to clustering with side-information. In NIPS, pages 505–512, 2002. OpenAlex ↗ · Scholar ↗
  32. Yuhui Yuan, Kuiyuan Yang, and Chao Zhang. Hard-aware deeply cascaded embedding. In ICCV, pages 814–823, 2017. OpenAlex ↗ · Scholar ↗