DeepVisualInsight: Time-Travelling Visualization

for Spatio-Temporal Causality of Deep Classification Training

  • More case studies can be found here.

  • The complexity analysis can be found here.

  • Code implementation and replicable experiments can be found here.

  • For generalized experiments on EMNIST, we have qualitative analysis (the section of "Additional results on EMNIST dataset") and quantitative analysis.

1. Description

Understanding how the predictions of deep learning models are formed during the training process is crucial to improve model performance and fix model defects, especially when we need to investigate nontrivial training strategies such as active learning and track the root cause of unexpected training results such as performance degeneration.

In this work, we propose a time-traveling visual solution DeepVisualInsight (DVI), aiming to manifest the spatio-temporal causality while training a deep learning image classifier. The spatio-temporal causality demonstrates how the gradient-descent algorithm and various training data sampling techniques can influence and reshape the layout of learned input representation and the classification boundaries in consecutive epochs. Such causality allows us to observe and analyze the whole learning process in the visible low dimensional space. Technically, we propose four spatial and temporal properties and design our visualization solution to satisfy them. These properties preserve the most important information when (inverse-)projecting input samples between the visible low-dimensional and the invisible high-dimensional space, for causal analyses. Our extensive experiments show that compared to baseline approaches, we achieve the best visualization performance regarding the spatial/temporal properties and visualization efficiency. Moreover, our case study shows that our visual solution can well reflect the characteristics of various training scenarios, showing the good potential of DVI as a debugging tool for analyzing deep learning training processes.

2 Motivate Example

The following figures show our visualization of an adversarial training process on CIFAR-10 dataset. Each point represents a sample and each color represents a class. The colors of points represent the labels of samples, and the color of a region represent a predicted class. For example, a point in red (class cat) located in brown (class dog) territory indicates that it is labelled as cat but classified as dog. Moreover, the color shade indicates the confidence of prediction, unconfident regions (i.e. classification boundaries) are visualized as white regions. Overall, the classification region and boundaries form the classification landscape. Here, the model fitting process is visualized by the process of (1) classification boundary being reshaped and (2) those data points being pulled towards the territory of the corresponding colors.

Iteration 1

  • adversarial robustness: 51.3%

  • testing accuracy: 92.3%

Iteration 2

  • adversarial robustness: 67.8%

  • testing accuracy: 90.3%

Iteration 3

  • adversarial robustness: 68.8%

  • testing accuracy: 89.9%

Those figures show that DVI manifests

(1) the boundary reshaping process when the model is adapting new adversarial and training samples

(2) the process of trade-off being made between adversarial robustness and testing accuracy.

During adversarial training,

(1) the adversarial points are gradually pulled to their color aligned territory, while

(2) the testing point is also gradually “pulled” away from its color-aligned territory to the territory of its adversarial neighbours.

Such trade-off is formed gradually.

We further show such a trade-off exists by visualizing the dynamics of overall data points. DVI tool can further faithfully visualize the process as animation. In addition, it supports samples and iteration queries for users to observe the dynamics of interested samples and iterations, gaining deep insights into the model training process.

adversarial sample dynamics

testing sample dynamics

Adversarial Samples

Test Samples

Begin

Adversarial Samples

Test Samples

Middle

Adversarial Samples

Test samples

End

3 Tool introduction

Here we give a brief introduction to our DeepVisualInsight (DVI) tool about how to use it and how it can be beneficial to debug deep neural networks.

3.1 Terminology

  • Subject models: Models that are provided by users which we tried to visualize.

  • visualization models: For each snapshot of the subject model, we train an autoencoder to visualize it, which we named as visualization model.

In this video, we show how to set datasets, content path, resolution, buttons (how to control iterations changing over time), and visualization confidence (different measurements) in our tools.

3.2 main scene

  • background color(color shade->confidence, border->white)

  • point explanation(color, size, ), click on one point to show more information on the right bar

  • border definition, show points on the border

3.3 Points Query (i.e., filter)

  • all points: training data, testing data

  • label, is_training, (number, highlight,clear,)