NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

POPQORN: Quantifying Robustness of Recurrent Neural Networks

Ching-Yun Ko, Zhaoyang Lyu, Tsui-Wei Weng, Luca Daniel, Ngai Wong, Dahua Lin

TL;DR

This paper introduces POPQORN, a novel framework for quantifying the robustness of Recurrent Neural Networks (RNNs) against adversarial attacks. Unlike previous methods limited to feed-forward networks, POPQORN provides certified lower bounds on adversarial perturbations for RNNs, including LSTMs and GRUs, offering a reliable way to assess their security.

What Problem Does This Paper Address?

Deep neural networks, despite their impressive performance, are notoriously vulnerable to adversarial attacks. A small, imperceptible perturbation to input data can cause these models to make incorrect predictions. While significant progress has been made in evaluating the robustness of feed-forward networks (like MLPs and CNNs) through methods that provide certified lower bounds on adversarial perturbations, this problem remains largely unsolved for Recurrent Neural Networks (RNNs). RNNs, crucial for sequential data processing in tasks like speech recognition and natural language processing, present unique challenges: their complex, feedback-driven architectures, the sequential nature of their inputs, and the intricate interactions within their internal gates (especially in LSTMs and GRUs) make traditional robustness quantification methods inapplicable. This paper aims to bridge this gap by developing a general framework for quantifying RNN robustness.

Methods

The core of POPQORN lies in its ability to bound the output of an RNN using two linear functions, even when the input is perturbed within an $\ell_p$ ball. This is achieved by recursively propagating linear bounds from the output layer back to the input layer. Key techniques include:

  • Linear Bounding of Non-linearities: POPQORN approximates non-linear activation functions (like sigmoid and tanh) and complex gate interactions within RNNs (e.g., in LSTMs and GRUs) using linear functions. This allows for the decoupling of these non-linearities.
  • Recursive Propagation: Starting from the output layer, the method derives upper and lower bounds for intermediate states and pre-activations. These bounds are then used to derive bounds for the subsequent layer, working backward through the network.
  • Handling Cross-Nonlinearity: For complex gates in LSTMs and GRUs, POPQORN extends the concept of linear bounding to using planes instead of lines to bound the interactions between different gate outputs and states.
  • Closed-Form Bounds: The framework ultimately provides closed-form expressions for global upper and lower bounds of the RNN's output, which are functions of the input perturbation radius ($\epsilon$).
  • Robustness Quantification Algorithm: A binary search procedure is employed to find the largest possible certified lower bound ($\epsilon$) for untargeted and targeted attacks, ensuring that the model's prediction remains correct for any perturbation within this bound.

Datasets

The paper evaluates POPQORN on the following datasets:

  • MNIST: Used for training and evaluating vanilla RNNs and LSTMs for classification tasks.
  • UIUC's CogComp QC Dataset: Used for evaluating POPQORN on LSTMs for question classification.

The paper does not introduce new datasets but applies its framework to existing benchmarks.

Key Insights and Ideas

  • RNN Robustness is Tractable: The paper demonstrates that, contrary to initial intuition, robust quantification for complex RNN architectures like LSTMs and GRUs is indeed achievable.
  • Step-wise Sensitivity: Analyzing robustness at individual time steps reveals insights into which parts of a sequential input are most critical for the model's decision. This can highlight "sensitive strokes" or words.
  • Trade-off Between Network Depth/Width and Robustness: The experiments suggest that increasing the number of hidden neurons generally improves robustness, while increasing the number of layers can sometimes decrease it, indicating a complex interplay.
  • Certified Bounds vs. Attack-Based Estimates: POPQORN provides guaranteed lower bounds on adversarial distortion, which are often significantly smaller than the upper bounds found by attack-based methods (like C&W-Ada) or uncertified scores (like CLEVER-RNN). This highlights the importance of certified guarantees.

Key Results

  • POPQORN successfully computes certified lower bounds for vanilla RNNs, LSTMs, and GRUs on MNIST and question classification tasks.
  • The certified bounds obtained by POPQORN are consistently lower than the upper bounds found by C&W-Ada attacks, demonstrating the conservative nature of certified defenses.
  • For LSTMs on MNIST, POPQORN's certified bounds generally increase with the number of hidden nodes and decrease with the number of layers.
  • In the question classification experiment, POPQORN identified sensitive words that align with human intuition about the importance of words for classification (e.g., entity names for entity classification).

Limitations and Future Work

  • Computational Cost: While POPQORN is designed to be efficient, calculating certified bounds can still be computationally intensive, especially for very deep or wide networks and longer sequences. The paper notes that calculating bounds for LSTMs with 14 frames took a full day.
  • Scope: The paper primarily focuses on RNN-based classifiers. Extending the framework to other RNN tasks (e.g., sequence generation) might require further adaptation.
  • Approximation of Non-linearities: The use of linear bounds for non-linear functions is an approximation. While effective, tighter bounds might be achievable with more sophisticated techniques.
  • Future Work: The authors suggest exploring the application of POPQORN to other RNN architectures and tasks, as well as investigating more efficient bounding techniques. The insights gained from step-wise robustness analysis could also be further leveraged.

Summary updated

BibTeX
@inproceedings{ko2019popqorn,
  author = {Ching-Yun Ko and Zhaoyang Lyu and Tsui-Wei Weng and Luca Daniel and Ngai Wong and Dahua Lin},
  title = {{POPQORN: Quantifying Robustness of Recurrent Neural Networks}},
  booktitle = {International Conference on Machine Learning},
  year = {2019},
  url = {https://openreview.net/forum?id=BJWGfiW_br},
}
Figure