TL;DR
Understanding why deep neural networks make specific predictions is crucial but challenging, especially with industry-scale models and data. This paper introduces ACTIVIS, an interactive visualization system that tightly integrates model architecture, instance selection, and neuron activation views to help users explore and interpret these complex models at both individual instance and subset levels.
What Problem Does This Paper Address?
Deep learning models have achieved remarkable accuracy, but their "black box" nature makes it difficult to understand why they make certain predictions. This lack of interpretability is a significant hurdle, especially in industry where understanding model behavior is critical for debugging, trust, and improvement. Existing visualization tools often struggle with the sheer scale of industry datasets and the complexity of modern deep neural network architectures. They also tend to focus on either instance-level or subset-level analysis, but not both simultaneously, limiting a comprehensive understanding.
Methods
ACTIVIS tackles this problem by offering a unified approach to model exploration through several key components:
- Integrated Views: ACTIVIS combines three core views:
- Computation Graph Overview: Visualizes the model's architecture, allowing users to navigate and select specific layers or operations of interest.
- Neuron Activation Panel: This panel contains two sub-views:
- Neuron Activation Matrix: Displays neuron activations for selected instances, subsets, or classes. This view allows for direct comparison of activation patterns.
- Projected View: Uses t-SNE to provide a 2D projection of instance activations, helping users visualize clusters and relationships between instances.
- Instance Selection Panel: Summarizes prediction results for instances, highlighting correctly classified and misclassified ones, and allowing users to select instances to add to the activation views.
- Instance and Subset Exploration: ACTIVIS supports both:
- Instance-based exploration: Users can select individual instances to examine their specific activation patterns.
- Subset-based exploration: Users can define custom subsets of instances based on various criteria (features, labels, textual content, etc.). ACTIVIS then computes average activations for these subsets, enabling higher-level analysis and comparison.
- Scalability and Flexibility: The system is designed to handle industry-scale data and models. It achieves this through:
- Selective Precomputation: Users can specify which variable nodes (layers/operations) are of primary interest, reducing computational overhead.
- User-Guided Sampling: For massive datasets, ACTIVIS presents a sample of instances, with options for users to guide the sampling process.
- Modular Design: ACTIVIS is deployed on Facebook's machine learning platform (FBLearner Flow) with a flexible API, allowing developers to integrate it with their models with minimal code changes.
Datasets
The paper uses the public TREC question answering data collections for training and evaluating their word-level convolutional neural network (CNN) model. This dataset consists of 5,500 question sentences, each labeled with one of six categories.
Key Insights and Ideas
- Unifying Instance and Subset Analysis is Crucial: The authors found that users benefit immensely from being able to compare individual instances alongside subsets of instances. This allows for both detailed inspection and broader pattern recognition.
- Model Architecture as an Entry Point: Presenting the computation graph first acts as a vital entry point for users to understand complex models before diving into specific activations. This is particularly important for users unfamiliar with the model's internal workings.
- The Power of Comparison: Simply visualizing activations for a single instance is often insufficient. The ability to compare activations across multiple instances and subsets is key to uncovering meaningful patterns and identifying causes for misclassification.
- Flexibility in Subset Definition: The ability for users to define subsets using a wide range of criteria (raw data attributes, labels, textual content, output scores, predicted labels) is essential for tailoring analysis to specific tasks and data types.
Key Results
The paper presents a deployed system, ACTIVIS, which has been used by researchers and engineers at Facebook. Case studies and usage scenarios highlight how ACTIVIS helps users:
- Identify causes of misclassification: By comparing activation patterns of correctly classified vs. misclassified instances.
- Understand model behavior: By observing how activation patterns change across different layers of the network.
- Discover informative patterns: For example, identifying neurons that are highly activated by specific subsets of data.
- Debug models: By spotting unusual activation patterns, such as neurons that are never activated.
While specific quantitative results (e.g., accuracy improvements) are not the primary focus, the qualitative feedback from users indicates that ACTIVIS significantly aids their model interpretation workflows.
Limitations and Future Work
- Limitations:
- The initial versions of ACTIVIS were either too overwhelming (version 2) or lacked comparison capabilities (version 1). The current version addresses these, but the iterative process highlights the challenges of scaling visualizations.
- While the system is designed for flexibility, supporting all possible model architectures and data types remains an ongoing challenge.
- Future Work:
- Visualizing Gradients: Extending ACTIVIS to visualize gradients, which represent backward data flow, could provide further insights into model performance and debugging.
- Real-time Subset Definition: Improving the speed of subset definition and instance selection for dynamic filtering.
- Automatic Subset Discovery: Developing methods to automatically suggest interesting subsets for users to explore.
- Support for Input-Dependent Models: Extending the system to handle models where the number of neurons changes based on input (e.g., variable-length text inputs).
- Longitudinal Studies: Conducting further studies to understand the long-term impact of ACTIVIS on model training and workflows.
Summary updated