• Skip to main content
  • Skip to secondary menu
  • Skip to primary sidebar
  • Skip to footer
Montreal AI Ethics Institute

Montreal AI Ethics Institute

Democratizing AI ethics literacy

  • Articles
    • Public Policy
    • Privacy & Security
    • Human Rights
      • Ethics
      • JEDI (Justice, Equity, Diversity, Inclusion
    • Climate
    • Design
      • Emerging Technology
    • Application & Adoption
      • Health
      • Education
      • Government
        • Military
        • Public Works
      • Labour
    • Arts & Culture
      • Film & TV
      • Music
      • Pop Culture
      • Digital Art
  • Columns
    • AI Policy Corner
    • Recess
    • Tech Futures
  • The AI Ethics Brief
  • AI Literacy
    • Research Summaries
    • AI Ethics Living Dictionary
    • Learning Community
  • The State of AI Ethics Report
    • Volume 7 (November 2025)
    • Volume 6 (February 2022)
    • Volume 5 (July 2021)
    • Volume 4 (April 2021)
    • Volume 3 (Jan 2021)
    • Volume 2 (Oct 2020)
    • Volume 1 (June 2020)
  • About
    • Our Contributions Policy
    • Our Open Access Policy
    • Contact
    • Donate

Research summary: Sponge Examples: Energy-Latency Attacks on Neural Networks

August 3, 2020

Summary contributed by Camylle Lanteigne (@CamLante), who’s currently pursuing a Master’s in Public Policy at Concordia University and whose work on social robots and empathy has been featured on Vox.

Link to full paper + authors listed at the bottom.


Mini-summary: Energy use can also be used for nefarious purposes through sponge examples: attacks made on an ML model to drastically increase its energy consumption during inference. Sponge examples can make an ML model’s carbon emissions skyrocket, but they can also cause more immediate harm. Increased energy consumption can significantly decrease the availability of the model, increase latency and ultimately delay operations. More concretely, autonomous vehicles undergoing a sponge attack may be unable to perform operations fast enough due to this delay, causing a vehicle to fail to break in time, leading to a collision. To defend against an adversary exploiting a sponge example, the authors suggest 1) a cut-off threshold, where the total amount of energy consumed for one inference cannot be higher than a predetermined threshold, and 2) to address delays in real-time performance which could have deadly consequences in mission-critical situations, these systems must be designed to function properly even in worst-case performance scenarios and have a fail-safe mechanism.

Full summary:

Energy use is an important and yet understudied aspect of Machine Learning (ML). Energy consumption can help us gauge the environmental impacts of ML, for one. In this paper, Shumailov et al. show how energy use can also be used for nefarious purposes through sponge examples: attacks made on an ML model to drastically increase its energy consumption during inference.  Sponge examples, of course, can make an ML model’s carbon emissions skyrocket, but they can also cause more immediate harm. Indeed, increased energy consumption can significantly decrease the availability of the model, increase latency and ultimately delay operations. More concretely, autonomous vehicles undergoing a sponge attack may be unable to perform operations fast enough due to this delay, causing a vehicle to fail to break in time, leading to a collision.

Shumailov et al. propose two hypotheses as to how sponge examples can be generated. For one, a sponge example can exploit how sparsely activated some hidden layers of the neural network are when the sum of inputs to a neuron is negative. By adding inputs that lead to more neuron activations, this increases the model’s energy used because of the larger amount of operations performed. 

Secondly, sponge examples can soak up large amounts of energy by exploiting the energy-latency gap: “different inputs of the same size can cause a deep neural network (DNN) to draw very different amounts of time and energy” (Shumailov et al., 2020). The authors use Transformer as their example — an ML model that takes words as its data. The token input size and the token output size (the number of individual words), as well as the input and output embedding spaces’ size, can be increased by a remote attacker with no access to the model’s configuration or hardware. These increases can yield non-linear increases in energy use; in other words, energy consumption goes up exponentially as token input, token output, or embedding space size increase linearly.

The paper explores three threat models. First, a white box setup, where the attacker knows the model’s parameters and architecture. Second, an interactive black box setup, where the attacker does not know the parameters and architecture of the model, but can measure the energy consumption remotely as well as the time necessary for an operation to run. Third is the clueless¹ adversary setup, where the attacker has none of the information of the two prior setups, and can only transfer sponge examples to this new model without previously having interacted with it. 

In the cases of the white box and interactive black box setups, an attacker can create a sponge example attack through genetic algorithms. In this context, a genetic algorithm would continually select for the top 10% of inputs with the highest energy consumption, these becoming the “parents” for the next “generation” of inputs. Genetic algorithms can thus help maximize the damage a sponge example attack can have by providing inputs that consume extremely high amounts of energy.

In a white box setting, an attacker can likewise launch a sponge example attack by using an L-BFGS-B algorithm to generate inputs that increase all the activation values throughout the model, forcing more operations to be undertaken and causing energy consumption to surge.

As for the clueless adversary setup, the energy consumption of hardware (CPUs, GPUs, and ASICs) can be determined without an attacker having access to the model (through calculations or through the NVIDIA Management Library, for instance). The authors perform experiments on NLP (Natural Language Processing) tasks and Computer Vision tasks to evaluate the performance of sponge examples across models, hardware, and tasks. Shumailov et al. find that sponge examples are transferable across both hardware and models in the white box setup, in the interactive black box setup, and even in the clueless adversary setup, where performing an attack is most difficult. 

To defend against an adversary exploiting a sponge example, the authors suggest two methods. First, a cut-off threshold, where the total amount of energy consumed for one inference cannot be higher than a predetermined threshold. This could prevent sponge examples from impacting the availability of the machine learning model. This, however, applies to scenarios where battery drainage is the main concern. 

To address delays in real-time performance, which could have deadly consequences in autonomous vehicles or missile targeting systems, the authors believe these systems must be designed to function properly even in worst-case performance scenarios, and perhaps be equipped with a fallback mechanism for instances where these systems fail completely.
The paper ends on a call for more research to be done regarding the carbon emissions of machine learning at the stage of inference. Most of the research done on this topic focuses on training large neural networks, but the authors highlight that inference is done much more frequently and on a larger scale than training once a model is deployed.


¹: The paper refers to this setup as the “blind adversary setup”, but in an effort to use non-ableist language, I opted for “clueless adversary setup”.

Original paper by Shumailov, I., Zhao, Y., Bates, D., Papernot, N., Mullins, R., & Anderson, R.: http://arxiv.org/abs/2006.03463

Want quick summaries of the latest research & reporting in AI ethics delivered to your inbox? Subscribe to the AI Ethics Brief. We publish bi-weekly.

Primary Sidebar

🔍 SEARCH

Spotlight

A rock embedded with intricate circuit board patterns, held delicately by pale hands drawn in a ghostly style. The contrast between the rough, metallic mineral and the sleek, artificial circuit board illustrates the relationship between raw natural resources and modern technological development. The hands evoke human involvement in the extraction and manufacturing processes.

Tech Futures: The Fossil Fuels Playbook for Big Tech: Part I

Close-up of a cat sleeping on a computer keyboard

Tech Futures: The threat of AI-generated code to the world’s digital infrastructure

The undying sun hangs in the sky, as people gather around signal towers, working through their digital devices.

Dreams and Realities in Modi’s AI Impact Summit

Illustration of a coral reef ecosystem

Tech Futures: Diversity of Thought and Experience: The UN’s Scientific Panel on AI

This image shows a large white, traditional, old building. The top half of the building represents the humanities (which is symbolised by the embedded text from classic literature which is faintly shown ontop the building). The bottom section of the building is embossed with mathematical formulas to represent the sciences. The middle layer of the image is heavily pixelated. On the steps at the front of the building there is a group of scholars, wearing formal suits and tie attire, who are standing around at the enternace talking and some of them are sitting on the steps. There are two stone, statute-like hands that are stretching the building apart from the left side. In the forefront of the image, there are 8 students - which can only be seen from the back. Their graduation gowns have bright blue hoods and they all look as though they are walking towards the old building which is in the background at a distance. There are a mix of students in the foreground.

Tech Futures: Co-opting Research and Education

related posts

  • Lanfrica: A Participatory Approach to Documenting Machine Translation Research on African Languages ...

    Lanfrica: A Participatory Approach to Documenting Machine Translation Research on African Languages ...

  • Towards Responsible AI in the Era of ChatGPT: A Reference Architecture for Designing Foundation Mode...

    Towards Responsible AI in the Era of ChatGPT: A Reference Architecture for Designing Foundation Mode...

  • An Audit Framework for Adopting AI-Nudging on Children

    An Audit Framework for Adopting AI-Nudging on Children

  • Editing Personality for LLMs

    Editing Personality for LLMs

  • Effects of ROSS Intelligence and NDAS, highlighting the need for AI regulation

    Effects of ROSS Intelligence and NDAS, highlighting the need for AI regulation

  • Can we trust robots?

    Can we trust robots?

  • AI Applications in Agriculture: Sustainable Farming

    AI Applications in Agriculture: Sustainable Farming

  • Anthropomorphism and the Social Robot

    Anthropomorphism and the Social Robot

  • Race and AI: the Diversity Dilemma

    Race and AI: the Diversity Dilemma

  • Science Communications for Explainable Artificial Intelligence

    Science Communications for Explainable Artificial Intelligence

Partners

  •  
    U.S. Artificial Intelligence Safety Institute Consortium (AISIC) at NIST

  • Partnership on AI

  • The LF AI & Data Foundation

  • The AI Alliance

Footer


Articles

Columns

AI Literacy

The State of AI Ethics Report


 

About Us


Founded in 2018, the Montreal AI Ethics Institute (MAIEI) is an international non-profit organization equipping citizens concerned about artificial intelligence and its impact on society to take action.

Contact

Donate


  • © 2025 MONTREAL AI ETHICS INSTITUTE.
  • This work is licensed under a Creative Commons Attribution 4.0 International License.
  • Learn more about our open access policy here.
  • Creative Commons License

    Save hours of work and stay on top of Responsible AI research and reporting with our bi-weekly email newsletter.