CS5720 - Week 5
Slide 99 of 100

Understanding What CNNs Learn

Visualizing CNN Features

CNNs are often called "black boxes," but we can actually peer inside and understand what they're learning at each layer. Let's explore the fascinating world of feature visualization!
🔍 Key Insight: Early layers detect simple patterns (edges, colors), while deeper layers combine these into complex objects and concepts.
What we can visualize:

Filter weights - What patterns each filter detects
Feature maps - Network activations for specific inputs
Class activation maps - Which regions matter for predictions
Maximally activating patches - Real image regions that excite neurons most

Visualization Techniques

  • 🎯 Grad-CAM
    Class Activation Maps using gradients to highlight important regions
  • 🔬 Filter Visualization
    Visualize what patterns individual filters are looking for
  • ⚡ Activation Maximization
    Generate synthetic images that maximally activate specific neurons
  • 🔄 Feature Inversion
    Reconstruct images from feature representations

Interactive CNN Layer Explorer

Click on different layers to explore what CNNs learn at each level
Layer 1: Edge Detection
Edge Filters
Detects basic edges, lines, and simple textures
Layer 2: Textures
Texture Patterns
Combines edges into textures and simple shapes
Layer 3: Patterns
Complex Patterns
Forms more complex patterns and object parts
Layer 4: Object Parts
Object Components
Recognizes object parts like wheels, faces, etc.
Layer 5: Full Objects
Complete Objects
Detects complete objects and complex scenes
Prepared by Dr. Gorkem Kar