1. Introduction
Artificial intelligence (AI) and machine learning (ML) are becoming essential parts of contemporary technology, allowing for important applications in a wide range of fields. It has been shown that these systems can be fooled by adversarial attacks, which are deliberate changes to input data that can lead to highly confident but inaccurate predictions from machine learning models.
Adversarial Attacks Concept
Unlike traditional software defects or security exploits, adversarial attacks constitute a distinct class of vulnerabilities. They are especially difficult to fix because they take advantage of the underlying learning mechanisms of ML models rather than implementation errors.
Definition and Fundamental Ideas
Adversarial attacks occur when someone makes tiny changes to the input changes that are usually so small that humans can’t even notice them. These attacks show that machine learning models can sometimes be very sensitive.

High-Dimensional Geometry: In high-dimensional spaces, even small changes across different features can add up to cause wrong predictions.
Linear Behavior: Models often behave like simple linear systems in high dimensions, making them easy to fool.
Overconfidence: Models tend to be overly confident even when wrong.
2. Objective
The main objectives of this report are:
To examine how machine learning models can be tricked.
To explore various types of adversarial attacks and methodologies.
To examine useful real-world examples with code.
To outline defense tactics.
3. Importance
Studying adversarial attacks is crucial for Security Risks, Trust & Reliability, and Cybersecurity. Imagine a self-driving car misinterpreting a stop sign as a speed limit sign due to an adversarial attack — the consequences could be catastrophic.
4. Applications and Domains Affected
Adversarial attacks affect critical areas including:
Autonomous Vehicles: Misclassification of road signs.
Healthcare: Incorrect diagnoses in medical imaging.
Facial Recognition: Bypassing authentication systems.
Financial Services: Evading fraud detection.
Cybersecurity: Malware evading detection filters.
- Types of Adversarial Attacks Types of Attacks 5.1 White-box Attacks The attacker has full access to the model’s architecture and parameters.

Fast Gradient Sign Method (FGSM): Adds perturbations in the direction of the gradient to maximize loss.
Projected Gradient Descent (PGD): An iterative version of FGSM, considered one of the strongest first-order attacks.
Press enter or click to view image in full size
5.2 Black-box Attacks
The attacker has no access to internal workings and relies on query outputs.
6. Real-World Examples (Code)
Below is a simplified conceptual example of an FGSM attack using PyTorch:
import torch
import torch.nn.functional as F
def fgsm_attack(image, epsilon, data_grad):
# Collect the element-wise sign of the data gradient
sign_data_grad = data_grad.sign()
# Create the perturbed image by adjusting each pixel of the input image
perturbed_image = image + epsilon * sign_data_grad
# Clip the perturbed image to stay within valid range [0,1]
perturbed_image = torch.clamp(perturbed_image, 0, 1)
return perturbed_image
7. Evaluation and Metrics
Evaluation Metrics
Before Attack: The model correctly classifies images (e.g., ‘Tiger Shark’) with high confidence.
After Attack: With adversarial noise added, the model misclassifies the same image (e.g., as ‘Goldfish’) while the image looks identical to the human eye. The confusion matrix shows a complete drop in accuracy on the adversarial examples.
8. Conclusion
Adversarial attacks pose a substantial threat to the reliability of deep learning systems. While models have achieved remarkable success, they remain fragile to subtle manipulations. Defending against these attacks via adversarial training and robust optimization is essential for safety-critical applications.
9. References
Inspired by the Advanced Threat Detection and Mitigation Bootcamp at SVNIT. References include works by Goodfellow et al. (2015), Kurakin et al. (2016), and Carlini & Wagner (2017).
Join The Writer's Circle event
Everon Lab Blog

Top comments (0)