CNN 101: Interactive Visual Learning for Convolutional Neural Networks

Zijie J. Wang, Robert Turko, Omar Shaikh, Haekyu Park, Nilaksh Das, Fred Hohman, Minsuk Kahng, Duen Horng Chau

TL;DR

CNN 101 is an interactive, browser-based visualization tool designed to help beginners bridge the gap between high-level CNN architectures and low-level mathematical operations. By employing an "overview + detail" design, it allows users to see how an image transforms through a network while simultaneously diving into the specific arithmetic of convolutions, activations, and pooling.

What Problem Does This Paper Address?

While deep learning has become ubiquitous, it remains a "black box" for many students and non-experts. The authors identify a significant pedagogical gap: beginners often struggle to reconcile the abstract diagrams of neural network layers with the actual matrix calculus happening under the hood.

Existing tools often fall into two camps: they are either high-level architectural overviews that gloss over the math, or expert-facing interpretability tools (like saliency maps) that focus on what a model learned rather than how it fundamentally operates. CNN 101 aims to provide a "white-box" educational experience that explains the underlying mechanics of Convolutional Neural Networks (CNNs) in an accessible, interactive format.

Methods

The authors developed CNN 101, a web-based system built using TensorFlow.js for client-side inference and D3.js for visualization. This architecture is notable because it requires no backend server; all computations happen locally in the user's browser, making the tool highly scalable for large classrooms.

The system utilizes a hierarchical "overview-to-detail" transition:

  • Overview View: Visualizes the entire network as a series of activation heatmaps. Users can see how a "sport car" input triggers specific patterns across different layers.
  • Intermediate View: Dissects the relationship between a single neuron and its predecessors. For example, it uses animated "flowing dash-lines" to show how multiple intermediate results are summed to produce a convolutional output.
  • Detail View: Provides a pixel-level interactive analysis. Users can hover over specific pixels to see the element-wise dot product, the Rectified Linear Unit (ReLU) operation, or how Max Pooling selects the maximum value in a neighborhood.

Datasets

The tool utilizes a Tiny VGG model trained on a subset of the Tiny ImageNet dataset.

  • Scope: The authors selected 10 "everyday" classes (e.g., pizza, ladybug, school bus, sport car) to make the classification task intuitive for learners.
  • Data Volume: The training set consisted of 100,000 64×64 color images, with a validation/test set of 10,000 images.

Key Insights and Ideas

  • Visualizing the "Flatten" Layer: One of the most common points of confusion for students is how a 3D volume of activations becomes a 1D vector for final classification. CNN 101 explicitly visualizes this "hidden" unrolling process, showing exactly how spatial pixels map to class likelihoods.
  • The Power of Color Scales: By using a symmetric diverging red-to-blue colormap (where white is zero), the tool makes the effect of the ReLU activation function instantly visible. Users can see "red" (negative) pixels literally disappear as they pass through a ReLU layer.
  • Fluid Abstraction Transitions: The system is designed to prevent "context loss." When a user clicks a neuron to see the math, the transition is animated, helping the user maintain a mental model of where that specific operation fits into the broader network.
  • Democratizing Access: By moving the compute to the edge (the browser), the authors remove the hardware barrier to entry. Students don't need a GPU-enabled server to "run" and explore a deep learning model.

Key Results

  • Model Performance: The Tiny VGG model achieves a 70.8% top-1 accuracy on the 10-class test set, providing a "real-world" feel to the interactions rather than a toy example.
  • Qualitative Usage Scenarios: The paper highlights how different users (an undergraduate and a biology researcher) used the tool to independently discover neural network properties—such as how ReLU ignores negative values—through exploration rather than rote memorization.

Limitations and Future Work

  • Fixed Hyper-parameters: Currently, the tool uses fixed settings (e.g., 3x3 kernels, stride of 1). The authors plan to allow users to configure these settings in real-time to see how they affect the output.
  • Input Constraints: Users are currently limited to the provided Tiny ImageNet samples. Future versions aim to support user-uploaded images, webcam captures, and free-form drawing.
  • Empirical Evaluation: While the tool is functionally complete, the authors have yet to conduct their planned user study to quantitatively compare CNN 101’s educational effectiveness against traditional mediums like textbooks or video lectures.

Summary updated

BibTeX
@inproceedings{wang2020cnn,
  author = {Zijie J. Wang and Robert Turko and Omar Shaikh and Haekyu Park and Nilaksh Das and Fred Hohman and Minsuk Kahng and Duen Horng Chau},
  title = {{CNN 101: Interactive Visual Learning for Convolutional Neural Networks}},
  booktitle = {CHI Extended Abstracts},
  year = {2020},
  url = {https://openreview.net/forum?id=HW5BpJKqtZ},
}

Loading related content...

Figure