How kerthans/deep-learning-visual-attack works
This repository is a collection of visual-model adversarial-attack experiments. The main CartPole workflow trains a policy, saves its weights, then runs clean and perturbed episodes or compares actions on perturbed states. A separate MNIST script exercises several gradient-based and simple black-box attacks. The README also describes Pong, Breakout, and transferability research, but the available tree and sampled code do not establish implementations or wiring for those capabilities. The graph reflects the available scripts; rendering.py is an auxiliary Gym rendering layer.
Main entry points: evaluate.py Episode evaluation · evaluate-img.py Plotted evaluation · train_agent-S.py Train CartPole policy · attack.py CartPole attacks
Components 12
Policy agent
- Train CartPole policy
train_agent-S.py - Policy weights
policy_net.pth
Attack experiments
- CartPole attacks
attack.py - MNIST attacks
attack2.py
Evaluation
- Episode evaluation
evaluate.py - Plotted evaluation
evaluate-img.py - Metrics and plots
Rendering
- 2D renderer
rendering.py
Other components
- Researcher
- Gym environments
- PyTorch
- MNIST dataset
Connections 22
- Researcher → Train CartPole policy: starts training
- Train CartPole policy → Gym environments: steps environment
- Train CartPole policy → PyTorch: trains policy
- Train CartPole policy → Policy weights: saves weights
- Researcher → CartPole attacks: runs experiment
- CartPole attacks → Policy weights: loads weights
- CartPole attacks → Gym environments: tests episodes
- CartPole attacks → PyTorch: generates perturbations
- Researcher → Episode evaluation: runs evaluation
- Episode evaluation → Policy weights: loads weights
- Episode evaluation → Gym environments: steps environment
- Episode evaluation → PyTorch: scores actions
- Episode evaluation → Metrics and plots: records metrics
- Researcher → Plotted evaluation: runs evaluation
- Plotted evaluation → Policy weights: loads weights
- Plotted evaluation → Gym environments: steps environment
- Plotted evaluation → PyTorch: scores actions
- Plotted evaluation → Metrics and plots: plots results
- Researcher → MNIST attacks: runs attacks
- MNIST attacks → MNIST dataset: loads samples
- MNIST attacks → PyTorch: computes gradients
- Gym environments → 2D renderer: renders scenes