---
title: "Adversarial Diversity and Hard Positive Generation — Rozsa 2016"
description: "How perceptual similarity, diverse adversarial perturbations, and hard-positive training improve image classification and robustness."
canonical: "https://research.elamur.ai/free/en/papers/rozsa-2016-adversarial-diversity-hard-positive-generation/"
---
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/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/rozsa-2016-adversarial-diversity-hard-positive-generation/)

[home](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/) / Adversarial Diversity and Hard Positive Generation

# Adversarial Diversity and Hard Positive Generation

Paper · 2016 · Andras Rozsa, Ethan M. Rudd and Terrance E. Boult

**Authors:** Andras Rozsa, Ethan M. Rudd and Terrance E. Boult · **Year:** 2016 · **Venue:** IEEE Conference on Computer Vision and Pattern Recognition Workshops (CVPRW) · **Licence:** [arXiv — non-exclusive license to distribute](http://arxiv.org/licenses/nonexclusive-distrib/1.0/)

[**258** citations OpenAlex, 2026-10-14](https://openalex.org/works?filter=cites:W2346735539) · IEEE Conference on Computer Vision and Pattern Recognition Workshops (CVPRW) · [licence](http://arxiv.org/licenses/nonexclusive-distrib/1.0/)

- [DOI 10.1109/cvprw.2016.58](https://doi.org/10.1109/cvprw.2016.58)
- [arXiv 1605.01775](https://arxiv.org/abs/1605.01775)
- [OpenAlex](https://openalex.org/W2346735539)

## Deep dive: Adversarial Diversity and Hard Positive Generation

How perceptual similarity, diverse adversarial perturbations, and hard-positive training improve image classification and robustness. · about 35 minutes to read

**In this deep dive**

1. [Summary](#dd-summary)
2. [Ideas worth borrowing](#dd-ideas-worth-borrowing)
3. [How Mova uses it](#dd-how-mova-uses-it)
4. [The problem and its context](#dd-the-problem-and-its-context)
5. [The method, step by step](#dd-the-method-step-by-step)
6. [Experiments and results](#dd-experiments-and-results)
7. [What the ablations show](#dd-what-the-ablations-show)
8. [Limitations](#dd-limitations)
9. [What came after](#dd-what-came-after)

### Summary

An image classifier can recognize an ordinary image correctly and then fail after a small, carefully chosen alteration. To a person, the altered image may still depict the same handwritten digit, face, or object. For the classifier, however, the change can be enough to produce a different answer. *Adversarial Diversity and Hard Positive Generation* studies how to turn these failures into useful training material. Its central proposal is to generate varied, difficult versions of existing examples, preserve their original labels, and use them to improve the classifier.

The paper combines a measurement proposal with a generation method. The measurement is the perceptual adversarial similarity score, or PASS. Instead of comparing corresponding pixel values alone, PASS first aligns an altered image with its original and then measures their structural similarity. This is intended to distinguish meaningful visual damage from changes, such as slight shifts, that can produce large pixel differences without changing what the image depicts. The generation method, called hot/cold, uses information inside a network to construct several directions of alteration for the same input. Each direction encourages a selected alternative class while suppressing the original class.

The authors also distinguish the closest adversarial example from a useful hard positive. A closest adversarial example is an altered input just far enough along a search direction to cause an error. A hard positive can extend farther along that direction while still remaining a plausible member of the original class. Its label stays unchanged: the point of training is to teach the classifier to recognize a difficult example correctly. The paper argues that a collection of such examples, spanning different directions and alteration strengths, can provide better augmentation than a collection concentrated near the first classification failure.

Experiments with LeNet on MNIST support that argument within the tested setting. The authors compare sign-based perturbations, raw-gradient perturbations, hot/cold directions, scaled hard positives, and ordinary augmentation from InfiMNIST. Their reported comparisons favor diverse hot/cold training and modest amplification over training with a fixed collection of sign-based adversarial examples. They also find that examples of intermediate perceptual similarity are more useful than those at either extreme. A preliminary ImageNet experiment fine-tunes BVLC-GoogLeNet with filtered hot/cold examples and reports a validation top-1 error of 30.552% and top-5 error of 10.604%, using center crops.

These findings establish a practical training argument rather than a complete solution to adversarial vulnerability. The paper does not achieve the strongest reported overall performance on MNIST or ImageNet, and its robustness evaluation concerns a particular collection of generated examples. Its enduring methodological distinction is between finding a nearby failure and constructing a varied set of valid, difficult training inputs. The nearest failure reveals a weakness; a broader collection of hard positives may do more to repair it.

### Ideas worth borrowing

Separate finding failures from choosing training data. An example that efficiently demonstrates a mistake is not automatically the most useful example for learning. The paper first locates a classification failure and then explores farther along the same direction, subject to a similarity constraint. This separates the diagnostic objective from the augmentation objective. The idea applies whenever a system can generate difficult inputs: retain the ability to find a minimal counterexample, but evaluate separately which examples produce the best training improvement.

Preserve variation within a perturbation family. The hot/cold procedure obtains different alterations by changing the target class, even when the source image remains fixed. This makes diversity a controlled property of the generation process instead of an accidental result of random sampling. In other applications, a researcher could similarly vary the kind of competing interpretation, the component being stressed, or the transformation being applied. The transferable principle is to ask whether generated examples cover several distinct ways the system can fail.

Measure validity separately from difficulty. A classification error tells the researcher that an example is difficult for the classifier. It does not establish that the original label is still appropriate. PASS supplies an additional criterion intended to capture visual continuity with the source image. Although the particular score is specific to images, the separation is broadly useful: one test should assess whether the system struggles, while another assesses whether the generated example still belongs in the intended task.

Treat alteration strength as a training choice. The paper does not assume that the smallest successful perturbation is optimal for augmentation. It compares different amounts of amplification and reports that an intermediate region of perceptual similarity can be more useful than either extreme. This suggests evaluating augmentation strength through downstream learning, rather than choosing it solely because it produces especially subtle failures or especially dramatic examples. A useful training example must remain valid while placing meaningful pressure on the current decision rule.

Compare augmentation through generalization. The MNIST evaluation includes ordinary test images and a separate collection containing several adversarial families. Training uses examples generated from the associated source network, while the difficult evaluation set draws from all the source networks. This makes it possible to ask whether improvement extends beyond the exact examples used for training. The same design principle applies to other augmentation pipelines: evaluate both ordinary task performance and performance on difficulties that differ from the training generator’s immediate output.

Keep the baseline simple enough to interpret. The LeNet experiments retain a conventional training setup rather than combining the proposed augmentation with several additional improvements. That choice makes the comparisons easier to attribute to the generated data. It is particularly useful when introducing a new source of supervision or augmentation: a familiar baseline can reveal whether the new data contributes before more elaborate training changes make the explanation harder to disentangle.

### How Mova uses it

For Mova, a small transparent language system implemented in Rust, the most relevant contribution is a way of thinking about difficult examples. The paper does not establish a Mova implementation, and its image-specific machinery should not be presented as an existing language capability. A plausible adaptation would preserve the paper’s separation between example generation, validity checking, and evaluation. The concrete opportunity is to build a collection of difficult inputs whose expected interpretation remains clear.

The first question would be what should stay unchanged. In an image, the authors want to preserve the depicted class in spite of an alteration. In language, a proposed test might preserve an intended meaning, a grammatical relation, or a particular annotation decision. Those are different requirements, and an alteration can preserve one while changing another. A Mova experiment would therefore need an explicit task-specific definition of validity before treating a changed sentence as a hard positive.

For example, a future evaluation could begin with an input that Mova handles correctly and construct several approved variants that retain the relevant expected result. The variants could then be grouped by the kind of difficulty they introduce. The analogy to hot/cold generation would lie in directing the search towards particular confusions, rather than merely producing many arbitrary rewrites. This is a proposed evaluation design, not a claim that the paper supplies a ready-made procedure for generating valid language examples.

PASS itself would not transfer directly. Image alignment, luminance, contrast, and local visual structure do not define whether a sentence preserves its meaning or its grammatical analysis. A language adaptation would need a different validity check. Where the expected result can be inspected directly, a transparent system offers the possibility of recording why each altered input is accepted, what should remain stable, and which processing decision changes. That record would serve the role of making augmentation assumptions visible.

The hard-positive idea is also useful without importing the paper’s gradient calculations. If an approved variant causes a failure, Mova could retain it as a regression example with its intended result. A collection should include different kinds of confusion, rather than many nearly identical versions of the same case. The relevant lesson is to make the training or evaluation collection broader than the first failure discovered.

Any claim of benefit would still require a comparison. A sensible future study would distinguish performance on ordinary inputs, on the difficult examples used during development, and on independently constructed difficult inputs. It would also compare varied examples with simpler augmentation. Until such an experiment exists, the paper offers Mova a concrete research direction: generate valid difficulties deliberately, document why they remain valid, and test whether learning from them improves behavior beyond the cases that motivated them.

### The problem and its context

The paper begins from a mismatch between ordinary recognition performance and behavior under carefully chosen input changes. A classifier may work well on a conventional test collection while remaining sensitive to alterations that people would not regard as changing the answer. This is a problem for [machine learning](https://md.research.elamur.ai/free/en/concepts/machine-learning/) because successful generalization should include some tolerance to irrelevant input variation. A correct answer on the original image is less reassuring if a slight, plausible alteration produces a confident mistake.

The earlier work described by the authors had already shown that adversarial examples were not isolated curiosities. Szegedy and colleagues found that deliberately altered images could fool several kinds of learning systems. They also observed transfer: an image constructed to mislead one network could be misclassified by another, even when the networks differed in training data or other design choices. For the present paper, this suggested that the problem involved the relationship between training procedures and training coverage, rather than a single unfortunate prediction.

That diagnosis motivates an augmentation response. If the training collection does not adequately represent difficult but valid variations, then exposing the learner to those variations may improve its behavior. The challenge is choosing which variations to generate. Ordinary random changes can produce many examples that the classifier already handles correctly. Minimal adversarial changes can reveal a weak boundary, but may provide a narrow view of the surrounding difficulty. The paper tries to make augmentation both more directed and more varied.

#### Perturbations before adversarial generation

The authors place their work in a longer history of training with modified inputs. The MNIST literature already used perturbations as a way to increase the range of examples available for learning. They cite work by Simard and colleagues on this training practice, and describe InfiMNIST as a tool that produces new digit images through small affine transformations and noise.

An affine transformation changes image geometry in a constrained way. In this context, it supplies new appearances of an existing digit without requiring the researcher to collect and label a new handwritten sample. The attraction is straightforward: a classifier should recognize a digit across modest changes in position or shape. Augmentation attempts to teach that tolerance by presenting such changes during training.

The authors also connect their proposal to hard negative mining in detection. A detection task can contain a very large supply of negative examples, many of which are easy to reject. Hard negative mining concentrates attention on the difficult cases that are more informative for learning. The present paper draws on the same selection logic, but its hard positives remain examples of their original class. The generated image is difficult because the current classifier gets it wrong, not because its intended label has changed.

#### Why random search can waste effort

Baluja and colleagues provide a closer precedent in the paper’s account. Their approach applies small affine transformations and checks the responses of several trained networks. The networks act as a control mechanism for identifying useful mistakes and rejecting excessive alterations. The generation process does not require access to the networks’ internal computations.

The limitation is that a good classifier may correctly recognize most randomly altered inputs. Producing many transformed images then becomes an expensive way to find a relatively small collection of failures. The authors illustrate this by generating one million examples with InfiMNIST and evaluating them on differently trained LeNet networks. They report an adversarial proportion of 2.199±0.132%. The result is evidence about the yield of that particular search procedure, not a statement that ordinary augmentation is generally ineffective.

This distinction matters. InfiMNIST can still provide useful training data even when most generated images are correctly classified. The authors’ objection concerns efficiency when the immediate goal is to discover difficult examples. A directed procedure can use information from the classifier itself to search for those examples more deliberately.

#### Optimization and the closest failure

The paper describes the earlier L-BFGS approach as a way to optimize an image towards a specified incorrect label while seeking a small input change. L-BFGS is the optimization procedure used to search for that alteration, with constraints on valid pixel values. Its importance here is that it moves beyond blind sampling: the network’s internal information helps identify a successful direction.

Goodfellow and colleagues’ fast gradient sign method offers a cheaper alternative. It computes how the training loss changes with the input and uses the sign of that derivative to choose a direction. A derivative indicates how a small change in an input component would affect the quantity being optimized. Taking its sign keeps whether each component should increase or decrease, while discarding the relative magnitudes.

In the authors’ description, moving along that direction weakens the original class until another class becomes preferred. Because the direction can be obtained from a gradient calculation and then searched, it is computationally simpler than repeatedly carrying out the optimization used by L-BFGS. The resulting perturbation patterns tend to be spread broadly across the image.

The paper also discusses Sabour and colleagues, who targeted internal representations rather than only the final classification. Their work sought altered inputs whose hidden representations resembled those of guide images. This extended the concern beyond the final output layer: an adversarial input could affect the network’s internal description of an image as well as its reported label.

Against this background, the paper asks a different training question. Earlier optimized attacks, as characterized by the authors, concentrated on the smallest successful change. Here, the goal is to use several directions and then explore beyond the nearest successful point. The resulting examples are intended to provide a richer basis for learning.

### The method, step by step

The method has several components that serve different purposes. A generation rule supplies a direction in image space. A search procedure finds where that direction first causes an error. PASS measures how closely the result resembles the source image after alignment. Amplification then produces additional difficult examples farther along a successful direction. Finally, those examples are used with their original labels during further training.

Keeping these roles separate helps explain the contribution. PASS does not generate a perturbation. Hot/cold generation does not by itself certify that an altered image remains valid. Finding a misclassification does not determine the best amount of alteration for training. The complete procedure depends on all of these decisions.

From a correct image to hard-positive training The steps in order.

#### Define the image and the classifier

The input image is denoted by x. It has m pixel values, represented as integers within [0,255]. The original label is y, and f denotes the learned classifier, which maps an image to one of n possible labels. The network parameters are θ. The training cost is J(θ,x,y), which evaluates the network’s behavior on image x with intended label y.

An altered image is formed by adding a perturbation:

```
x̃ = x + η
```

Here, x̃ is the changed image and η is the perturbation. The equation describes the relationship between the source and altered inputs; the implementation must still produce valid discrete pixel values. The authors emphasize that their generated images retain that discrete image representation.

For adversarial generation, the starting point is an image classified correctly as y. The search seeks an altered image whose predicted label differs from y while its appearance remains sufficiently close to the original. For hard-positive training, y continues to be the supervision target. A successful attack is therefore an incorrectly recognized positive example of its original class.

#### Align images before judging similarity

The first part of PASS compensates for geometric variation. Comparing the same pixel coordinates can exaggerate a small shift: an edge may move slightly even though the image still depicts the same thing. The authors therefore align the altered image to the original before computing their final similarity score.

The alignment is represented by ψ(x̃,x), a transformation of x̃ towards x. It uses a homography with matrix H. A homography supplies a geometric mapping between image coordinates. The paper chooses the mapping by optimizing an objective connected to the enhanced correlation coefficient, or ECC:

```
H* = argmin_H ‖x̄/‖x̄‖ − ψ(x̃,x)̄/‖ψ(x̃,x)̄‖‖
```

H* denotes the selected transformation matrix, and argmin means the value of H that minimizes the expression. A bar over an image denotes its zero-mean version, obtained by removing its mean intensity. The norm signs measure the size of a vector, and the divisions normalize the zero-mean images before their difference is measured. ψ depends on H through the image transformation.

The purpose is to align image structure while accommodating brightness-related differences and noise. The authors argue that simpler correlation or feature-based alignment may be less suitable under those conditions. This alignment stage expresses an important assumption: some changes in viewpoint or image geometry can remain acceptable variations of the same underlying input.

Alignment does not mean that any transformed image should be accepted. The paper distinguishes plausible alternative appearances from excessive distortion. Its face-verification discussion makes the distinction concrete. A change in viewpoint can preserve identity, whereas a heavily distorted or extremely noisy face can remain recognizable to a person while still being clearly problematic data.

#### Measure luminance, contrast, and structure

After alignment, PASS uses the structural similarity index, SSIM. This comparison comes from image-quality work discussed in the paper. Rather than reducing the entire comparison to raw pixel displacement, it evaluates local luminance, contrast, and structural relationships.

The luminance component is:

```
L(x,y) = (2μₓμᵧ + C₁)/(μₓ² + μᵧ² + C₁)
```

In this equation, x and y denote the images being compared; y is not the class label in this local SSIM notation. μₓ and μᵧ are their weighted local mean intensities. L is the luminance comparison, and C₁ is a stabilizing constant that prevents a singular denominator. The component assesses agreement in local brightness.

The contrast component is:

```
C(x,y) = (2σₓσᵧ + C₂)/(σₓ² + σᵧ² + C₂)
```

C is the contrast comparison. σₓ and σᵧ describe local intensity variation in the respective images, and C₂ supplies denominator stabilization. This term concerns the strength of local variation instead of its average brightness.

The structural component is:

```
S(x,y) = (σₓᵧ + C₃)/(σₓσᵧ + C₃)
```

S is the structure comparison, σₓᵧ is the weighted covariance between the local image regions, and C₃ is another stabilizing constant. The covariance captures how the local intensity patterns vary together. The paper describes these quantities through weighted regional statistics.

The regional score combines the components:

```
RSSIM(x,y) = L(x,y)^α C(x,y)^β S(x,y)^γ
```

RSSIM denotes regional structural similarity. The exponents α, β, and γ control the relative contributions of luminance, contrast, and structure. The authors set α = β = γ = 1. They use an 11×11 weighting kernel with σ=1.5, where this σ describes the kernel used to weight local measurements.

The image-level score averages regional comparisons:

```
SSIM(x,y) = (1/m) ∑ₙ₌₁ᵐ RSSIM(xₙ,yₙ)
```

SSIM is the resulting structural similarity index, m is the number of pixels, and n indexes pixel locations. xₙ and yₙ identify the corresponding locations around which the regional comparisons are evaluated. Averaging produces an overall score from the local measurements.

PASS applies this comparison after alignment:

```
PASS(x̃,x) = SSIM(ψ(x̃,x),x)
```

PASS is the perceptual adversarial similarity score. ψ(x̃,x) is the aligned altered image, and x is the original. The score therefore reflects structural similarity after the selected geometric compensation, rather than similarity between the unaligned pixel arrays alone.

The authors use this construction to challenge a simple equation between small pixel norms and perceptual closeness. An alteration can have a large maximum pixel difference because of a local edge change, while the overall image remains very similar. Conversely, a small norm does not by itself guarantee that a change is visually unobjectionable.

#### Make the perceptual constraint explicit

The paper introduces a threshold τ to specify acceptable similarity. The threshold belongs to [0,1], and its appropriate value depends on the domain. An adversarial example must cause a classification error while satisfying that perceptual requirement.

The constrained search can be written as:

```
x̃* = argmin_{x̃: f(x̃) ≠ y and PASS(x,x̃) ≥ τ} d(x,x̃)
```

x̃* denotes the selected adversarial image. f(x̃) is its predicted label, y is the intended original label, and τ is the minimum accepted PASS value. d(x,x̃) is the dissimilarity measure being minimized. The search may be restricted to a direction supplied by a generation algorithm.

The paper allows d to be based on a pixel norm or on a dissimilarity derived from PASS. The important point is that the perceptual requirement is explicit rather than assumed to follow automatically from minimizing a norm. A hard positive must also remain within an acceptable similarity range, but it need not minimize d.

That distinction permits the later amplification step. The nearest acceptable mistake is a useful reference point. The method can then move farther along the same direction to obtain additional examples, provided that the original label remains justified under the chosen similarity criterion.

#### Retain gradient magnitudes with fast gradient value

The first generation variation is deliberately simple. Fast gradient sign uses only the direction of change for each pixel. Fast gradient value, or FGV, instead retains the raw loss gradient:

```
η_grad = ∇ₓJ(θ,x,y)
```

η_grad is the proposed perturbation direction. ∇ₓ denotes differentiation with respect to the image x. J is the training cost, θ contains the network parameters, and y is the intended label. The gradient indicates how changing each input component would affect the loss locally.

Retaining magnitude matters because some pixels have a stronger influence on the loss than others. A sign-only direction suppresses that distinction. FGV allows larger relative changes where the gradient is larger and smaller relative changes elsewhere. Scaling and search then determine how far to move along that direction.

The authors report that this small change produces visibly different perturbations. Sign-based alterations tend to extend broadly over the image, including background regions. Raw-gradient alterations are more concentrated and can preserve structure better according to PASS. Thus, even a simple choice about how to use the gradient changes the kind of difficult example obtained.

FGV does not solve the diversity problem on its own. Together, FGS and FGV offer only a limited selection of directions for a given input. The hot/cold method expands that selection by changing which alternative class the perturbation is intended to encourage.

#### Construct a hot/cold signal

The hot/cold method works at the class-associated layer immediately before softmax. Softmax is the output transformation that turns class scores into normalized output values. Before that transformation, the network still provides a separate value associated with each class.

Let h(x) be the vector at that layer for image x. It has n components, corresponding to the possible labels. The original class y is designated cold. A different class, ỹ, is designated hot. The intended change is to weaken evidence for the original class while encouraging evidence for the selected alternative.

The constructed signal is:

```
ω_hc(x)ⱼ = { |hⱼ(x)| if j = ỹ; −hⱼ(x) if j = y; 0 otherwise }
```

ω_hc is the hot/cold vector, and j indexes its components. hⱼ(x) is the original value associated with class j. ỹ is the chosen hot class, distinct from the original class y. The hot component uses the absolute value of its original class-associated value; the cold component uses the negated original value. All other components are set to zero.

The absolute value allows the hot signal to be positive even when the selected class originally has a negative value. Using values derived from h(x) also ties the signal’s magnitude to the network’s response to the actual image. The authors report that this choice works well in practice, while noting that other positive hot values and negative cold values can also provide useful directions.

The construction is related to image inversion, as described in the paper’s discussion of Mahendran and Vedaldi. That earlier idea reconstructs an image from a chosen internal representation. Here, the authors use a deliberately constructed internal signal to derive a change to an existing image. The addition of a cold class makes the intended movement explicitly relative to the image’s current class.

#### Backpropagate the signal into image space

The hot/cold vector lives inside the network. To alter pixels, the method must map that signal back to the input:

```
η_hc = Bₗ(ω_hc)
```

η_hc is the resulting image-space direction. Bₗ is the back-propagation operator beginning at layer l, and ω_hc is the constructed hot/cold signal. The authors describe Bₗ as an approximation to the derivative propagated to the image level.

This produces a direction rather than a finished adversarial image. Choosing a different hot class can yield another direction for the same source input. The method can therefore generate a collection of alterations related to different competing classes, instead of relying solely on a loss-increasing direction tied to the original label.

The authors also consider derivatives from other layers. Their face examples include changes obtained from an early convolutional layer. These illustrate that the layer from which a signal is propagated can affect the visual character of an alteration. Early-layer changes can emphasize edges, including sharpening or blurring effects, while class-directed signals can produce more recognizable object-related structure.

The implementation uses Caffe. Its existing backward procedure was restricted in where back-propagation could begin. Rather than create separate truncated networks for every chosen starting layer, the authors modify the relevant checks so that a single network can support the required experiments. This supplies the practical operator used in their generation procedure.

#### Search for the first failure, then go farther

Once a direction is available, the method increases the amount of perturbation added to the original image. It uses a line search with increasing step sizes to locate a region where classification changes. It then applies binary search within the final search interval to refine the nearest successful alteration along that direction.

This is a directional notion of closeness. Finding the nearest error along a chosen line does not establish that the result is the globally nearest adversarial image among all possible changes. The generation rule determines which part of image space is explored.

Hard positives extend the process beyond that refined point. The authors multiply a successful perturbation by a constant at least as large as 1. The resulting image can be farther from the original while retaining its intended label. Their MNIST experiments examine specific amplification settings, including 1.05 and 1.10.

The learning interpretation is that the classifier should not merely survive until the first discovered failure point. It should recognize a surrounding range of plausible examples. Amplification attempts to make that range visible during training. At the same time, the similarity constraint is essential: continuing indefinitely would eventually risk changing the image so much that the original supervision becomes questionable.

### Experiments and results

The experimental program examines measurement, generated image structure, and training effects. The most extensive controlled training comparisons use LeNet with MNIST. Face experiments examine the character of the perturbations and the behavior of PASS. The ImageNet study asks whether diverse hard positives can improve an existing BVLC-GoogLeNet network through additional training.

The evidence has different strengths across these settings. MNIST supplies repeated training runs and a deliberately mixed difficult evaluation set. The face study provides qualitative examples and a reported similarity score for a particular alteration. The ImageNet study is explicitly preliminary. Treating all of these as the same kind of robustness result would overstate the paper.

#### MNIST: pixel distances and perceptual similarity

The authors first compare adversarial images through L₂ distance, L∞ distance, and PASS. L₂ summarizes the overall magnitude of pixel changes, while L∞ records the largest component-wise change. PASS instead evaluates aligned structural similarity. These measures can rank the same generated images differently.

The reported comparison between FGS and FGV makes that disagreement clear. FGS produces lower L∞ distances, but FGV obtains higher PASS values. A smaller maximum pixel change therefore does not necessarily correspond to greater similarity under the paper’s perceptual criterion.

This analysis supports the motivation for PASS, but its interpretation should remain precise. It establishes disagreement between measurement approaches and illustrates why the authors prefer a structure-sensitive comparison. It does not provide a direct numerical calibration between PASS and human judgments. The paper’s visual examples and methodological argument carry much of that perceptual case.

#### Faces: structured alterations and domain dependence

The face experiments use a network trained on CASIA-WebFace, with a design similar to earlier face-recognition systems discussed by the authors. Faces are chosen because people are sensitive to their appearance and because distinguishing identities presents a fine-grained recognition problem.

The generated perturbations often concentrate around recognizable facial structures. The authors describe patterns associated with eyes, eyebrows, the jawline, and other salient regions. These are different from a broadly distributed noise pattern: the perturbation can appear related to features that matter for recognition.

An example obtained by moving opposite to a backpropagated Conv1 signal produces a blurred adversarial face with PASS 0.8928. The authors use this case to show that substantial, visible image alteration can still receive a relatively high score and preserve a face-like appearance. They also point out that blur and sharpening can arise from ordinary image formation or processing.

The conclusion is that a PASS threshold must be chosen for its application domain. A score cannot be interpreted independently of the kind of image and the intended recognition task. The face experiment therefore broadens the demonstration of the method while also exposing a limit of any universal numerical cutoff.

#### MNIST: repeated hard-positive training

For the central training study, the authors begin with 3 LeNet networks. Each uses the standard 60K MNIST training examples, but initialization and training order vary. They retain the training settings distributed with Caffe instead of introducing other known performance improvements.

Each source network supplies adversarial and hard-positive training images. The authors then fine-tune each network with different random orderings of the additional data, producing 9 networks for evaluation. Initial training lasts 10K iterations, while fine-tuning lasts 20K iterations.

This design provides some protection against drawing conclusions from a single initialization or data order. It also keeps the augmentation comparison attached to a conventional network. The authors’ aim is to make the contribution of the generated examples easier to assess and reproduce.

Evaluation uses the ordinary MNIST test set of 10K images and a separate collection of 70K adversarial and hard-positive images withheld from training. The difficult collection has 5K examples for each of 14 types. It includes FGS, FGV, and hot/cold directions HC-1 through HC-9. Additional types use HC-1 scaled by 1.05, HC-1 scaled by 1.10, and a hot/cold variant based on derivative signs for the closest-scoring class.

Training and testing differ in an important way. Training uses selected perturbation families generated from the associated source network. The difficult evaluation collection includes examples from all the source networks. Accordingly, an original LeNet does not necessarily misclassify every example in that collection: an example generated against a different network may transfer imperfectly.

This makes the evaluation broader than replaying a network’s own successful attacks. It still remains an evaluation against a particular generated collection, but it asks whether additional training helps with variations not limited to the exact source of the training examples.

#### What the MNIST comparisons favor

The authors report that the diverse hot/cold collection HC-D-9 improves on training restricted to a narrower set of directions. They then compare it with HC-D-9-1.05, which scales the corresponding successful perturbations. The scaled collection provides better ordinary accuracy and stronger performance on the difficult evaluation images in their reported comparisons.

The interpretation is that modestly extending beyond the first misclassification can make the training examples more useful. The nearest adversarial input identifies where the current decision changes. A somewhat stronger but still valid input can place additional training pressure beyond that point.

The paper also reports that training examples with intermediate PASS values are more effective than examples restricted to the highest or lowest similarity values. This prevents a simplistic conclusion that stronger perturbations are always better. It also prevents the opposite conclusion that augmentation should always use the most visually conservative successful examples.

HC-D-9, its scaled version, and FGV are reported to outperform training with a finite collection of FGS images. The comparison with Goodfellow and colleagues’ earlier work requires care, because that work also uses an objective that incorporates an adversarial component during training. The earlier reported MNIST errors are 0.99% and 0.782% for the respective ordinary and adversarially modified objectives.

Those figures describe the earlier method, rather than the paper’s own hard-positive result. The authors suggest that an objective updated during training can benefit from changing adversarial directions, helping explain why it performs slightly better than training on a fixed FGS collection. The hard-positive experiments therefore compare both the character of examples and, indirectly, different ways of supplying adversarial pressure during learning.

The numerical LeNet accuracy entries are not available in the paper’s training discussion as presented in its running text. Its stated rankings support the directional conclusions above, but do not justify inventing exact margins, error reductions, or significance values.

#### Comparison with InfiMNIST augmentation

The ordinary augmentation comparison uses 1M InfiMNIST images and trains the comparison networks for 30K iterations. The authors report that HC-D-9 and HC-D-9-1.05 each use approximately 340K generated adversarial images. Their ordinary MNIST performance is slightly better than the InfiMNIST comparison, but the authors explicitly say that this advantage is not statistically significant.

FGV uses 37,663 training images and performs about as well as the InfiMNIST comparison on ordinary recognition. The paper describes that amount as 3.7% of the InfiMNIST data. This is evidence that a smaller, directed collection can be useful; it is not by itself a complete accounting of generation cost.

The robustness comparison is less favorable to InfiMNIST. The authors report poor performance by the InfiMNIST-trained networks on adversarial examples. Hence, good performance after ordinary geometric and noise augmentation does not establish that the classifier handles the deliberately constructed difficult collection.

These comparisons give the diversity argument practical substance. The proposal is not simply to increase the volume of training data. It is to seek examples that stress the network in selected ways, then use several such directions and suitable strengths. The ordinary test set checks whether this helps recognition beyond the generated examples, while the difficult set checks a different aspect of generalization.

#### ImageNet: extending an existing classifier

The ImageNet study begins with the existing BVLC-GoogLeNet network. The authors use center crops, matching the input treatment of that starting system, and select 15 correctly classified images per class for generation.

For each selected image, they generate 20 hot/cold types. The hot classes range from the most similar alternative, HC-1, through HC-20. This produces 300K images before filtering. They retain examples whose PASS scores exceed 0.99, leaving roughly 250K hard positives.

Those hard positives are mixed with approximately 1.28M original ImageNet training center crops. Fine-tuning uses the original distributed hyper-parameters, runs for 500K iterations, and uses a batch size of 80. The authors describe this as about 25 epochs.

Testing uses center crops from the ImageNet validation set. The reported top-1 error is 30.552%, measuring whether the highest-ranked class is incorrect. The top-5 error is 10.604%, measuring whether the correct class is absent from the leading set of predictions.

The authors also report improvement per added image. For top-1 error, their value is 2.07e-4% per added image. For top-5 error, they compare the hard-positive procedure with crop-based improvements calculated from the earlier GoogLeNet work:

ImageNet top-5 error improvement per added image The reported hard-positive comparison yields more improvement per added image than the crop comparisons.

**The numbers**

| System or setting | top-5 error percentage points per added image |
| --- | --- |
| 10-crop comparison | 7.67e-6 |
| 144-crop comparison | 1.26e-06 |
| Hot/cold hard positives (this paper) | 1.01e-4 |

The chart concerns the authors’ reported efficiency measure, rather than absolute top-5 error. It compares additional images arising from different procedures. That makes it suggestive evidence about the value of targeted augmentation, while leaving open questions about computation, training conditions, and how broadly the comparison generalizes.

The authors do not claim that this ImageNet result reaches the strongest overall performance. They present it as evidence that an existing classifier can benefit from a relatively selective addition of difficult training data. Their generated examples on ResNet-152 further illustrate applicability of the generation procedure, but do not constitute a corresponding hard-positive training result for that network.

### What the ablations show

The paper offers several controlled comparisons and diagnostic analyses, although it does not isolate every design choice in a complete component-by-component ablation. Its strongest explanatory evidence concerns gradient representation, diversity of directions, perturbation strength, and the difference between ordinary augmentation and directed hard-positive generation.

#### Gradient signs and gradient values change the examples

FGS and FGV differ in whether they preserve the magnitude of the loss derivative at each pixel. This is a useful comparison because the change is conceptually small, yet the resulting perturbations differ visibly and receive different similarity assessments.

The authors find that sign-based directions tend to alter a broad area, while raw-gradient directions are more concentrated. FGV’s better PASS behavior alongside larger L∞ changes shows that a maximum component difference can obscure how alterations are distributed over meaningful image structure.

The training comparison also gives FGV an important role. It is not merely a visual alternative to FGS; it supplies useful augmentation with a relatively small generated collection. This supports retaining information in the derivative instead of assuming that the sign transformation preserves everything relevant to training.

It does not establish that raw gradients are always preferable. The experiments concern the networks, datasets, and search procedures used in the paper. The result is best read as evidence that the representation of a perturbation direction is itself a consequential design choice.

#### Several hot classes provide different pressures

The hot/cold procedure varies which alternative class is encouraged. This supplies a way to increase diversity without changing the original image. The authors’ comparisons between narrower generation choices and HC-D-9 support their argument that a broader collection of directions can improve learning.

The explanatory picture is that a classifier’s neighborhood around an image is not defined by a single competing class. Different hot choices can reveal different transitions and different patterns of vulnerability. Training on several of them exposes the learner to a more varied set of difficulties associated with the same intended label.

However, direction diversity and data volume are related in these comparisons. Adding more directions can also add more training examples. The paper’s results support the combined augmentation strategy, but do not fully isolate whether every gain arises from directional coverage, collection size, or their interaction.

This is a useful boundary on the conclusion. The evidence favors varied generated data in the tested procedure. It does not establish a universal rule for how many directions are sufficient or how they should be selected in another setting.

#### Amplification tests whether minimality helps training

The comparison between HC-D-9 and HC-D-9-1.05 is central to the paper’s distinctive claim. The scaled setting begins from successful hot/cold perturbations and moves farther along those directions. The authors report improved ordinary recognition and adversarial robustness after training with the amplified collection.

This directly challenges the assumption that the nearest successful attack is automatically the best augmentation example. For measuring vulnerability, minimality answers an important question: how little must change before the current classifier fails? For training, a somewhat stronger example can provide a more useful demand that the intended class remain stable.

The result still depends on preserving a valid example. Amplification is not justified solely by the fact that an attack continues to succeed. The original label must remain appropriate, which is why the PASS constraint and its domain-specific interpretation remain part of the argument.

The comparison should also be read as evidence for the tested scale rather than for unbounded strengthening. The paper’s separate similarity analysis indicates that excessive departure can reduce the usefulness of the examples.

#### Intermediate similarity is more useful than either extreme

The reported analysis across PASS levels shows better training results for an intermediate similarity region than for collections concentrated at the highest or lowest scores. This is an informative result because it connects the measurement proposal to the augmentation objective.

Very high similarity can correspond to a weak training challenge near the first discovered failure. Lower similarity can introduce alterations that are less useful as representations of the original task. The paper’s empirical finding is that neither extreme is the best choice within its experiment.

That interpretation remains partly explanatory rather than fully demonstrated. The study shows an association between the selected similarity range and training performance. It does not separately measure every reason an example might become less useful, such as ambiguity in its intended label or overemphasis on a particular artificial pattern.

The practical lesson is therefore to treat validity and strength as variables that need evaluation. A similarity measure helps organize that evaluation, but does not eliminate the need to test the resulting training collection.

#### Ordinary accuracy and adversarial behavior can diverge

The InfiMNIST comparison shows that useful ordinary augmentation and adversarial robustness are distinct outcomes. A network can perform well on standard test digits after training with many transformed examples and still struggle with the paper’s difficult generated set.

Conversely, the authors’ hard-positive collections can be competitive on ordinary recognition while performing better against those generated difficulties. This supports evaluating both outcomes. Reporting only the standard test accuracy would miss part of the method’s purpose; reporting only attack-set performance would leave open whether ordinary recognition had suffered.

The statistical qualification is equally important. The authors do not treat the small ordinary-accuracy advantage over InfiMNIST as a statistically established improvement. Their stronger argument combines competitive ordinary performance, a smaller generated collection, and better behavior on the tested adversarial examples.

### Limitations

The authors explicitly acknowledge that their experiments do not achieve the strongest overall results on either MNIST or ImageNet. Their contribution is a comparison of augmentation strategies and a demonstration of useful hard positives. It should not be converted into a claim of general performance leadership.

They also state that the ImageNet experiments are preliminary. Those experiments show improvement through fine-tuning an existing network under a particular center-crop setup. They do not provide the same breadth of repeated controlled training comparisons as the MNIST study.

#### Author-stated limits of perceptual thresholds

The paper explicitly concludes that acceptable PASS thresholds depend on the dataset. Its face examples show why: visible blur can retain a high score, and a plausible face image can differ substantially in raw pixel values. A numerical threshold therefore requires interpretation within the recognition domain.

This limits the role of PASS as an automatic certificate. The score makes a similarity requirement explicit and incorporates geometric alignment and local structure. It does not remove the need to decide which transformations are acceptable for the task.

The authors’ own distinction between a plausible alternative view and obviously problematic distortion also implies that recognition alone is insufficient. A person might still identify a severely altered face while regarding the input as abnormal. Choosing a hard positive requires deciding what range of abnormality the training task should include.

#### Limits of the perceptual evidence

A careful reader should distinguish the proposal of a psychometric score from a complete human-perception validation. The experiments compare PASS with pixel norms and provide visual examples, but do not report a controlled observer study establishing that a given threshold consistently matches human judgments across the tested domains.

The face example with PASS 0.8928 is especially instructive. It supports the authors’ claim that substantial structural or optical-looking changes can remain face-like. It also shows that a high score need not mean a change is literally invisible.

There is therefore a tension between strict imperceptibility and the broader notion of an acceptable variation of the same image. The paper discusses both. Its method is most clearly understood as trying to quantify useful perceptual continuity, including some changes that can be noticed without invalidating the original class.

PASS also inherits choices from its construction. The alignment procedure determines which geometric differences are compensated for, and SSIM determines which local statistics contribute to the final comparison. The paper motivates these choices, but the training experiments do not separately establish that each is necessary or optimal.

#### Limits of the robustness claim

The MNIST robustness evaluation uses a fixed collection of generated adversarial and hard-positive images. It includes several families and examples from multiple source networks, which gives it meaningful variety. Nevertheless, strong performance on that collection does not establish resistance to every possible attack.

A particularly important distinction is between recognizing previously generated difficult images and surviving a fresh search against the fine-tuned classifier. Additional training can change where failures occur. The described held-out collection measures generalization to its examples, but does not provide an exhaustive account of the changed network’s vulnerabilities.

The procedure also finds minimal failures only along selected directions. A line search can refine the first successful point on that line; it cannot certify global proximity among all possible image alterations. Claims about “closest” adversarial examples must therefore remain tied to the search restriction.

Likewise, moving toward a selected hot class defines the generation direction, but a label change need not by itself establish that the chosen hot label became the final prediction. The essential adversarial condition is misclassification while retaining acceptable similarity. Target-directed construction and final classification outcome should not be treated as identical without a corresponding measurement.

#### Limits of the training comparisons

The paper’s comparisons support a combined strategy of diversity, directed generation, filtering, and amplification. They do not fully separate every source of improvement. More directions can mean more examples; different generators can produce different difficulty distributions; continued training contributes additional optimization.

The repeated LeNet runs help address variation from initialization and data order, but they do not turn every comparison into a complete causal decomposition. The finding that intermediate PASS examples work better is informative without proving that PASS alone identifies the best possible training distribution.

The ordinary-accuracy comparison with InfiMNIST also has an explicit statistical limit. The authors describe the advantage of their larger hot/cold collections as slight and not statistically significant. It would be inaccurate to present that comparison as a decisive accuracy victory.

Image count is another incomplete efficiency measure. A smaller generated collection can still require access to gradients, repeated searches, similarity computation, and additional training. The paper’s per-image comparisons do not supply a complete computation or elapsed-time accounting.

#### Limits of the larger-image evidence

The ImageNet experiment uses center crops and a particular starting network. Its results therefore apply to that evaluation setup. The comparison with crop-based improvements is suggestive, but it is not a fully matched experiment in which all other training and computational conditions are held constant.

The paper also shows generated adversarial images for ResNet-152. That supports the reach of the generation method beyond the main training experiments. The authors suggest that the approach could improve stronger systems, but an example of successful generation does not demonstrate a corresponding improvement after training.

Finally, all reported experiments concern images. Applying the ideas to language would require a new definition of valid change and a new generation procedure appropriate to the system. The paper provides a useful distinction between diverse difficulties and minimal failures, but not an experimentally established language adaptation.

### What came after

The later citation record connects the paper to work on analyzing neural language processing and on learning sentence representations. That connection is relevant because the paper combines questions about internal representations, sensitivity to input changes, and the value of generated examples. The available descriptions, however, establish citation relationships rather than detailed accounts of how each later work used PASS or hot/cold generation.

[Analysis Methods in Neural Language Processing: A Survey](https://md.research.elamur.ai/free/en/papers/belinkov-2019-analysis-methods-neural-language-processing/) (2019) places the citation in a broader language-analysis context. Its stated subject is the study of methods for examining neural language processing. The conceptual connection is to [interpretability](https://md.research.elamur.ai/free/en/topics/interpretability/): this paper uses information inside a network to construct inputs that reveal consequential sensitivities. That makes it relevant to understanding behavior beyond ordinary test accuracy.

The citation alone does not establish that the survey endorses PASS, evaluates hot/cold generation, or transfers the image procedure to language. The defensible connection is narrower. Adversarially altered inputs provide a way to investigate the relationship between internal computation and observable errors, which is part of the broader analytical territory named by the survey.

[ConSERT: A Contrastive Framework for Self-Supervised Sentence Representation Transfer](https://md.research.elamur.ai/free/en/papers/yan-2021-consert-contrastive-framework-self-supervised/) (2021) connects the citation to sentence representation learning. Its title identifies a contrastive, self-supervised framework concerned with transferring sentence representations. This brings the discussion into a setting where relationships among different versions or representations of inputs are central research concerns.

The available account does not specify which component of the earlier paper ConSERT adopts, discusses, or compares against. It would therefore be unwarranted to claim that ConSERT uses PASS, performs hot/cold back-propagation, or confirms the hard-positive training result for sentences. Its citation establishes intellectual contact, not a demonstrated equivalence between the procedures.

Across these later connections, the earlier paper’s most portable question remains precise: when difficult examples are generated for learning, should the process stop at the nearest failure? The experiments argue that diversity and carefully chosen additional strength can matter. Carrying that question into another task requires preserving the distinction that makes the original proposal coherent: an input can become harder for the system while still remaining a valid example of the same intended answer.

## Cite

Cite as Andras Rozsa, Ethan M. Rudd and Terrance E. Boult. 2016. Adversarial Diversity and Hard Positive Generation. IEEE Conference on Computer Vision and Pattern Recognition Workshops (CVPRW).

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

```bibtex
@inproceedings{rozsa2016adversarial,
  title = {{Adversarial Diversity and Hard Positive Generation}},
  author = {Andras Rozsa, Ethan M. Rudd and Terrance E. Boult},
  booktitle = {IEEE Conference on Computer Vision and Pattern Recognition Workshops (CVPRW)},
  year = {2016},
  doi = {10.1109/cvprw.2016.58},
  eprint = {1605.01775},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.1109/cvprw.2016.58}
}
```

> 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)
