• Skip to main content
  • Skip to primary sidebar
  • Skip to footer
  • Core Principles of Responsible AI
    • Accountability
    • Fairness
    • Privacy
    • Safety and Security
    • Sustainability
    • Transparency
  • Special Topics
    • AI in Industry
    • Ethical Implications
    • Human-Centered Design
    • Regulatory Landscape
    • Technical Methods
  • Living Dictionary
  • State of AI Ethics
  • AI Ethics Brief
  • 🇫🇷
Montreal AI Ethics Institute

Montreal AI Ethics Institute

Democratizing AI ethics literacy

Breaking Your Neural Network with Adversarial Examples

November 18, 2020

Written by Kenny Song (@helloksong). Co-founder of Citadel AI.


Fundamentally, a machine learning model is just a software program: it takes an input, steps through a series of computations, and produces an output. In fact, all software has bugs and vulnerabilities, and machine learning is no exception.

One prominent bug – and security vulnerability – in current machine learning systems is the existence of adversarial examples. An attacker can carefully craft an input to the system to make it predict anything the attacker wants.

For example, by tweaking a few pixels in the source image, we can make a neural network think this “Stop” sign is a “120 km/hr” sign, with 99.9% confidence.

Try this demo in your browser!

Beyond misclassifying street signs, attackers could use this to:

  • Impersonate others in facial recognition systems
  • Bypass content moderation and spam filters in social networks
  • Inject adversarial bytes into malware to bypass antivirus systems

This problem is well-known in the academic community, with thousands of published papers. Yet few practitioners invest resources to defend their ML systems against these attacks. This is partially a visibility problem – most of this knowledge is locked inside research literature.

To increase awareness of these risks, I created adversarial.js, a library of adversarial attacks in JavaScript. It has an interactive demo that generates adversarial examples in your browser. No installation, no manual, just open the webpage and start playing.

Hopefully, by showcasing these attacks in an easy-to-understand way, we can help others discover this failure mode of machine learning. In particular, I hope that it motivates practitioners and real-world system owners to consider these risks & defenses.

What are the defenses? There are several proposals, such as adversarial training or admission control. Some are implemented in open-source libraries including CleverHans, Foolbox, or ART. However, no method is universal and many have proven ineffective, so work with an expert to invest in your defenses appropriately.

To learn more about adversarial examples, check out the library FAQ, or get in touch with the author. 

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

Beyond Dependency: The Hidden Risk of Social Comparison in Chatbot Companionship

AI Policy Corner: Restriction vs. Regulation: Comparing State Approaches to AI Mental Health Legislation

Beyond Consultation: Building Inclusive AI Governance for Canada’s Democratic Future

AI Policy Corner: U.S. Executive Order on Advancing AI Education for American Youth

AI Policy Corner: U.S. Copyright Guidance on Works Created with AI

related posts

  • Enough With “Human-AI Collaboration”

    Enough With “Human-AI Collaboration”

  • Building Bridges: Generative Artworks to Explore AI Ethics

    Building Bridges: Generative Artworks to Explore AI Ethics

  • Managing Human and Robots Together - Can That Be a Leadership Dilemma?

    Managing Human and Robots Together - Can That Be a Leadership Dilemma?

  • Artificial Intelligence - Application to the Sports Industry (Research summary)

    Artificial Intelligence - Application to the Sports Industry (Research summary)

  • Democratising AI: Multiple Meanings, Goals, and Methods

    Democratising AI: Multiple Meanings, Goals, and Methods

  • Research summary: On the Edge of Tomorrow: Canada’s AI Augmented Workforce

    Research summary: On the Edge of Tomorrow: Canada’s AI Augmented Workforce

  • Examining the Black Box: Tools for Assessing Algorithmic Systems (Research Summary)

    Examining the Black Box: Tools for Assessing Algorithmic Systems (Research Summary)

  • Research summary: The Wrong Kind of AI? Artificial Intelligence and the Future of Labor Demand

    Research summary: The Wrong Kind of AI? Artificial Intelligence and the Future of Labor Demand

  • Designing a Future Worth Wanting: Applying Virtue Ethics to Human–Computer Interaction

    Designing a Future Worth Wanting: Applying Virtue Ethics to Human–Computer Interaction

  • Hiring Algorithms Based on Junk Science May Cost You Your Dream Job

    Hiring Algorithms Based on Junk Science May Cost You Your Dream Job

Partners

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

  • Partnership on AI

  • The LF AI & Data Foundation

  • The AI Alliance

Footer

Categories


• Blog
• Research Summaries
• Columns
• Core Principles of Responsible AI
• Special Topics

Signature Content


• The State Of AI Ethics

• The Living Dictionary

• The AI Ethics Brief

Learn More


• About

• Open Access Policy

• Contributions Policy

• Editorial Stance on AI Tools

• Press

• Donate

• Contact

The AI Ethics Brief (bi-weekly newsletter)

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.


Archive

  • © 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.