---
title: "PN-Net — paper by Balntas et al. (2016) — summary and ideas"
description: "PN-Net learns compact image patch descriptors by comparing matching patches with the closest nonmatch in each training triplet."
canonical: "https://research.elamur.ai/free/en/papers/balntas-2016-pn-net-conjoined-triple-deep/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/) · [Constitution](https://md.constitution.elamur.ai/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/balntas-2016-pn-net-conjoined-triple-deep/)

[Elamur Research](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2016](https://md.research.elamur.ai/free/en/papers/2016/) / PN-Net: Conjoined Triple Deep Network for Learning Local Image Descriptors

# PN-Net: Conjoined Triple Deep Network for Learning Local Image Descriptors

Paper · 2016 · Vassileios Balntas, Edward Johns, Lilian Tang et al.

**Authors:** [Vassileios Balntas](https://md.research.elamur.ai/free/en/authors/vassileios-balntas/), [Edward Johns](https://md.research.elamur.ai/free/en/authors/edward-johns/), [Lilian Tang](https://md.research.elamur.ai/free/en/authors/lilian-tang/) and [Krystian Mikolajczyk](https://md.research.elamur.ai/free/en/authors/krystian-mikolajczyk/) · **Year:** 2016 · **Venue:** arXiv:1601.05030 · **Licence:** [arXiv — non-exclusive license to distribute](http://arxiv.org/licenses/nonexclusive-distrib/1.0/)

[licence](http://arxiv.org/licenses/nonexclusive-distrib/1.0/)

- [PDF](https://arxiv.org/pdf/1601.05030)
- [arXiv 1601.05030](https://arxiv.org/abs/1601.05030)

## Summary

Finding the same point in different photographs starts with a small comparison. A patch around the point in one image has to be recognized in another, even when the camera angle, lighting, or sharpness has changed. A local descriptor makes that comparison easier by turning the pixels in a patch into a short vector. PN-Net learns these vectors from examples, with the aim of making ordinary Euclidean distance sufficient to tell corresponding patches from unrelated ones. The authors want the descriptor to be accurate enough to compete with other learned approaches and fast enough to use when an image supplies many patches.

PN-Net learns from triplets. Two patches show the same physical point in different views, and the third comes from a different point. The same convolutional network encodes each patch. The training objective, called SoftPN, compares the distance between the corresponding patches with both distances to the third patch. The closer of those two nonmatching pairs sets the standard the corresponding pair has to beat. The search for a difficult negative thus happens within each randomly assembled triplet. Once training is over, a single network branch produces the descriptor for any input patch, and matching requires only distances between stored vectors.

On Photo Tour, where the task is to distinguish labeled patch pairs, the 128-component PN-Net reports a mean false positive rate of 7.26% across the training and test combinations at a true positive rate of 95%. The 256-component version reports 6.98%, compared with 7.75% for the MatchNet configuration without a bottleneck and 26.55% for SIFT. On the expanded Oxford sequences, networks trained on Photo Tour’s Liberty subset had to find nearest neighbors in patches produced by a different detector. The authors report that PN-Net 256 leads MatchNet by 2% in mean average precision averaged across the sequences. The advantage varies with the viewing change. PN-Net fares particularly well on the affine deformation and blur examples, while MatchNet has the stronger results on the scale-change sequences the paper identifies.

Training and extraction are part of the result. An epoch using roughly 1.2M triplets takes about 2 minutes on an NVIDIA Titan X GPU. After that first epoch, training on Liberty and testing on Notredame gives a 9% false positive rate at the benchmark’s fixed true positive rate. The authors also report that GPU extraction approaches the speed of CPU BRIEF while retaining the dimensionality of SIFT in PN-Net’s compact version. The experiments connect these gains to a small network and a more informative training comparison. The ablation closest to isolating the loss compares two triplet objectives on the same patch data and finds lower error when the objective selects the nearer nonmatch.

## Deep dive: PN-Net: Conjoined Triple Deep Network for Learning Local Image Descriptors

PN-Net learns compact image patch descriptors by comparing matching patches with the closest nonmatch in each training triplet. · about 32 minutes to read

**In this deep dive**

1. [The problem and its context](#dd-the-problem-and-its-context)
2. [The method, step by step](#dd-the-method-step-by-step)
3. [Experiments and results](#dd-experiments-and-results)
4. [What the ablations show](#dd-what-the-ablations-show)
5. [Limitations](#dd-limitations)
6. [What came after](#dd-what-came-after)

### The problem and its context

#### What a patch descriptor has to preserve

A photograph supplies many local areas that might be recognizable in another image. A detector identifies candidate regions, and a descriptor represents the appearance of each region in a form that can be compared. These operations solve different parts of the correspondence problem. The detector determines which places enter the search and how the surrounding regions are extracted. The descriptor determines how strongly a patch from one view resembles each candidate from another. PN-Net addresses the descriptor stage. Its training examples and both of its benchmarks start with patches extracted around feature points.

Two patches can show the same place while differing in the arrangement or intensity of their pixels. A change in viewpoint can deform the region, an image can be blurred, and the detector can estimate a location or orientation differently across views. Conversely, patches from distinct points can look alike. The descriptor has to preserve enough visual detail to distinguish those points while giving consistent representations to views of the same point. A representation that preserves every observed difference can rank a genuine match too far away. One that suppresses too many differences can rank an unrelated patch close enough to be selected.

There are two ways to ask whether such a representation works. One supplies a pair and asks how confidently it can be labeled as corresponding or unrelated. The other starts with a patch and asks which candidate in another image is closest. Pair verification tests whether the comparison scores separate two populations. Nearest-neighbor matching tests whether a genuine match can prevail over the other candidates available for a particular query. The authors design for the second use as well as evaluating the first. That is why they make the output of the patch encoder directly comparable with a standard distance.

The intended use puts practical demands on training and on the descriptor itself. Every candidate region requires a pass through the extractor. Each extracted vector has to be stored or passed to a search procedure. The cost of producing a descriptor and the size of its output therefore matter alongside matching quality. Training is a separate cost. It determines how much work is required to produce an extractor and how readily a researcher can compare configurations. The authors motivate PN-Net by pointing to earlier learned descriptors that required substantial training, used wide outputs, or took enough time at extraction to weaken their practical advantage.

#### From designed measurements to learned descriptors

The paper places PN-Net after a series of attempts to decide which local image measurements are worth keeping. Earlier descriptors used quantities such as image gradients, differential or moment invariants, correlations, and projections of pixel patches. SIFT, which represents the distribution of local gradients, had performed strongly in the evaluation work the authors cite. It remained a reference point for assessing matching quality. Later work such as DSP-SIFT sought to improve descriptors in that family, while BRIEF represented a push toward small, quickly computed binary descriptions.

Labeled correspondences made another approach possible. Researchers could use examples of the same point and of different points to adjust parameters, learn a projection, or learn how to score a pair. The training examples supplied a way to test whether a particular choice of representation preserved the differences that mattered. Convolutional networks extended that approach by learning the representation from the patches themselves. The authors cite an earlier descriptor study in which features drawn from a network trained for image recognition could outperform SIFT. The recognition training drew on [ImageNet](https://md.research.elamur.ai/free/en/papers/russakovsky-2014-imagenet-large-scale-visual-recognition/).

A more directly supervised design used a siamese network. The name refers to two copies of the same encoder operating on different inputs with shared parameters. A labeled pair goes through the two branches, and a loss determines how to adjust the parameters from the resulting comparison. Some previous systems also learned a comparison function that took the features from both patches. Such a function can be trained to distinguish matching pairs from unrelated pairs. For nearest-neighbor search over an existing collection of vectors, PN-Net’s authors prefer to make Euclidean distance between descriptors the comparison rule itself.

The difference becomes concrete when a query patch must be compared with many stored patches. A patch representation can be computed before the query arrives and indexed using standard techniques that work with Euclidean distance. A learned pair scorer supplies a decision for two inputs brought together, and its output may have different properties from a distance suitable for a search index. The paper identifies k-d trees and approximate nearest-neighbor search as examples of techniques available once the representation supports a conventional distance. These are reasons for the design choice. The experiments principally assess the descriptors and their matches.

#### Which nonmatches are worth learning from?

A pair-based training set can contain a great many easy examples. If a nonmatching pair already lies far apart in descriptor space, a hinge loss can assign it no penalty. The example can still take a forward pass to process even though it supplies no gradient to alter the parameters. The paper describes prior work that addressed this problem by finding the closest nonmatching pairs and presenting a selected subset again for gradient updates. These pairs are called hard negatives because the current descriptor makes them harder to distinguish from genuine matches.

The authors relate this approach to work on distance metric learning that emphasizes neighboring examples and to methods that retrain on mistakes. They also point to an earlier patch-based object detector that combined positive and negative constraints. The shared premise is that the usefulness of a training example depends partly on its relations to other examples. For a local descriptor, it is especially informative to know whether an unrelated patch lies close to a genuine pair under the current encoding. That comparison gives a way to direct an update without searching through a larger pool for a separate round of training examples.

The idea of using three inputs was already present in work on ranking, classification, and pose descriptors. The local correspondence problem gives the groups a different meaning from categories such as object classes. Here the shared identity is a particular physical point, and a corpus can contain many such identities. A patch from another point is a negative even when it contains a visually similar pattern. PN-Net’s specific training choice is to let that other patch compete against either member of the genuine pair and judge the triplet by the closer competition.

#### Why the benchmark is part of the problem

The paper describes difficulties with both main sources of evaluation data. Photo Tour gives labeled patch correspondences and a defined scoring procedure. Its convenience comes with a narrower question about generalization, because training and test subsets belong to the same benchmark. The authors also observe that reported error on those data had already fallen substantially. A small remaining margin on a familiar test can make it difficult to see how well a descriptor responds to a different source of patch variation.

The original Oxford sequences offer a different kind of evidence. They organize photographs into sequences with changes in viewing conditions, which makes it possible to examine where a descriptor works and where it loses matches. The older evaluation was also used with differing choices about detection and scoring. Results reported under those choices could be difficult to compare. The paper’s response is to expand the image collection and define a patch-based evaluation with shared regions and correspondence labels. This retains the structure of the image sequences while bringing the inputs for descriptor comparisons closer to a common protocol.

### The method, step by step

#### What the triplet tells the network

Training starts with a known correspondence. The authors draw a pair of patches from different views of the same point in three-dimensional space. From a different point they draw another patch. The label of the genuine pair comes from the point identity. The negative label likewise comes from the fact that the third patch belongs to a different point. What remains unknown at the start of the computation is how close the current descriptor will place those patches.

Each patch goes through an identical branch of the convolutional network. The branches share weights, so an input receives the same treatment wherever it appears in the triplet. The network produces a vector from each patch. The loss can then see how far apart the corresponding vectors are and how far each one is from the vector of the unrelated patch. The triplet thereby relates the distances produced in a single forward computation.

Suppose the unrelated patch looks more like one of the matching views than it looks like the other. An objective that checked it against just one fixed view could base the update on the easier comparison. SoftPN examines both and uses the tougher one. The genuine pair has to be closer than the unrelated patch is to either of its members. Either genuine view can expose the problematic nonmatch, and swapping those views leaves the distance comparison unchanged. That symmetry fits a setting where both views are evidence for the same correspondence.

The closest negative is defined by the network’s current output. A negative patch selected at random need not be intrinsically difficult, and a triplet can contain two readily separable negatives. Selection within the loss makes the comparison adaptive in a narrower sense. Each forward pass determines which negative pair deserves attention among the candidates already present. The authors call this soft negative mining. The choice between those candidates uses a minimum, while the penalty applied to the result uses a smooth ratio of exponentials.

Training a PN-Net descriptor with SoftPN The steps in order.

At extraction time, the task begins and ends with a single patch and its vector. The triplet gives the training objective a convenient arrangement of labeled relationships. It does not supply extra content needed to describe an individual patch after training. A query and a candidate can therefore be encoded independently, and a candidate’s stored descriptor is usable for many queries.

#### The descriptor and its distance

The paper writes the input and output spaces as follows.

```
p ∈ ℝᴺˣᴺ,  D(p) ∈ ℝᴰ
```

Here `p` is a patch, and `∈` means that the patch or vector belongs to the space that follows it. The first `ℝ` with superscript `ᴺˣᴺ` denotes real-valued arrays with `N` entries along each of the two spatial dimensions. The second `ℝ`, with superscript `ᴰ`, denotes the space of real vectors with `D` components. `D(p)` is the vector returned by the descriptor mapping for input `p`. The paper uses `D` both in the name of the mapping and, as the superscript, for the output dimension. In the experiments the images supplied to the encoder are 32 × 32 patches, and the output dimensions considered for PN-Net are 128 and 256.

The comparison rule is Euclidean distance.

```
Δ(a, b) = ‖D(a) − D(b)‖₂
```

`a` and `b` stand for any two input patches. `D(a)` and `D(b)` are their output vectors. The minus sign subtracts corresponding entries, and `‖·‖₂` is the Euclidean, or L2, norm of the result. `Δ(a, b)` is the resulting scalar separation. The distance is small when the vectors lie close together, and it is the same whichever patch is written first.

This separation is used both in training and in the nearest-neighbor test. In training, it supplies the inputs to the loss that adjusts the encoder. At test time, it ranks candidates directly. The purpose of learning is to arrange the vectors so that a meaningful visual relation is reflected in this simple rule. There is no additional learned layer that takes a descriptor pair and converts it into a separate similarity score.

The output dimension matters in both roles. It determines how many values a patch contributes to the storage and comparison workload. During training it also determines the space in which the network has to accommodate nearby genuine matches and separable nonmatches. The paper tests two output widths with the same general architecture. The results answer an empirical question about whether a wider vector improves matching enough to see on the benchmark. Dimensionality alone gives no such answer.

#### The pairwise hinge comparison

The paper introduces SoftPN alongside the hinge embedding loss used for paired examples. In the hinge setup, a training item contains a left and a right patch and a label for their relationship. The loss depends on the label as follows.

```
ℓ(P) = Δ(p_L, p_R)                     if L = 1
       max(0, μ − Δ(p_L, p_R))         if L = −1
```

`ℓ(P)` is the loss on the patch pair `P`. The two patches are `p_L` and `p_R`, where the subscripts identify the left and right inputs. `L` is the relationship label. The value `1` marks a genuine match and `−1` marks a nonmatch. `Δ` is the Euclidean descriptor distance. `μ` is the margin for negatives, `max` chooses the larger of its arguments, and `0` is the loss floor for a negative outside the margin. In the second line the subtraction measures how much distance is missing before the nonmatch reaches the margin.

A genuine pair contributes its distance directly. Bringing the two vectors closer reduces this part of the training objective. For a nonmatch inside the margin, moving the vectors apart reduces the loss until the margin is reached. Beyond that point the negative contributes zero. This makes the margin a fixed definition of adequate separation for the negative pair, independent of the distance observed for any genuine match.

The formula explains why the distribution of pairs matters. If training is supplied with largely well-separated nonmatches, many of their losses are already flat. Searching for unusually close negatives can keep the network learning from informative cases. The earlier hard-mining procedure discussed by the authors ranks negatives by their current descriptor distances and sends a chosen subset through the network again for updates. PN-Net keeps the idea of prioritizing a close nonmatch and changes where the choice is made.

#### The SoftPN objective

Let `T` be a training triplet containing `p₁`, `p₂`, and `n`. The subscripts distinguish the two matching views `p₁` and `p₂`, which share a point identity. The patch `n` comes from a different point. The genuine match has distance `Δ(p₁, p₂)`. Comparing `n` with each of those views gives a pair of negative distances, and the loss selects their minimum.

```
Δ* = min(Δ(p₁, n), Δ(p₂, n))
```

`Δ*` is the distance for the selected nonmatching pair, and the star identifies this selected value. `min` returns the smaller of the arguments. `Δ(p₁, n)` measures the distance from the first genuine view to the unrelated patch, and `Δ(p₂, n)` measures the distance from the second view to that same patch. A poorly separated nonmatch can therefore affect the loss whichever view produces it.

With that choice made, the paper’s SoftPN loss can be written in terms of `Δ*` and the genuine-pair distance.

```
ℓ(T) = [e^(Δ(p₁, p₂)) / (e^(Δ*) + e^(Δ(p₁, p₂)))]²
     + [e^(Δ*) / (e^(Δ*) + e^(Δ(p₁, p₂))) − 1]²
```

`ℓ(T)` is the loss for triplet `T`. The symbol `e` is the base of the natural exponential. The caret and following parentheses indicate what goes in the exponent. Both terms share a denominator, the sum of the exponentials of the selected negative distance `Δ*` and the positive distance `Δ(p₁, p₂)`. The slashes divide each numerator by that shared sum. The first fraction is the positive distance’s share of the total exponential weight. The second fraction is the negative distance’s share, and the `− 1` measures its deviation from a target share of `1`. The superscript `²` squares each bracketed quantity, and the plus sign adds the two penalties.

When the negative distance is larger, its exponential takes more of the shared total. That makes the positive share smaller and the negative share closer to its target. Both terms then favor the same ordering. The two fractions are complementary, so a change that improves one share improves the other term as well. The loss treats a nonmatch that sits closer than the corresponding pair as an especially important error in the arrangement of the descriptors.

This is a relative comparison. The authors describe the ideal geometry as moving the true match towards `0` and sending the nonmatching distances toward `+∞`, where the latter symbol means increasing without bound. The formula itself puts pressure on the gap between the two distances used in the ratio. If both distances change by the same amount, their exponentials receive the same common factor, which cancels from the fractions. The loss therefore specifies how to order and separate the distances in the triplet. It does not assign an absolute target distance to each pair independently.

The distinction from the hinge loss is visible when the negative already lies farther away than the positive. SoftPN continues to favor increasing that separation, with a diminishing penalty as the ratio becomes more favorable. It has no fixed negative margin beyond which the selected pair suddenly stops contributing. The other negative distance enters by competing for selection. When the two are unequal, the value of the loss follows the smaller one locally. If their ordering changes as the encoder is updated, the other pair becomes the active comparison. The paper’s use of both negative distances refers to this choice, rather than to separate penalty terms that push both simultaneously in every triplet.

The earlier SoftMax Ratio objective is the closest comparison in the paper. It already uses a triplet and relates distances through ratios. What SoftPN adds is the evaluation of the closer of the two nonmatching pairs. The paper uses this distinction experimentally. The pairwise hinge comparison tests a larger change in how training examples and loss terms are organized, while the SoftMax Ratio comparison asks what happens when training already uses triplets and the closest-negative rule is added.

#### The encoder and training procedure

A branch begins with a spatial convolution using a 7 by 7 window and producing 32 output planes. An output plane is a map of responses to one learned filter across spatial positions. Convolution applies the same filter at successive positions within the patch, letting the network detect the same local pattern at multiple locations. The convolution is followed by a hyperbolic tangent, or tanh, which turns the filter’s response into a bounded nonlinear value. Max pooling over a 2 by 2 window then keeps the strongest response in each pooling region.

The next spatial convolution uses a 6 by 6 window and produces 64 output planes, again followed by tanh. The final linear layer combines the resulting responses into a vector. Its width is either 128 or 256, and the architecture applies tanh to the output. The paper’s description of a two-layer convolutional network refers to the two convolutional stages. The activations, pooling, and output mapping still have defined places in the computation. Sharing this entire branch across the training inputs ensures that the same filters and output coordinates describe every patch.

The triplets are generated during training from the available Photo Tour patches. The sampling rule is random within the correspondence constraints. The authors pick a genuine pair from one point and complete it with a patch drawn from another point. The procedure leaves the search for the nearest of the two resulting nonmatches to the loss. The authors report roughly 1.2M training triplets for an epoch. They leave the training patches unaugmented, so synthetic transformations do not supply additional training views. This keeps the procedure smaller and allows the authors to examine the training objective without adding that source of variation.

The implementation uses Torch and stochastic gradient descent. In this optimization procedure, the training examples are processed in batches and the gradient from the current batch guides an update to the shared weights. The paper uses batches of 128 items and a learning rate of 0.1, which sets the scale of the update. Momentum of 0.9 carries part of the previous update direction into the next one. Weight decay of 10⁻⁶ applies pressure against large weights. The convolution routines come from NVIDIA’s [cuDNN](https://md.research.elamur.ai/free/en/papers/chetlur-2014-cudnn-efficient-primitives-deep-learning/).

The same base encoder is used for the paper’s comparisons of pair and triplet objectives. A difference between their results can therefore be examined without attributing it to a wider or deeper convolutional branch. For the method itself, this also means that the benefit of training with multiple related inputs carries through to a compact descriptor at extraction. The branch has learned from the relations in the triplet, and the stored vector is the part that remains available at test time.

### Experiments and results

#### Photo Tour measures pair verification

The Photo Tour dataset consists of the Liberty, Yosemite, and Notredame subsets. It contains more than 500k labeled patch pairs extracted around feature points. The authors use the 100K evaluation pairs specified for the benchmark. They train on one subset and test on another, report results for the possible train and test combinations, and give a mean across those combinations. Training and testing on different subsets gives the detector and descriptor procedure new scenes within the same benchmark.

The verification test assigns each pair a score and varies the decision threshold. With PN-Net, bringing the threshold closer forces two vectors to be more similar before their patches are accepted as a match. More restrictive thresholds reject some erroneous matches and can also reject genuine ones. Sweeping the threshold yields a receiver operating characteristic, or ROC curve, which tracks the true positive rate and false positive rate together. The true positive rate describes the fraction of genuine pairs accepted. The false positive rate describes the fraction of unrelated pairs accepted.

The paper selects the operating point with a 95% true positive rate and reports the false positive rate there. A better result therefore accepts fewer unrelated pairs while retaining the specified share of genuine ones. Calling the result an error at 95% is shorthand for this operating point. It is a false acceptance rate at fixed match recall, so its numerical value has a more specific meaning than an overall error rate across all labeled pairs.

The comparison covers handcrafted and learned descriptors. SIFT supplies the longstanding gradient-based reference, while ConvexOpt represents learning a descriptor through convex optimization. DeepCompare appears in siamese and pseudo-siamese configurations. The paper also reports MatchNet with its bottleneck and with the bottleneck removed. The benchmark comparison focuses on single-scale configurations. The authors explain that multiscale variants can introduce an additional crop around a patch center, giving the comparison information from another spatial extent.

Descriptor comparison on Photo Tour by mean false positive rate at 95% true positive rate The wider PN-Net has the lowest mean error, with the compact PN-Net next.

**The numbers**

| System or setting | false positive rate % |
| --- | --- |
| SIFT | 26.55 |
| ConvexOpt | 10.28 |
| DeepCompare siamese | 10.07 |
| DeepCompare pseudo-siamese | 9.62 |
| MatchNet | 9.82 |
| MatchNet without bottleneck | 7.75 |
| PN-Net 128 | 7.26 |
| PN-Net 256 (this paper) | 6.98 |

The two PN-Net widths occupy the leading positions on the mean verification measure. The paper reports an exception to its advantage over the other descriptors when training on Notredame and testing on Liberty. This matters when reading the mean. The training source and the test subset can change which setting performs best, even though the overall comparison favors PN-Net. The average is a concise way to summarize repeated transfers within Photo Tour.

The output sizes give the error figures practical context. The compact PN-Net uses 128 components, the same dimensionality as SIFT in the paper’s comparison. The DeepCompare configurations listed for this test use 256 components each. MatchNet’s bottleneck configuration uses 512, and removing the bottleneck gives the 4096-component entry. That change is associated with a lower mean error for MatchNet in the table. PN-Net places both of its tested widths ahead of that wider setting on the reported mean, with the smaller PN-Net remaining close to its wider counterpart.

The training curves give another view of the result. With Liberty as the training source and Notredame as the test set, the authors report a false positive rate of 9% at the prescribed true positive rate after the first epoch of SoftPN training. The early point and the averages in the chart answer different questions. The early point shows how quickly a useful representation emerges on one ordered train and test combination. The chart summarizes the final comparisons over combinations. The paper describes the early performance as similar to or better than that of DeepCompare after its reported 2 days of training.

#### Oxford changes both the data and the matching task

The Oxford experiment uses images related by changes in viewing conditions. The authors retain the original eight sequences and add seven with changes that include illumination, rotation, and scale. They use naturally captured images, preserving the imaging noise that comes with the changed conditions. The protocol makes that variation relevant at the patch level. The six images in each sequence show progressively greater changes in viewing conditions, with 1,000 patches associated with every image. The expanded collection has 15 sequences.

The authors use Harris-Affine to identify regions in Oxford. Photo Tour instead supplies patches built around keypoints from a scale-invariant difference-of-Gaussians detector. The detectors can produce different kinds of positional and geometric error. In Oxford the affine regions also have to be normalized to patches. The paper’s match examples show how an estimated rotation and the resampling of an elliptical region can affect the appearance of an input, alongside the change introduced by the camera. In that sense Oxford changes the way the test patches are formed as well as changing the images.

The geometric labels come from homographies between images. A homography supplies a mapping of image coordinates, which lets the protocol compare the region detected in one image with the mapped region from the other. The paper treats the two as corresponding when their region overlap error is less than 50%. An image pair comes with correspondence information based on patch overlap. A query region can have several acceptable counterpart regions in the other image. This matters because success does not require recovering one predetermined index if several detections meet the geometric condition.

Fixing the patches ahead of time addresses a problem in comparisons on the older benchmark. If each descriptor is evaluated with a different interest point detector or a different collection of input regions, the result can reflect which regions were offered as much as how they were described. In the revised procedure the descriptors receive the shared collection. Patch extraction still shapes the task. Its effects enter through a common input rather than being a choice that can vary from one descriptor to another in the evaluation.

For the nearest-neighbor test, each patch in the left image is compared with patches in the right image, and the closest candidate is returned. The overlap labels say whether that returned candidate is a true match or a false positive. The resulting precision–recall curves describe how the set of accepted matches balances correctness against coverage. Precision concerns the share of returned matches that are correct. Recall concerns how much of the reference correspondence set is recovered under the protocol. The paper uses the area under the precision–recall curve for its average-precision summary and reports mean average precision, abbreviated mAP, for comparing methods and sequences.

The benchmark is harder to read as a direct extension of the Photo Tour chart because the decisions differ. In Photo Tour, the scorer is given the candidate pair. In Oxford, each candidate competes against the others in the right image before the overlap label is applied. A descriptor can distinguish many supplied positive and negative pairs and still lose a true nearest-neighbor match to a particularly similar distractor. The Oxford test examines that competition under changes in acquisition and region detection.

#### What transfers from Liberty

For Oxford, the authors train all the compared convolutional networks using Photo Tour’s Liberty data. Good performance then requires the representation learned on those patches to remain useful on the Oxford patches. The paper shows precision–recall curves for graffiti, with affine deformation, and trees, with blur and loss of focus. PN-Net leads MatchNet and DeepCompare on the reported curves for both sequences, with a more pronounced advantage on trees. MatchNet and PN-Net are relatively close in area under the curve. DeepCompare’s result on the blurred images is weaker.

Across the Oxford sequences the authors report an advantage of 2% in average mAP for PN-Net 256 over MatchNet. In this discussion the paper describes the intermediate MatchNet vector as having 4095 components. The comparison uses Euclidean distance on that vector, taken before MatchNet’s final metric layer. The authors explain that the final layer is trained to make a classification decision and did not give useful distances for this nearest-neighbor setup. Accordingly, the Oxford result compares the descriptors in the form needed for the search, including that change in how MatchNet is used.

The average leaves a meaningful pattern across sequences. The paper identifies graffiti and trees as settings where PN-Net’s advantage is particularly clear. Its comparison with MatchNet goes the other way on the scale-change sequences asterix, bark, croll, and boat. The additional sequences span a range of difficulty, falling between the original graffiti and ubc sequences that the paper uses as difficult and easier reference points. The enlarged benchmark offers more than another pooled score. It shows which changes produce the advantage and which expose a weakness.

The visual examples indicate what can lie behind both outcomes. Some correct nearest neighbors survive obvious affine deformation or scale changes. Some patches also have orientation errors or visible resampling effects from the detector’s region normalization. The examples of incorrect matches include patches with similar appearances. Such an error is consistent with a distance that responds to the visible patch pattern even when that pattern occurs at different places. These selected images illustrate possibilities within the benchmark. The curves and averages carry the evidence about how often the matching procedure succeeds.

#### Training time and extraction time

The authors time descriptor extraction on an NVIDIA GTX TITAN X GPU for the deep networks in their efficiency comparison. The measured operation is the production of a descriptor from an input patch. They compare extraction time with output dimensionality and find that PN-Net occupies a faster and smaller setting than the other learned descriptors they examine. The speed argument is tied to the use of a shallow shared encoder whose output can be used directly. The corresponding match does not require running a second learned computation over every pair.

The paper summarizes extraction as 40 times faster than SIFT and 3 times slower than BRIEF. Its close comparison with BRIEF concerns GPU PN-Net and CPU BRIEF. Hardware is therefore part of the reported timing. The authors also discuss published speedups of 5 to 20 for GPU ports of SIFT relative to CPU SIFT and argue that PN-Net still compares favorably when those speedups are considered. That part of the discussion draws on the earlier reports, while the extraction plot presents the timings from the paper’s comparison.

For training, an epoch with approximately 1.2M triplets takes about 2 minutes on an NVIDIA Titan X GPU. The paper reports reaching the competitive performance of its longer training runs in 100-200 epochs and gives 2-5 hours as its training-time range on a single GPU. The first-epoch verification result shows that much of the practically relevant accuracy can appear early on a particular split. The longer runs show where the method finishes when it is allowed more optimization. Together with the output widths, the timing results give separate measures of the costs of learning a descriptor, producing it, and retaining its vector for matching.

### What the ablations show

#### Holding the encoder and patches fixed

The main controlled comparison uses the same underlying convolutional branch to train a pairwise hinge system, a triplet system with SoftMax Ratio, and PN-Net with SoftPN. The patch pool is shared. The paper plots the false positive rate at the Photo Tour operating point across training epochs, so the comparison shows both the speed at which error falls and the level it reaches. Holding the encoder fixed helps exclude a simple explanation in which the improved system merely has more feature-extraction capacity.

Both triplet objectives give substantially better curves than the pairwise hinge setup in the comparison the authors report. The paper describes the final error for SoftPN as 15% lower than for the siamese hinge comparison. This combines a change in the training item with a change in the loss. A hinge update receives either a matching pair to pull together or a nonmatching pair subject to the margin. A triplet update receives a genuine comparison and a negative comparison together, so it uses their relative distances directly. The experiment supports that combined training change for this encoder and data.

Sharing the patch pool gives the comparison a particular meaning. The authors report three times more pair items than triplet items in the set they use. The pairwise system thus receives more items under their construction, while each triplet yields several related distance calculations. The result shows that a higher count of training items does not guarantee a better descriptor when those items organize the labels differently. It also helps explain the paper’s emphasis on faster learning with triplets. The number of items is different, and the branches and comparisons per item are different, so equal epochs are an empirical training comparison with those conditions in place.

The shapes of the learning curves add evidence that a final table alone would miss. SoftPN’s 9% result on Liberty to Notredame after the first epoch means that the effect appears early, under the same benchmark criterion used for the longer comparison. It is concrete evidence of rapid progress for this run. A claim about the relative cost of training must still account for the work in an epoch, which is why the authors give the wall-clock timing separately.

#### Isolating the closest-negative choice

The SoftMax Ratio comparison comes closer to isolating the distinctive mechanism in SoftPN. Both systems learn from triplets. Both judge a relationship between matching and nonmatching distances. The difference emphasized by the authors is the evaluation of the closest nonmatch within the triplet. In the paper’s learning curves, SoftPN has lower error. This supports the idea that it helps to compare the nonmatching patch with both matching views before deciding which separation the update should favor.

One way to see the point is to follow the decision the descriptor will eventually face. If an unrelated patch is close to either view under Euclidean distance, it can become an erroneous candidate when that view is used as a query. The training loss has access to both of those possibilities. By letting the smaller negative distance determine the loss, it concentrates the update on the failure the triplet already reveals. The comparison with SoftMax Ratio makes this explanation more specific than an appeal to triplets in general.

The controlled result applies to selection within the random triplets. A procedure that searches a larger group of patches for especially hard negatives could supply more difficult cases, but would also change the training procedure and its costs. The paper inherits its motivation from that approach and compares with alternatives it could run. It does not include a matched experiment pitting SoftPN against the earlier siamese method augmented with its hard-mining implementation.

#### Descriptor width and behavior by sequence

The 128- and 256-component versions provide a comparison of output width. Photo Tour gives the wider representation the lower mean false positive rate, while the smaller one remains close and keeps the same dimensionality as SIFT. For this encoder and benchmark, much of the performance survives the smaller output. The experiment is especially relevant to the paper’s motivation because the change affects the vector that must be stored for every patch. Its evidence concerns the two tested widths.

The Oxford sequence analysis reveals an interaction that the mean hides. PN-Net’s margin over MatchNet is clearer on affine change and blur. MatchNet leads on the scale-change cases named in the paper. The authors take this as evidence that exposure to scale variation during training could matter, and propose augmentation as a possible way to improve PN-Net. The experiment compares methods on the different sequences. It does not train and test PN-Net with and without scale augmentation to isolate that cause. The observed reversal is a way to locate the problem more precisely than an aggregate ranking could.

The filter visualizations provide a different kind of analysis. The authors display the learned weights in the first and second convolutional layers of PN-Net and DeepCompare. To them, PN-Net’s filters look smoother. They suggest that using the matching and nonmatching relationships together during training may have a regularizing effect. The images show a qualitative difference in the learned filters. They do not measure smoothness or isolate the loss from every difference between the displayed systems. The controlled learning curves provide the more direct evidence about SoftPN’s effect on matching errors.

### Limitations

#### Limits identified by the authors

The authors note that Oxford results depend on the evaluation protocol. Their expanded patch benchmark changes the data and gives descriptors a fixed set of patches and overlap-based correspondences. A result reported on the older sequence collection with different detection or scoring choices cannot be treated as a measurement on this version. The proposed protocol aims to make future comparisons more repeatable within its own conditions.

They also restrict the principal comparison to single-scale configurations and acknowledge the potential value of multiscale inputs. A centered crop can show the same point at another spatial extent, giving a descriptor evidence beyond what is available from the original patch alone. The paper sets that option aside to compare similar input arrangements. Oxford’s scale-change results make the choice consequential. The authors regard augmentation as a possible improvement for PN-Net, and its benefit remains unmeasured in the reported experiment.

Some baselines were unavailable in the form the authors needed. They say that DSP-SIFT code was unavailable at the time of the experiments. They would also have liked to evaluate the effect of the earlier siamese hard-negative mining procedure, whose implementation was unavailable to them. The reported comparisons therefore establish PN-Net’s standing among the configurations evaluated. They leave open how much of the advantage in the matched hinge comparison could also be obtained by changing the way a siamese system selects its training negatives.

The paper raises the possibility of overfitting on Photo Tour because training and testing come from similar distributions. Oxford is the authors’ response to part of that concern. They also present simpler architecture, smaller outputs, and good transfer as reasons to think PN-Net may be less prone to overfitting. That interpretation is appropriately tentative. The experiments show performance under a change of benchmark and detector, and the authors leave broader architectural and normalization variants outside the main investigation.

#### Limits of the evidence

Photo Tour’s reported error fixes recall at a particular operating point. Tabled improvements concern false accepts at 95% true positive rate. Whether the order stays the same at a different threshold is a question about the full ROC curves. Similarly, the Oxford mAP result averages over matching behavior and sequence conditions. The scale-change reversal demonstrates that an overall advantage can coexist with a weaker result on an important subset of the task.

The Oxford transfer is from Liberty training to one expanded benchmark, using the patches and labels supplied by that protocol. It shows that the learned vectors retain useful structure after a change in detector and image conditions. It leaves the size of the advantage under other forms of transfer unresolved. Nor does fixing the regions measure how a complete correspondence system would perform if it had to detect and normalize the regions on its own under different choices. The fixed regions deliberately put the emphasis on description and matching.

Labels in the Oxford test depend on the relationship between mapped detected regions. The overlap rule supplies a consistent criterion, but it joins geometric agreement to the behavior of the detector and region-normalization process. A visibly plausible match may fail that criterion, and more than one candidate can pass it. Precision and recall should therefore be read as measurements against those geometric labels. The false-positive examples help explain how the descriptor and that criterion sometimes disagree.

SoftPN’s mining has a deliberately local scope. A triplet can expose an unrelated patch that is close to one of its matching views, but the loss cannot select a harder patch that was never sampled. The method exchanges the breadth of a larger negative search for a cheap choice using distances already computed. Its results show that this restricted choice is effective in the reported training setup. They leave open what a different sampling policy or a larger negative pool would contribute, and at what computational cost.

The runtime figures are specific to the stated implementations and hardware. In particular, the comparison near BRIEF’s extraction time uses different processor types. The operation timed is patch description, so the figure alone gives no measure of total time for image acquisition, region detection, normalization, and a large candidate search. The paper demonstrates a fast component and uses it to motivate possible real-time applications. Whether an entire application meets a timing target depends on the other operations in that application.

### What came after

The authors made the PN-Net source code, the expanded Oxford image sequences, and their correspondence annotations available. The release gives subsequent work two concrete starting points. A study of local descriptors can reuse the trained comparison procedure or its triplet objective, and an evaluation can reuse the patch inputs and geometric labels to examine behavior across viewing changes. The paper anticipates real-time applications for compact learned descriptors. Specific follow-up studies and their results remain undocumented here.

## Cite

Cite as Vassileios Balntas, Edward Johns, Lilian Tang and Krystian Mikolajczyk. 2016. PN-Net: Conjoined Triple Deep Network for Learning Local Image Descriptors. arXiv:1601.05030.

The paper itself, not this page. BibTeX from the library's record of the work. [DOI 10.48550/arxiv.1601.05030](https://doi.org/10.48550/arxiv.1601.05030) · [arXiv 1601.05030](https://arxiv.org/abs/1601.05030)

```bibtex
@misc{balntas2016pn,
  title = {{PN-Net: Conjoined Triple Deep Network for Learning Local Image Descriptors}},
  author = {Vassileios Balntas, Edward Johns, Lilian Tang and Krystian Mikolajczyk},
  year = {2016},
  doi = {10.48550/arxiv.1601.05030},
  eprint = {1601.05030},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.48550/arxiv.1601.05030}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
