Real-Time Adversarial Attacks

Yuan Gong, Boyang Li, Christian Poellabauer, Yiyu Shi

TL;DR

Most adversarial attacks are "offline," requiring a complete data sample before generating a perturbation. This research introduces a framework for real-time adversarial attacks on streaming data (like live speech or stock feeds) by using imitation learning to predict optimal perturbations for future data points based only on past observations.

What Problem Does This Paper Address?

Adversarial attacks—small, intentional perturbations that cause machine learning models to fail—have traditionally been studied in static contexts. For example, an attacker takes a full image or a recorded audio file, calculates a "noise" pattern, and applies it.

However, many real-world systems operate on streaming input. In a live speech recognition system or a high-frequency trading algorithm, data arrives continuously. An attacker faces a fundamental dilemma: to design the "perfect" attack, they need to see the whole sample, but by the time the sample is finished, it’s too late to modify it. This paper tackles the observation-action trade-off: how can an attacker use partial, past observations to generate effective perturbations for future, unobserved data points in real-time?

Conceptual framework of the real-time adversarial attack.

Methods

The authors frame the problem as a Partially Observable Decision Process and solve it using Imitation Learning (specifically, behavior cloning).

  1. The Expert: Since training a Reinforcement Learning (RL) agent from scratch is difficult due to "sparse rewards" (you only know if the attack worked at the very end), the authors first use a non-real-time "expert" algorithm. This expert has the luxury of seeing the whole data sample and uses standard optimization (like Differential Evolution) to find the best possible perturbation.
  2. The Generator: The authors then train a deep neural network—the real-time adversarial generator—to mimic the expert.
  3. Architecture: The generator uses an RNN-based encoder-decoder structure.
  4. Encoder: A Long Short-Term Memory (LSTM) network that processes the variable-length stream of past data points into a fixed-dimensional internal state.
  5. Decoder: A series of dense layers that take that state and predict the optimal action (e.g., when to emit a noise segment).
RNN-based encoder-decoder architecture for perturbation generation.
  1. On-the-fly Execution: During an actual attack, the generator continuously updates its "best guess" for the future perturbation as more data arrives.

Datasets

The primary case study focuses on audio attacks using the Speech Commands Dataset (Warden, 2018).

  • Content: 1-second audio clips of 10 keywords (e.g., "yes", "no", "up", "down").
  • Target Model: A CNN-based voice command recognition system (a standard TensorFlow example) achieving 88.7% accuracy.
  • Task: The attacker tries to make the model misclassify the spoken word by playing a short, barely noticeable noise segment over the air.

Key Insights and Ideas

  • Predicting the Unobservable: The core "aha" moment is that natural data (like speech) follows predictable distributions. Even if the attacker hasn't heard the end of a word, the beginning of the word contains enough information to "forecast" what the optimal adversarial noise should look like for the remaining part.
  • Solving Sparse Rewards: By using imitation learning, the authors bypass the instability of traditional RL. They turn a complex temporal optimization problem into a supervised learning problem: "Given this partial audio, what would the all-knowing expert do?"
  • The Timing Strategy: Instead of just changing the shape of the noise, the real-time model learns the best timing to inject pre-defined noise segments. It waits for the "informative" part of the speech signal to make its move, often ignoring silent periods at the start of a clip.

Key Results

  • Attack Success: The real-time attack achieved a success rate of up to 43.5% (at a perturbation scale of 1.0).
  • Efficiency vs. Optimality: While 43.5% is lower than the offline expert's 90.5%, it is significantly more effective than random noise.
  • Generalization: The model performed consistently on a "test set" of audio samples it had never seen before, proving that the generator learned general features of speech rather than just memorizing specific clips.
  • Speed: Because the attack relies on a single forward pass of a neural network, the computational delay is negligible, making it truly viable for real-time hardware implementation.

Limitations and Future Work

  • The Performance Gap: There is still a roughly 50% gap in success rate between the real-time model and the offline expert. The authors suggest that more advanced RL techniques (like DAgger) could help close this.
  • Physical Environment: The study primarily simulates the attack. In a real room, factors like echoes (reverberation) and distance (attenuation) would make the attack harder.
  • Defense: The paper focuses entirely on the offensive side. The authors note that developing defenses specifically for streaming-based adversarial threats is a critical next step for securing voice-activated and financial systems.

Summary updated

BibTeX
@inproceedings{gong2019real,
  author = {Yuan Gong and Boyang Li and Christian Poellabauer and Yiyu Shi},
  title = {{Real-Time Adversarial Attacks}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2019},
  doi = {10.24963/ijcai.2019/649},
}
Figure