Crafting adversarial input sequences for recurrent neural networks
Paper · 2016 · Nicolas Papernot, Patrick Drew McDaniel, Ananthram Swami et al.
Summary
A system that reads a sequence can make the wrong decision because an adversary has deliberately changed part of its input. The changes need not disrupt the whole sequence. An attacker may replace selected words in a review or alter selected values in a numerical series, using knowledge of the system’s internal computations to choose influential edits. This paper investigates that possibility for recurrent neural networks: networks whose state carries information from earlier positions into later computations. Its central question is whether methods developed to attack image classifiers can also manipulate systems that read and produce sequences.
The authors address two difficulties. Recurrence creates repeated dependencies through time, so the effect of an input cannot be understood by inspecting only its immediate connection to an output. Text introduces another obstacle: an attack can suggest a direction in a continuous vector space, but the resulting vector may not correspond to any actual word. The paper handles recurrence by unfolding the computation across the sequence, then calculating derivatives that describe how individual inputs affect individual outputs. For text, it searches a dictionary for replacement words whose embedding changes approximately follow the direction suggested by those derivatives.
The strongest numerical result concerns sentiment analysis. An LSTM classifier assigns movie reviews to positive or negative classes. After training, its accuracy is reported as 100% on the training split and 78.21% on the testing split. The attack is evaluated on 2,000 training reviews, where it produces a 100% error rate while replacing an average of 9.18 words per review. Those reviews contain an average of 71.06 words. This establishes a substantial vulnerability in that particular setting, but the attack result concerns the training data. It does not establish the same attack success on held-out reviews, and the replacements are not constrained to preserve fluent language or the original sentiment.
A separate experiment studies a recurrent network that outputs a numerical sequence rather than a class. Here, the derivatives help identify inputs that strongly influence selected output positions while having less effect elsewhere. The authors present an example in which changes concentrated at selected input coordinates alter selected output coordinates. That demonstration supports the possibility of directing an attack within an output sequence. It is qualitative: the paper does not supply an aggregate success rate, a distribution of perturbation sizes, or a systematic measurement of how closely outputs reach specified targets.
The paper’s contribution is therefore both a formulation and an initial demonstration. It expresses adversarial sequence generation as the search for a small input change that brings the output close to an attacker’s chosen sequence. It shows how recurrent computation can be differentiated for that purpose, and it offers a practical heuristic for translating continuous sensitivity into legal word substitutions. The evidence supports the conclusion that recurrence does not by itself prevent adversarial manipulation. Broader claims about natural language validity, unseen data, hidden system internals, or reliable control of arbitrary output sequences remain outside what the experiments establish.
Interesting ideas
Sensitivity should connect inputs to particular outputs. A single measure of overall error can hide which parts of a sequence an attacker can control. The paper instead examines a Jacobian: a collection of derivatives linking input components to output components. This makes the analysis more specific. An engineer can ask which earlier input positions influence a particular decision, or which measurements affect a particular forecast. The same idea is useful for interpretability whenever understanding the location of an influence matters as much as detecting its existence.
Expand repeated computation before analyzing it. The recurrent architecture looks cyclic when drawn as a compact diagram, but a finite sequence produces an ordered succession of state updates. Unfolding those updates reveals the computational paths through which an input affects later states. The reusable lesson is to analyze the computation actually executed over the relevant input, rather than treating a compact architectural diagram as a barrier. This applies to systems with repeated state updates wherever their dependence on inputs can be differentiated.
Separate a useful numerical direction from a valid external edit. An embedding can move continuously, whereas a word must come from an allowed vocabulary. The paper treats this mismatch as part of the attack problem. It first obtains a direction from derivatives and then searches for a realizable substitution. That separation is useful beyond text: a proposed change to a numerical representation may have to be translated into a valid user action, an accepted record, or a permitted symbol. Success in an internal representation is only the beginning of establishing success at the input boundary.
Measure local influence and collateral influence together. For sequence outputs, the authors seek inputs with substantial sensitivity at the desired output position and comparatively little sensitivity at other positions. This turns a broad disruption problem into a more selective intervention problem. The idea can guide diagnostic testing when the goal is to expose a dependency without obscuring it through widespread changes. It also suggests a useful distinction for reporting results: changing the intended output and leaving unrelated outputs stable are separate achievements.
Keep attack effectiveness separate from linguistic validity. The review experiment demonstrates that dictionary substitutions can force incorrect classifications. It does not demonstrate that those substitutions leave meaning unchanged or escape human notice. Treating these as separate evaluation dimensions prevents a successful attack on a numerical decision rule from becoming an unsupported claim about ordinary language. The distinction is useful in natural language processing whenever modified text is judged both by computational behavior and by what a person would understand.
Make access assumptions part of the result. The attacker in this paper knows the network architecture and learned parameters. That access enables the derivative calculations on which the method depends. A result under those conditions answers a different question from an attack that can only submit inputs and receive labels. Recording the attacker’s available information alongside success rates makes findings easier to compare and helps determine which deployment situations they actually address.
Deep dive: Crafting adversarial input sequences for recurrent neural networks
How Jacobian-guided changes fool recurrent neural networks, why discrete words complicate attacks, and what the experiments establish. · about 37 minutes to read
How Mova uses it
For Mova, the small transparent language system implemented in Rust, this paper offers a way to think about targeted robustness tests. The useful connection is methodological: examine how a controlled change at the language input affects a particular downstream decision. Nothing in the paper establishes that Mova implements its attack, uses an LSTM, or exposes the differentiable computation required by the authors’ method. Any direct application should therefore be described as a possible experiment rather than an existing feature.
A concrete use would be a substitution-based evaluation around a language decision Mova actually makes. An evaluation case could preserve the original text, record the original decision, substitute a selected word, and record the changed decision. The test would then inspect whether the replacement preserves the intended interpretation. This borrows the paper’s insistence on changing realizable input words, while adding the explicit linguistic judgment that the authors identify as unfinished work. The purpose would be to distinguish a brittle response to wording from a reasonable response to changed meaning.
Transparency could make the resulting failures easier to investigate. A useful record would connect the edited word to the intermediate representation or rule that changed, and then to the final output. The paper follows a related chain through embeddings, recurrent states, and output scores. Mova could apply the same investigative discipline to whatever internal structures it actually uses. The transferable idea is to preserve the path from an external edit to an observable consequence, rather than reporting only that the answer changed.
If a Mova component has continuous, differentiable inputs, a closer adaptation could examine derivatives with respect to those inputs. The important condition would be that the derivative corresponds to a component involved in the actual decision. A numerical sensitivity map would then identify candidate interventions, but each intervention would still need translation back into accepted language input. The paper shows why skipping that translation is problematic: an influential embedding displacement can fall between all available words.
For a component without such derivatives, the exact Jacobian attack would not apply. The broader experiment could still use explicit candidate edits and observe their effects. That would be a different search procedure, not an implementation of the paper’s derivative calculation. Keeping this distinction visible would make the borrowing honest: the shared principle is directed input perturbation and traceable output change; the mathematical mechanism depends on the component.
The most useful reporting practice for Mova would be to keep several questions separate. Did an edit change the output? Was the edited text acceptable? Did its meaning remain sufficiently stable for the original expected answer to remain appropriate? Was the edit selected with access to internal information? The review experiment answers the first question under a particular access assumption, while leaving substantial work on the others. A transparent evaluation can preserve that distinction and make individual failures available for inspection.
The problem and its context
From ordinary errors to deliberately induced errors
An ordinary classification error tells us that a system failed on an input. An adversarial example asks a more directed question: can someone start from a legitimate input and deliberately construct a nearby input that makes the system fail? The adversary does not merely wait for an error. The adversary searches for a change that exploits the system’s own response to its inputs.
The paper situates this question within machine learning used in sensitive or adversarial environments. It mentions applications involving autonomous vehicles, financial prediction, communication analysis, and malware classification. These examples motivate concern about output integrity. They are not all experimental domains in the paper. The actual demonstrations use movie reviews and synthetic numerical sequences.
The authors describe earlier findings that small, selected perturbations can produce large changes in a network’s decision. They associate those vulnerabilities with approximations in learning and with linear behavior in many computational systems. They also acknowledge proposed defenses, including work on distillation, while describing vulnerability as an unresolved problem. Their contribution is an extension of an existing attack framework to sequential computation, instead of a claim that adversarial manipulation had previously been unknown.
The distinction between an arbitrary wrong answer and a chosen wrong answer matters throughout this context. An untargeted attack succeeds if the output changes away from the legitimate class. A targeted attack asks for a particular class selected by the adversary. Once outputs become sequences, the target can be more detailed still: the attacker may want a specified pattern of numerical values, or a change concentrated at particular output positions.
Why image attacks were an incomplete starting point
The earlier attacks discussed in the paper were evaluated mainly on image classification. Images enter those systems as numerical arrays, and the authors emphasize that the relevant preprocessing is straightforward to differentiate and translate back into image values. A proposed numerical perturbation can therefore be expressed relatively directly in the raw input.
Words create a different boundary. A review is first represented as a sequence of dictionary identifiers, then as a sequence of vectors. The numerical coordinates presented to the recurrent network are not independent controls available to a person editing the review. A person can choose a different word, but cannot generally submit an arbitrary point in the embedding space as ordinary text.
This difference changes what it means to construct an attack. Finding a vector that changes a prediction is insufficient if that vector cannot be produced by any accepted input word. The attack must respect the mapping between raw language and its internal numerical representation. The paper treats that mapping as a substantive obstacle, instead of assuming that a successful continuous perturbation automatically gives a successful textual example.
There is also a difference in output structure. A class label provides a simple success condition: the predicted class either changes or it does not. A numerical output sequence offers many possible attack goals. An adversary might move an entire sequence toward a target, change selected values, or try to preserve most outputs while altering a few. The paper introduces a formulation broad enough to express a desired output sequence and an acceptable distance from it.
Why recurrence raised a separate question
A recurrent network updates an internal state as it processes the sequence. The state at the current position depends on the current input and on the preceding state. That preceding state already contains effects from earlier inputs. Accordingly, an input can influence an output through a chain of intermediate state updates.
The compact architectural diagram contains a cycle because the same state-update mechanism is reused. The authors identify this cyclic presentation as a challenge for extending derivative-based attacks. In an acyclic feed-forward graph, the chain rule can follow a finite set of directed computational paths. The recurrent diagram needs to be expanded over time before those paths become explicit.
The paper does not claim that recurrence makes derivatives impossible. Its solution uses computational graph unfolding, drawing on the earlier work it cites by Mozer and Werbos. For a finite sequence, each recurrent update becomes a separate occurrence in an ordered computation, while the learned parameters remain shared. Differentiation can then proceed through that expanded graph.
The same distinction appears in the paper’s treatment of the fast gradient sign method. That method can already apply to a recurrent computation when the loss is differentiable and the inputs are continuous. The authors also note an earlier use involving recurrent connections in a multi-prediction deep Boltzmann machine. Their narrower contribution is therefore not the discovery that any recurrent connection can be attacked. It is a treatment of sequential inputs, sequence outputs, and the difficulty of translating attacks into discrete words.
The two attack traditions the paper extends
The fast gradient sign method uses the derivative of a cost function with respect to the input. It approximates how changing the input will change the loss, then moves input coordinates according to the signs of those derivatives. Its attraction is a direct connection between local sensitivity and a perturbation intended to worsen the prediction.
The forward-derivative approach instead examines the network’s outputs individually. Its Jacobian records the response of each output component to each input component. Earlier work used that information to construct adversarial saliency maps for classification. Such maps help select inputs that push a decision towards an adversary’s desired class.
This paper emphasizes the latter approach because output-by-output sensitivity is useful for sequences. A column of the Jacobian can describe how input changes affect a selected output position. Comparing that column with others can reveal inputs that are influential at the target position but less influential elsewhere.
For the movie-review experiment, the classification problem is binary. That simplifies the attack because the adversary only needs to cross between positive and negative decisions. The authors therefore do not reproduce the full saliency-map construction for multiclass classification. The numerical sequence experiment then uses the broader input-to-output sensitivity view to demonstrate more localized manipulation.
The method, step by step
The method starts by identifying what the attacker may change and what output the attacker wants. It then expands the recurrent computation over the input sequence, calculates sensitivities, and selects perturbations. For continuous numerical inputs, selected coordinates can be changed directly. For text, the perturbation must pass an additional dictionary search that turns an embedding direction into an actual replacement word.
From recurrent sensitivity to an adversarial sequence
The steps in order.
Define the computation before attacking it
The paper begins with a general description of a neuron as an activation function applied to inputs and learned weights:
h(x) = φ(x, w)
Here, x denotes the input vector, w denotes the neuron’s weights, φ is its activation function, and h is the resulting output. The weights are parameters learned during training. In a layered network, outputs from some neurons become inputs to others, allowing the overall computation to combine successive transformations.
For recurrence, the current state also depends on the preceding state:
h⁽ᵗ⁾(x) = φ(h⁽ᵗ⁻¹⁾(x), x, w)
The superscript t identifies a timestep, and h⁽ᵗ⁾ is the state at that step. The expression h⁽ᵗ⁻¹⁾ denotes the preceding state. The same weights w are reused as the sequence advances. The notation x stands for the sequence being processed; the update at a particular step uses the relevant current input together with the carried state.
This shared update is what lets the network handle sequential dependencies without assigning an completely unrelated computation to every possible sequence position. It is also what gives an earlier input a route to influence later outputs. An attack must account for those indirect effects instead of considering only the input’s immediate contribution.
The illustrative recurrent architecture uses an input-weight term, a recurrent-weight term, and a hidden-state bias before applying a hyperbolic tangent. An output transformation then converts the state into the predicted value. The attack analysis follows these dependencies through time. The precise activation and parameter values determine the sensitivities, but the unfolding argument does not depend on the compact diagram remaining cyclic.
State the adversarial objective
For classification, the attacker starts with an input x and seeks a small perturbation that changes the predicted class. A clearer way to express the optimization intended by the paper is:
δₓ = arg min_z ‖z‖ subject to f(x + z) ≠ f(x)
The symbol δₓ denotes the selected perturbation, z ranges over candidate perturbations, and ‖z‖ measures their size using a domain-appropriate norm. The function f is the classifier. The constraint requires the altered input to receive a different prediction from the original input. The adversarial input is obtained by adding δₓ to x.
The choice of perturbation measure is part of the problem definition. For a numerical input, magnitude may be meaningful. For a sequence of words, the authors mention the number of changed sequence positions as a possible measure. These alternatives encode different notions of a small intervention.
The paper also stresses that exact optimization is difficult for nonlinear, non-convex networks. The attack procedures are approximate searches. Their successful outputs show that an effective perturbation was found; they do not establish that no smaller perturbation exists.
For a sequential output, the attacker needs a more expressive target:
δₓ = arg min_z ‖z‖ subject to ‖f(x + z) − y*‖ < Δ
Here, y* is the desired output sequence, and Δ is the permitted discrepancy between that target and the output produced by the altered input. The inner difference compares predicted and desired outputs. The norm outside that difference measures their separation. The norm used for outputs need not represent the same practical notion of size as the input perturbation norm.
This formulation makes the attack goal explicit. Merely changing an output is weaker than reaching a specified target within an acceptable tolerance. The numerical experiment illustrates directed changes, but does not report a systematic evaluation of this complete constrained objective across targets and tolerances.
Understand the fast gradient sign alternative
The authors discuss the fast gradient sign method before developing their Jacobian attack:
x* = x + ε sgn(∇ₓ c(f, x, y))
The symbol x* denotes the adversarial input. The function c is the cost associated with f, x is the original input, and y is the corresponding output used in the cost calculation. The operator ∇ₓ takes the gradient with respect to the input. The sign function, sgn, keeps the direction of each gradient component, while ε controls the size of the step.
The distinction from training is the object being changed. Training calculates derivatives to update learned parameters. This attack keeps those parameters fixed and uses derivatives to change the input. The deployed computation is therefore manipulated at prediction time without altering its training data or training procedure.
The paper explains the tradeoff associated with ε: increasing it can make misclassification more likely while also making the perturbation larger and easier to notice. It does not evaluate a range of ε settings in the reported experiments.
For a differentiable recurrent computation with continuous inputs, the same idea remains applicable. The limitation for text is not simply recurrence. It is that a coordinate-wise movement in an embedding space may fail to correspond to any word in the dictionary. That issue motivates the more explicit treatment of valid substitutions.
Calculate the forward derivative
The forward derivative is the network’s Jacobian:
J_f[i, j] = ∂f_j / ∂x_i
The entry J_f[i, j] describes the local sensitivity of output component f_j to input component x_i. The indices i and j identify the relevant input and output components. The derivative indicates how the output changes under a sufficiently small change in that input, evaluated around the current input.
This is a local description. A large derivative suggests that an input component is influential near the point where it is measured. It does not on its own prove the effect of a large replacement or guarantee behavior after several edits. The method turns this information into a search heuristic and then evaluates the altered input through the actual network.
To calculate these derivatives through recurrence, the state updates are expanded:
h⁽ᵗ⁾(x) = φ(φ(… φ(h⁽¹⁾(x), x, w) …, x, w), x, w)
The nested applications of φ represent successive recurrent updates. The state h⁽¹⁾ is the earlier state from which the displayed expansion proceeds. The repeated w indicates parameter sharing rather than independently learned weights at each position. The ellipses stand for intervening updates.
Unfolding changes the representation of the computation, not the function it performs. Each state now depends on an earlier state in an ordered graph. The chain rule can follow those dependencies to connect an output back to the input positions that contributed to it.
For sequences, the paper writes the sensitivity relation in temporal notation:
J_f[i, j] = ∂y⁽ʲ⁾ / ∂x⁽ⁱ⁾
The term x⁽ⁱ⁾ denotes the input at step i, and y⁽ʲ⁾ denotes the output at step j. When inputs and outputs have several coordinates per step, each time-to-time relationship includes sensitivities between those coordinates. The temporal matrix description is therefore a convenient view of a richer derivative structure.
The paper’s expanded derivation repeatedly substitutes the expression for the preceding hidden state into the current output computation. The output weights, recurrent weights, input weights, and biases all remain inside that composition. The useful result is that each output-to-input derivative can be evaluated through the unfolded graph, just as derivatives can be evaluated through an acyclic network.
Choose edits for a binary decision
The review task has negative and positive classes. The attack records the original predicted class, initializes the altered review to the original review, and repeatedly changes words while the original prediction persists. It stops when the class changes.
The numerical inputs to this classifier are word embeddings: vectors representing words. Each word occupies a position in the sequence and contributes a vector of coordinates. The derivative for one word and one output is therefore itself a vector, instead of a single scalar.
The paper expresses the embedding sensitivity as:
J_f(x)[i, j] = ∂h_j / ∂x⁽ⁱ⁾
Here, i identifies a word position, x⁽ⁱ⁾ is its embedding, and h_j denotes the score associated with output component j in this part of the paper. This use of h concerns the classification score, rather than the generic recurrent-state notation used earlier. The derivative contains a component for each coordinate of the word vector.
The authors calculate sensitivities from the logits supplied to the softmax rather than from the final probabilities. A logit is a score before conversion into a probability distribution. The stated motivation is more stable gradient calculation. Choosing the largest logit gives the same class as choosing the largest corresponding softmax probability.
The original class is selected by:
f(x) = arg max_{j ∈ {0, 1}} p_j
The quantity p_j is the predicted probability for class j. In this experiment, 0 denotes negative sentiment and 1 denotes positive sentiment. The arg max operation returns the class index with the largest probability.
Because the decision is binary, the attack does not require the full machinery for selecting among many possible target classes. It seeks to weaken the original decision sufficiently for the other class to win. The paper’s use of output scores still matters: a gradient describes how those scores respond to input movement, and the final class change must be verified by evaluating the altered review.
Translate an embedding direction into a dictionary word
The dictionary constrains the available replacements. An attacker cannot independently adjust every embedding coordinate and expect the result to remain a valid word. Instead, the method compares the direction of available substitutions with the direction suggested by the Jacobian.
The replacement rule in the algorithm can be read as the following dictionary search:
w = arg min_{z ∈ D} ‖sgn(x*[i] − z) − sgn(J_f(x)[i, y])‖
Here, D is the dictionary represented through its word embeddings, z is a candidate replacement embedding, w is the selected replacement, and x*[i] is the current embedding at position i in the altered review. The symbol y denotes the original class. The norm measures disagreement between the two sign patterns.
The subtraction order is important. The expression x*[i] − z points from the candidate replacement back towards the current word. Matching that direction to the derivative corresponds to seeking a replacement displacement in the opposing direction. This is how the displayed rule relates to reducing support for the original decision.
The search compares signs rather than full gradient magnitudes. It therefore asks whether a candidate word moves coordinates in compatible directions, instead of solving a continuous optimization problem exactly. A dictionary word can be chosen even when its displacement is only an imperfect match.
The procedure then substitutes the chosen word and evaluates the modified review. The algorithm leaves the word-position selection step unspecified. It also writes the Jacobian as a function of the original input, rather than clearly specifying an update after every replacement. These details limit how completely the published description determines the search behavior.
Most importantly, dictionary membership is the validity constraint actually implemented. The algorithm does not additionally require a synonym, preserved grammar, stable sentiment, or contextual appropriateness. Those missing conditions explain both why the procedure can find effective substitutions and why its success does not establish imperceptible language manipulation.
Selectively influence a numerical sequence
For a sequence-producing network, the attacker inspects the Jacobian column associated with a desired output step. Inputs with large absolute derivatives in that column are promising because they can exert substantial local influence on the selected output.
The method also compares those inputs’ derivatives at other output steps. An input that strongly affects the desired step but weakly affects other steps offers more selective control. This comparison is the basis for the paper’s attempt to change selected outputs without broadly disturbing the sequence.
The directional expression given by the authors is:
sgn(J_f[i, j]) × sgn(y*_j)
The term J_f[i, j] is the sensitivity of output position j to input component i. The symbol y*_j is the desired target component at output position j. Multiplying the signs combines the direction of influence with the sign of the target.
This expression is a directional heuristic, not a complete target-matching algorithm. In particular, the displayed term uses the target’s sign, rather than explicitly calculating the remaining difference between the current output and that target. The paper does not provide a general step-size rule, convergence argument, or quantitative tolerance study. Its experiment demonstrates selected output movements, leaving reliable optimization of the full target-sequence objective for further investigation.
Experiments and results
A movie-review classifier with an explicit input pipeline
The categorical experiment concerns text classification. A review enters as a sequence of words, which are mapped to dictionary identifiers and then to embedding vectors. The dictionary contains 10,000 often occurring review words and a special entry representing other words. Each embedding has 128 coordinates.
The classifier uses an input layer, an LSTM layer, a mean-pooling layer, and a softmax output. The LSTM supplies the recurrent processing. Its memory mechanism allows the computation to retain or forget information from preceding states. The mean-pooling stage averages the representations produced by the LSTM memory cells, and the softmax converts the resulting class scores into probabilities.
The implementation uses Python and Theano, with Theano supporting symbolic differentiation. The review data are associated with the cited work by Maas and colleagues. The setup describes a little over 2,000 training reviews and 500 testing reviews. The attack result is subsequently reported on 2,000 training reviews.
Before attack, the classifier achieves the following split-specific accuracies:
Movie-review sentiment classification, clean accuracy by split
Clean performance is stronger on the training split than on the testing split.
The numbers
| System or setting | accuracy % |
|---|---|
| Training split, best reported setting (this paper) | 100 |
| Testing split | 78.21 |
These are clean classification results. The chart compares evaluation splits for the same architecture; it does not compare competing attacks or different recurrent designs. Its role is to establish the classifier’s behavior before the input substitutions.
The gap between training and testing performance matters for interpreting the attack. The classifier fits the training reviews correctly, so the attack is not merely identifying reviews that were already misclassified in that split. At the same time, the testing result shows that clean generalization is a separate issue. The paper does not report attacking that held-out split.
The word-substitution attack result
The attack reaches a 100% error rate on the attacked training reviews. Its average intervention is 9.18 changed words, against an average review length of 71.06 words. These quantities describe different aspects of the result: the error rate measures the final classification outcome, the replacement average measures the intervention, and the length average describes the original inputs.
The averages do not reveal the complete distribution. The paper does not state how many replacements were needed for the hardest review, whether a few reviews required much more editing, or how replacement counts varied with review length. It also does not provide confidence intervals or repeated-run variation.
The example review illustrates the mechanism without establishing a general linguistic pattern. The original text expresses unwillingness to rent a film even at a discounted rental occasion. Replacing its opening pronoun with the adjective “Excellent” causes the classifier to assign the other class. The inserted positive cue is locally conspicuous, while much of the negative statement remains.
This example supports a specific interpretation: a strongly positive word can have enough influence to overturn the classifier’s treatment of the surrounding review. It does not show that the edited sentence is fluent or that a reader would regard it as a natural equivalent of the original. The example is valuable precisely because it exposes the separation between prediction control and ordinary linguistic acceptability.
There is no reported random-substitution baseline, synonym-substitution baseline, or direct comparison against fast gradient sign perturbations translated into words. As a consequence, the headline attack success does not isolate how much of the outcome depends on the Jacobian direction rather than on the freedom to insert strongly sentiment-bearing vocabulary.
A synthetic sequence-to-sequence experiment
The second experiment uses 100 generated input–output pairs. Each input step has 5 values, each output step has 3 values, and both sequences extend for 10 steps. This is a low-dimensional numerical setting designed to make temporal influence visible.
The input values are sampled with μ=0 and σ²=1. The output values use μ=0 and σ²=10⁻⁴. The generated samples are then modified to create a strong relationship between an output step and an earlier input step, either the immediately preceding step or the earlier step described by the authors as last-to-previous.
This construction matters more than the randomness alone. If inputs and targets remained unrelated samples, the temporal dependency would not provide a useful demonstration of selective influence. By introducing a known relationship across steps, the experiment gives the recurrent network a structure to learn and gives the Jacobian an influence pattern to expose.
Training lasts 400 epochs with a learning rate of 10⁻³. The training cost is mean squared error between predicted sequences and target sequences. The paper’s figure shows predictions close to the displayed targets, but no aggregate numerical value for that fit is reported.
The adversarial example aims to alter value 0 at output step 5 and value 2 at output step 8. The substantial input edits occur at value 3 of step 4 and value 0 of step 6. The selected positions illustrate the intended temporal control: changes at particular earlier inputs propagate into particular later outputs.
The result remains a visual case study. The paper does not give a success percentage over the generated pairs, an average perturbation size, a numerical measure of changes outside the targeted outputs, or a target-distance score. Those missing measurements prevent a direct quantitative comparison with the classification experiment.
What the experiments jointly establish
The classification experiment establishes that a concrete dictionary-based attack can force incorrect decisions on the evaluated training reviews. The numerical experiment establishes that inspecting input-to-output derivatives can guide an example of selective sequence manipulation.
Together, they support the paper’s architectural claim: recurrent computation can be unfolded and analyzed with derivative-based attack techniques. They also demonstrate that categorical and sequential outputs require different success criteria. A flipped class provides an immediate discrete outcome; a changed numerical sequence requires a more detailed account of target proximity and collateral effects.
The experiments do not establish a single general attack success rate across recurrent applications. Their data, output spaces, perturbations, and evaluation procedures differ. Reading them as complementary demonstrations preserves what is useful in each without treating the qualitative result as equivalent to the quantified classification result.
What the ablations show
The paper reports no formal ablation study; its explanatory evidence comes from the contrast between categorical and sequential tasks, the dictionary-constrained attack construction, and individual adversarial examples.
Recurrence is handled in both settings
The two experiments use different recurrent architectures. The review classifier uses an LSTM, while the numerical demonstration uses the simpler recurrent architecture introduced earlier in the paper. Both can be unfolded for differentiation.
This supports the claim that the method is not tied solely to the compact diagram of the illustrative recurrent neuron. It does not establish equal attack effectiveness across recurrent variants. Architecture, data, task, and evaluation all change together, so their individual contributions cannot be separated.
A controlled architectural comparison would keep more of those conditions fixed. The paper does not perform such a comparison. Its evidence is better understood as showing feasibility in distinct settings than as identifying which recurrent design is most vulnerable.
Dictionary search supplies realizable words
The word attack directly addresses a limitation of unrestricted embedding perturbations. It restricts replacements to entries in the dictionary, so the resulting sequence can be expressed as words rather than arbitrary vectors.
That is an important methodological contribution, but its benefit is not measured through an ablation. The paper does not compare the dictionary search with nearest-neighbor selection under another distance, random vocabulary selection, or a search that uses gradient magnitudes as well as signs.
The reported success therefore validates the complete procedure under the experimental conditions. It does not establish that the sign-matching rule is the most efficient or necessary way to choose replacements. Nor does it show which part of the search is responsible for the average replacement count.
The numerical example examines selective influence
The sequential demonstration goes beyond showing that some output changes after some input changes. The attacker selects input positions using sensitivity to desired outputs and comparatively weaker sensitivity to other outputs. This is an analysis of influence structure.
Its evidential strength is local and qualitative. The example is consistent with the selection principle, but the paper does not quantify how much better that principle performs than choosing inputs with large derivatives alone. It also does not measure selectivity across many targets.
The useful lesson is therefore about what to inspect: an input’s influence on the desired output should be evaluated alongside its influence elsewhere. The paper gives an example of that reasoning in action, without providing a controlled estimate of its advantage.
The lexical example exposes a plausible failure mechanism
The review example shows a positive cue overcoming a broader negative statement. This gives readers a concrete account of how a valid dictionary substitution can move the decision. It makes the attack easier to understand than an error rate alone would.
However, an illustrative example cannot establish that every attacked review fails through the same mechanism. The paper does not categorize replacement words, inspect their contextual roles systematically, or compare successful and unsuccessful candidate substitutions. It also does not measure whether the classifier’s pooling stage contributes specifically to the observed vulnerability.
The example should therefore be treated as an explanatory case. It demonstrates an actual kind of failure available to the attack, while leaving the distribution of failure mechanisms unresolved.
Several causal questions remain open
There is no controlled analysis of review length, replacement budget, dictionary size, or embedding dimension. There is also no reported defense comparison, no analysis of attack computation time, and no experiment that varies how much internal information the attacker receives.
These absences matter because success and practicality are different questions. An attack can eventually force a wrong answer while requiring expensive search or conspicuous edits. Without the relevant comparisons, the paper cannot identify the smallest sufficient access level, the least noticeable substitutions, or the most important computational ingredient.
Its contribution is an initial construction supported by demonstrations. The lack of ablations narrows the causal explanation available from those demonstrations, but does not erase the basic finding that the evaluated recurrent systems can be manipulated.
Limitations
Limits the authors explicitly identify
The authors describe the work as an initial stage of a continuing investigation. They present the LSTM classifier and the low-dimensional numerical network as preliminary validation, and call for evaluation using additional recurrent variants and datasets. This qualification is central to the scope of the conclusions.
They also explicitly identify grammar and meaning as unfinished work. A word sequence can remain inside the dictionary while becoming awkward, semantically changed, or plainly suspicious. The authors propose improving those properties so that adversarial sequences would be harder for people to distinguish from legitimate inputs.
This is more than a presentation issue. For natural language, the expected output may reasonably change when the meaning changes. A persuasive adversarial evaluation must therefore establish why the original expected answer should still apply after editing. The reported word-substitution procedure does not enforce that condition.
The authors further acknowledge the strength of their access assumption. Their attacker knows the computational architecture and the learned parameter values. That knowledge makes it possible to calculate the derivatives used to select perturbations. They recognize that an external adversary may not have such access.
Their discussion points to earlier black-box classification attacks using a substitute network. In that earlier setting, an adversary queries a target for labels, approximates its decision behavior with a substitute, and constructs attacks against the substitute. Transferability can then make those inputs effective against the target as well. The present paper leaves adaptation of that approach to recurrent systems for future work.
Finally, the authors explicitly defer a detailed numerical evaluation of the sequence-output attack. The displayed example cannot substitute for measurements over many sequences and attack targets. The paper itself recognizes that the qualitative demonstration needs quantitative follow-up.
Limits visible in the review setup
The main attack result is measured on training reviews. That choice is informative because the classifier initially predicts those reviews correctly, but it does not establish how the attack behaves on unseen reviews.
The reported clean testing accuracy cannot fill that gap. It measures ordinary classification on unmodified held-out text. It does not indicate how frequently a directed attack succeeds there, how many replacements it requires, or whether its substitutions differ from those found on training examples.
The experiment also leaves the meaning of the edited review uncontrolled. A replacement can introduce a word with an opposing sentiment, alter the speaker’s intended evaluation, or damage the sentence. In such cases, the fact that the classifier’s output changes is clear, but the claim that the new output is wrong may require an independent judgment of the edited text.
No human evaluation is reported. There is no measured assessment of fluency, semantic preservation, sentiment consistency, or detectability. The paper’s own example helps readers see the problem, but does not resolve it.
The average replacement count is also incomplete as a measure of perturbation. It describes how many positions change, not how consequential those changes are. Replacing a weakly informative word and replacing a decisive sentiment word can count similarly while having very different effects on interpretation.
Limits visible in the search description
The optimization statement seeks a minimum perturbation, but the procedure is heuristic. The reported substitutions are sufficient to change the decision; they are not proven minimal. The paper does not establish that a smaller successful edit set could not be found.
The position-selection step is left open in the algorithm. Because word order and contextual role affect influence, that choice could materially affect replacement counts and the naturalness of the result. The absence of a fully specified selection policy makes it harder to distinguish the contribution of gradient information from the contribution of the surrounding search strategy.
The description also does not clearly establish a gradient-refresh schedule. After a replacement, the altered review occupies a different point in embedding space. Its local sensitivities may change. Whether the procedure recalculates them or continues using the original derivative information can affect both behavior and computational cost.
There is no attack-time or query-cost report. The dictionary search involves comparing candidate substitutions, but the paper does not quantify the resources needed to obtain the reported errors. Its findings therefore concern demonstrated vulnerability more directly than operational efficiency.
Limits visible in the sequence-output setup
The numerical data are deliberately constructed to contain strong temporal correlations. That makes them suitable for showing an influence pattern, but limits what they establish about more complicated sequence relationships.
The application to financial forecasting is motivational. The experiment does not use financial records, evaluate a financial objective, or test a deployed forecasting system. A reader should not treat the synthetic example as evidence of demonstrated manipulation in that application.
The output-target formulation is also more general than the evaluated attack. It allows an arbitrary desired sequence and a tolerance Δ. The experiment instead presents selected coordinate changes without reporting how close the full output comes to a specified target under a defined norm.
Collateral effects remain unquantified. The Jacobian selection rule seeks inputs that influence the desired output more than others, but the paper gives no aggregate measurement of how well unrelated outputs are preserved. Selective control is suggested by the example rather than established as a reliable property.
Finally, derivatives describe local behavior. The procedure uses them to choose interventions that may be large enough to change an output substantially. Without a quantitative study of step sizes, repeated updates, and target error, the relationship between local sensitivity and dependable sequence control remains incomplete.
What the broad conclusion can support
The paper supports the conclusion that recurrent architecture is compatible with derivative-guided attacks. It provides concrete evidence for a dictionary-based classification attack and a qualitative example for sequence outputs.
It does not show that all recurrent systems are equally vulnerable, that any desired output sequence can be reached, or that the resulting text preserves its original interpretation. It also does not establish attack effectiveness when the target’s internals are unavailable.
These limits define useful follow-up questions. They separate architectural feasibility from general attack reliability, realizable words from acceptable language, and internal access from external attack conditions. Preserving those distinctions makes the paper’s contribution more precise.
What came after
The later citation list places this paper within several directions: natural-language adversarial generation, attacks with restricted access, word-level search, application-oriented attacks, and evaluation. The titles establish those directions, while citation establishes that the later papers refer to this work. They do not by themselves establish which implementation details were inherited or how the later results compare.
The most defensible connection is therefore conceptual. This paper exposes problems that later titles continue to address: how to construct valid text edits, how to choose influential words, how to operate without full internal access, and how to decide whether an altered input is truly adversarial.
From legal vocabulary entries to natural-language examples
Generating Natural Language Adversarial Examples takes natural-language adversarial construction as its explicit subject. That direction follows directly from a major gap in the recurrent-network paper. Restricting an edit to a dictionary guarantees that the replacement is a recognized word, but says little about the resulting sentence.
The conceptual progression is from an attack that can be written as text towards an attack evaluated as language. This distinction is already visible in the review example, where a positive adjective overturns a decision while disrupting the opening of the sentence. The later title places natural language at the center of the attack problem. The citation information does not establish its particular search procedure or measured linguistic quality.
Generating Natural Language Adversarial Examples through Probability Weighted Word Saliency identifies word saliency and probability weighting as part of its approach. Its title makes the choice of influential words explicit. That connects to a step the earlier algorithm leaves underspecified: selecting which word position to edit.
The shared question is how to allocate changes across a sequence. The recurrent-network paper provides derivative information about word influence, but does not isolate the contribution of its position-selection policy. The later title points toward a more explicitly named word-selection principle. It does not establish that the same Jacobian or sign-matching dictionary rule is used.
From full internal access to restricted access
Black-box Generation of Adversarial Text Sequences to Evade Deep Learning Classifiers names the access limitation that the earlier authors identify as future work. The recurrent-network attack depends on architecture and parameter knowledge. A black-box text attack asks what can be accomplished when that information is unavailable.
This is an important change in the question being answered. Demonstrating vulnerability with full access establishes that useful attack directions exist and can be exploited. Demonstrating vulnerability with restricted access addresses whether an adversary can discover effective edits through a different information channel.
The title establishes that the later work studies adversarial text generation in a black-box setting. It does not, by itself, establish whether the method uses substitution networks, transferability, label-only queries, or another procedure. Those mechanisms should not be inferred merely because the earlier paper discusses them.
TextBugger: Generating Adversarial Text Against Real-world Applications places application-facing attacks in its title. The recurrent-network paper demonstrates its method using a locally specified classifier and a synthetic sequence task. The later work’s stated focus shifts attention towards applications encountered outside that controlled experimental construction.
That direction matters because the input boundary becomes part of the attack. Accepted text, preprocessing, output visibility, and access conditions can all affect whether a numerical perturbation becomes a usable external intervention. The earlier paper already shows why preprocessing cannot be ignored, but the citation list does not support a detailed claim about which application constraints TextBugger evaluates.
Different ways to organize the attack search
Universal Adversarial Triggers for Attacking and Analyzing NLP introduces universal triggers as the named attack object. That is a different emphasis from constructing a separate sequence of replacements for each review.
The earlier paper repeatedly edits a particular input until its prediction changes. A universal-trigger direction asks about a reusable adversarial element, as indicated by the later title. This shifts attention from local vulnerability around one example towards patterns that can matter across inputs. The title also explicitly connects attacks with analysis, echoing the usefulness of sensitivity as a way to investigate behavior.
The available citation information does not establish the later work’s trigger length, optimization procedure, task coverage, or attack success. The supported connection is the move toward reusable attack structures and the use of adversarial interventions to study a language system.
Word-level Textual Adversarial Attacking as Combinatorial Optimization gives a name to the discrete search problem that the recurrent-network paper encounters when it leaves continuous embedding space. Once each position must select from actual candidate words, the attack is choosing among combinations of discrete alternatives.
The earlier paper handles that problem with a local heuristic: compare candidate displacement signs with derivative signs, substitute a word, and continue. Framing word-level attacks as combinatorial optimization makes the discrete choice structure explicit. The later title establishes that framing, but not which optimizer is used or whether it outperforms the earlier heuristic.
Arabic Synonym BERT-based Adversarial Examples for Text Classification names a particular language, synonym-based edits, and a classification setting. Its relevance to the earlier paper’s limitation is clear at the level of the title: candidate replacements can be constrained by a linguistic relation, rather than drawn freely from a dictionary.
That does not establish that synonym substitution always preserves sentence meaning. Context can make apparently related words behave differently. The supported connection is narrower: the later title identifies a more specific replacement constraint and a language-specific attack setting, both beyond the unrestricted vocabulary substitutions evaluated in the recurrent-network paper.
Evaluation becomes an explicit research problem
On Evaluation of Adversarial Perturbations for Sequence-to-Sequence Models centers a question left unresolved by the numerical demonstration: how should success be measured when the output is itself a sequence?
The earlier paper proposes a target sequence and an acceptable distance, but its experiment remains qualitative. A complete evaluation would have to distinguish movement towards the target, preservation of unrelated outputs, and the size or validity of the input change. The later title establishes that evaluation of sequence-to-sequence perturbations becomes a subject in its own right. It does not supply particular evaluation criteria in the citation list.
Reevaluating Adversarial Examples in Natural Language similarly places assessment at the center. Its title is relevant to the distinction between forcing a classification change and preserving the interpretation that makes the new classification wrong.
That distinction is visible throughout the earlier review experiment. A dictionary-valid replacement can introduce a strong sentiment cue or damage grammar. Reconsidering natural-language adversarial examples therefore connects naturally to the question of what an attack must preserve. The citation information does not establish the later paper’s specific findings or judgments about this earlier work.
Analysis Methods in Neural Language Processing: A Survey places the paper within a broader analysis context. The Jacobian attack is both an intervention and an instrument for examining dependence: it identifies which inputs can influence which outputs, then tests that relationship through changes.
The survey title supports discussing adversarial methods alongside other ways of studying language-system behavior. It does not establish the survey’s exact taxonomy or its assessment of this paper. The conceptual connection is that a deliberately constructed failure can reveal aspects of a system’s decision process that ordinary aggregate accuracy conceals.
A different point of intervention
Weight Poisoning Attacks on Pretrained Models concerns a different intervention point, as its title indicates. The recurrent-network paper keeps learned parameters fixed and alters inputs after training. Weight poisoning instead names the learned weights as the attack object.
This makes the later citation useful for locating the earlier contribution’s boundaries. Both belong to the study of adversarial manipulation, but they do not ask the same operational question. An input attack seeks a harmful example for an existing computation; a weight-focused attack concerns changes to the computation’s parameters.
The distinction also clarifies why this paper’s threat description matters. Knowing parameters is not the same as changing them. The authors exploit access to internal information while leaving the trained network intact. Later work that names a different intervention surface broadens the adversarial setting rather than simply repeating the same attack.
Across these directions, the durable contribution is the explicit connection between sequence structure, input sensitivity, and realizable edits. The paper shows how to obtain that connection for recurrent computation and demonstrates that it can be exploited. The later titles indicate sustained attention to the questions its initial experiments leave open: linguistic constraints, discrete search, restricted access, reusable attacks, and credible evaluation.
Cite
Cite as Nicolas Papernot, Patrick Drew McDaniel, Ananthram Swami and Richard Harang. 2016. Crafting adversarial input sequences for recurrent neural networks. IEEE Military Communications Conference (MILCOM).
@inproceedings{papernot2016crafting,
title = {{Crafting adversarial input sequences for recurrent neural networks}},
author = {Nicolas Papernot, Patrick Drew McDaniel, Ananthram Swami and Richard Harang},
booktitle = {IEEE Military Communications Conference (MILCOM)},
year = {2016},
doi = {10.1109/milcom.2016.7795300},
eprint = {1604.08275},
archivePrefix = {arXiv},
url = {https://doi.org/10.1109/milcom.2016.7795300}
}This page in Markdown https://md.research.elamur.ai/free/en/papers/papernot-2016-crafting-adversarial-input-sequences-recurrent/
References
- C. Szegedy, W. Zaremba, I. Sutskever, J. Bruna, D. Erhan, I. Goodfellow, and R. Fergus, “Intriguing properties of neural networks,” in Proceedings of the 2014 International Conference on Learning Representations. 1em plus 0.5em minus 0.4em Computational and Biological Learning Society, 2014. our card
- I. J. Goodfellow et al., “Explaining and harnessing adversarial examples,” in Proceedings of the 2015 International Conference on Learning Representations. 1em plus 0.5em minus 0.4em Computational and Biological Learning Society, 2015. our card
- N. Papernot et al., “The limitations of deep learning in adversarial settings,” in Proceedings of the 1st IEEE European Symposium on Security and Privacy. 1em plus 0.5em minus 0.4em IEEE, 2016. OpenAlex ↗ · Scholar ↗
- N. Papernot, P. McDaniel, I. Goodfellow, S. Jha, and al., “Practical black-box attacks against deep learning systems using adversarial examples,” arXiv preprint arXiv:1602.02697, 2016. OpenAlex ↗ · Scholar ↗
- N. Papernot et al., “Distillation as a defense to adversarial perturbations against deep neural networks,” in Proceedings of the 37th IEEE Symposium on Security and Privacy. 1em plus 0.5em minus 0.4em IEEE, 2016. OpenAlex ↗ · Scholar ↗
- D. Warde-Farley and I. Goodfellow, “Adversarial perturbations of deep neural networks,” in Advanced Structured Prediction, T. Hazan, G. Papandreou, and D. Tarlow, Eds., 2016. OpenAlex ↗ · Scholar ↗
- P. McDaniel et al., “Machine Learning in Adversarial Settings,” IEEE Security & Privacy, vol. 14, no. 3, May/June 2016. OpenAlex ↗ · Scholar ↗
- D. E. Rumelhart, G. E. Hinton, and R. J. Williams, “Learning representations by back-propagating errors,” Cognitive modeling, vol. 5, 1988. OpenAlex ↗ · Scholar ↗
- R. Pascanu et al., “Malware classification with recurrent networks,” in IEEE ICASSP. 1em plus 0.5em minus 0.4em IEEE, 2015, pp. 1916–1920. OpenAlex ↗ · Scholar ↗
- I. Goodfellow, Y. Bengio, and A. Courville, “Deep learning,” 2016, book in preparation for MIT Press. OpenAlex ↗ · Scholar ↗
- K. P. Murphy, Machine learning: a probabilistic perspective. 1em plus 0.5em minus 0.4em MIT press, 2012. OpenAlex ↗ · Scholar ↗
- A. Krizhevsky, I. Sutskever, and G. E. Hinton, “Imagenet classification with deep convolutional neural networks,” in Advances in neural information processing systems, 2012, pp. 1097–1105. our card
- G. E. Dahl, J. W. Stokes, L. Deng, and D. Yu, “Large-scale malware classification using random projections and neural networks,” in IEEE ICASSP. 1em plus 0.5em minus 0.4em IEEE, 2013, pp. 3422–3426. OpenAlex ↗ · Scholar ↗
- D. Cireşan et al., “Multi-column deep neural network for traffic sign classification,” Neural Networks, vol. 32, pp. 333–338, 2012. OpenAlex ↗ · Scholar ↗
- C. M. Bishop, “Pattern recognition,” Machine Learning, 2006. OpenAlex ↗ · Scholar ↗
- D. A. Freedman, Statistical models: theory and practice. 1em plus 0.5em minus 0.4em Cambridge University Press, 2009. OpenAlex ↗ · Scholar ↗
- I. Goodfellow et al., “Multi-prediction deep Boltzmann machines,” in Advances in Neural Information Processing Systems, 2013, pp. 548–556. OpenAlex ↗ · Scholar ↗
- M. C. Mozer, “A focused back-propagation algorithm for temporal pattern recognition,” Complex systems, vol. 3, no. 4, pp. 349–381, 1989. OpenAlex ↗ · Scholar ↗
- P. J. Werbos, “Generalization of backpropagation with application to a recurrent gas market model,” Neural Networks, vol. 1(4), pp. 339–356, 1988. OpenAlex ↗ · Scholar ↗
- S. Hochreiter and J. Schmidhuber, “Long short-term memory,” Neural computation, vol. 9, no. 8, pp. 1735–1780, 1997. OpenAlex ↗ · Scholar ↗
- J. Bergstra, O. Breuleux, F. Bastien, P. Lamblin, and al., “Theano: a cpu and gpu math expression compiler,” in Proceedings of the Python for scientific computing conference (SciPy), vol. 4. 1em plus 0.5em minus 0.4em Austin, TX, 2010, p. 3. OpenAlex ↗ · Scholar ↗
- A. L. Maas et al., “Learning word vectors for sentiment analysis,” in Proceedings of the 49th Annual Meeting of the Association for Computational Linguistics: Human Language Technologies, Portland, Oregon, USA, 2011, pp. 142–150. our card
- G. E. Hinton, “Learning distributed representations of concepts,” in Proceedings of the eighth annual conference of the cognitive science society, vol. 1. 1em plus 0.5em minus 0.4em Amherst, MA, 1986, p. 12. OpenAlex ↗ · Scholar ↗
- G. Mesnil, X. He, L. Deng, and Y. Bengio, “Investigation of recurrent-neural-network architectures and learning methods for spoken language understanding.” in INTERSPEECH, 2013, pp. 3771–3775. OpenAlex ↗ · Scholar ↗
- M. Barreno, B. Nelson et al., “Can machine learning be secure?” in Proceedings of the 2006 ACM Symposium on Information, computer and communications security. 1em plus 0.5em minus 0.4em ACM, 2006, pp. 16–25. OpenAlex ↗ · Scholar ↗