Advanced Data Visualization - Scientific Computing and ... · Visual representation of the...

50
CS 6965 Spring 2018 Prof. Bei Wang Phillips University of Utah Advanced Data Visualization Lecture 10

Transcript of Advanced Data Visualization - Scientific Computing and ... · Visual representation of the...

Page 1: Advanced Data Visualization - Scientific Computing and ... · Visual representation of the input-output mapping of the network Visualizing alternative structures and their performance

CS 6965Spring 2018

Prof. Bei Wang PhillipsUniversity of Utah

Advanced Data Visualization

Lecture 10

Page 2: Advanced Data Visualization - Scientific Computing and ... · Visual representation of the input-output mapping of the network Visualizing alternative structures and their performance

Announcement

Guest lectures next week! Comments, suggestions on topics, etc.

Page 3: Advanced Data Visualization - Scientific Computing and ... · Visual representation of the input-output mapping of the network Visualizing alternative structures and their performance

Decision Tree, Deep Learning and Vis

HD

Page 4: Advanced Data Visualization - Scientific Computing and ... · Visual representation of the input-output mapping of the network Visualizing alternative structures and their performance

Decision Tree in a nutshell

Page 5: Advanced Data Visualization - Scientific Computing and ... · Visual representation of the input-output mapping of the network Visualizing alternative structures and their performance

http://www.r2d3.us/visual-intro-to-machine-learning-part-1/By Tony Chu at noodle.io

Page 6: Advanced Data Visualization - Scientific Computing and ... · Visual representation of the input-output mapping of the network Visualizing alternative structures and their performance

Decision tree on a high-levelThe notion of a contingency table: like 1D, 2D and 3D histograms

http://www.cs.cmu.edu/~./awm/tutorials/dtree.html2D contingency table

Page 7: Advanced Data Visualization - Scientific Computing and ... · Visual representation of the input-output mapping of the network Visualizing alternative structures and their performance

3D contingency table

http://www.cs.cmu.edu/~./awm/tutorials/dtree.html

Goal: avoid manually looking at contingency tablesFor example, 100 variables, 161700 tables…Instead, using information theory to decide whether a pattern is interesting, such as entropy or information gain

Page 8: Advanced Data Visualization - Scientific Computing and ... · Visual representation of the input-output mapping of the network Visualizing alternative structures and their performance

Is a pattern interesting?

http://www.cs.cmu.edu/~./awm/tutorials/dtree.html

Finding the attribute with the highest information gain

Page 9: Advanced Data Visualization - Scientific Computing and ... · Visual representation of the input-output mapping of the network Visualizing alternative structures and their performance

Information Gain

http://www.cs.cmu.edu/~./awm/tutorials/infogain11.pdf

Page 10: Advanced Data Visualization - Scientific Computing and ... · Visual representation of the input-output mapping of the network Visualizing alternative structures and their performance

Entropy

http://www.cs.cmu.edu/~./awm/tutorials/infogain11.pdf

Page 11: Advanced Data Visualization - Scientific Computing and ... · Visual representation of the input-output mapping of the network Visualizing alternative structures and their performance

Conditional entropy

http://www.cs.cmu.edu/~./awm/tutorials/infogain11.pdf

Page 12: Advanced Data Visualization - Scientific Computing and ... · Visual representation of the input-output mapping of the network Visualizing alternative structures and their performance

Information Gain

http://www.cs.cmu.edu/~./awm/tutorials/infogain11.pdf

Page 13: Advanced Data Visualization - Scientific Computing and ... · Visual representation of the input-output mapping of the network Visualizing alternative structures and their performance

Learning a decision tree

http://www.cs.cmu.edu/~./awm/tutorials/dtree.html

Page 14: Advanced Data Visualization - Scientific Computing and ... · Visual representation of the input-output mapping of the network Visualizing alternative structures and their performance

Decision tree on a high-level

Tree structureUsing the notion of entropy or information gain to choose which dimension to splitRecurse

http://www.cs.cmu.edu/~./awm/tutorials/dtree.html

Page 15: Advanced Data Visualization - Scientific Computing and ... · Visual representation of the input-output mapping of the network Visualizing alternative structures and their performance

Learn more on decision tree

Youtube, e.g. https://www.youtube.com/watch?v=eKD5gxPPeY0Decision tree tutorials

By Avinash Kak: https://engineering.purdue.edu/kak/Tutorials/DecisionTreeClassifiers.pdfBy Andrew Moore:

http://www.cs.cmu.edu/~./awm/tutorials/dtree.htmlhttp://www.cs.cmu.edu/~./awm/tutorials/infogain11.pdf

Page 16: Advanced Data Visualization - Scientific Computing and ... · Visual representation of the input-output mapping of the network Visualizing alternative structures and their performance

Deep Learning & Vis

Page 17: Advanced Data Visualization - Scientific Computing and ... · Visual representation of the input-output mapping of the network Visualizing alternative structures and their performance

The goal of this lecture

Not a complete overview of neural networks or deep learningBut rather a high level view of the technique and its connection to visualization

Page 18: Advanced Data Visualization - Scientific Computing and ... · Visual representation of the input-output mapping of the network Visualizing alternative structures and their performance

Deep learning tutorial

http://neuralnetworksanddeeplearning.com/http://deeplearning.stanford.edu/tutorial/http://www.deeplearningbook.org/And many more…

Page 19: Advanced Data Visualization - Scientific Computing and ... · Visual representation of the input-output mapping of the network Visualizing alternative structures and their performance

TensorFlow

TensorFlow programming environment:https://www.tensorflow.org/get_started/get_started_for_beginnershttps://www.tensorflow.org/get_started/premade_estimators

Page 20: Advanced Data Visualization - Scientific Computing and ... · Visual representation of the input-output mapping of the network Visualizing alternative structures and their performance

Multi-Layer Neural Network

in a nutshellA review based on materials from UFLDL Tutorial and Michael Nielsen

http://neuralnetworksanddeeplearning.com/http://ufldl.stanford.edu/tutorial/

Page 21: Advanced Data Visualization - Scientific Computing and ... · Visual representation of the input-output mapping of the network Visualizing alternative structures and their performance

A single neuron

http://ufldl.stanford.edu/tutorial/supervised/MultiLayerNeuralNetworks/

Page 22: Advanced Data Visualization - Scientific Computing and ... · Visual representation of the input-output mapping of the network Visualizing alternative structures and their performance

A Neural Network

http://ufldl.stanford.edu/tutorial/supervised/MultiLayerNeuralNetworks/

bias unit

Page 23: Advanced Data Visualization - Scientific Computing and ... · Visual representation of the input-output mapping of the network Visualizing alternative structures and their performance

A Neural Network

http://neuralnetworksanddeeplearning.com/chap1.html

Page 24: Advanced Data Visualization - Scientific Computing and ... · Visual representation of the input-output mapping of the network Visualizing alternative structures and their performance

Forward propagation

http://ufldl.stanford.edu/tutorial/supervised/MultiLayerNeuralNetworks/

Multiplying input with weights and add bias before applying activation function at each node

Page 25: Advanced Data Visualization - Scientific Computing and ... · Visual representation of the input-output mapping of the network Visualizing alternative structures and their performance

Learning with gradient descent

http://neuralnetworksanddeeplearning.com/chap1.html

Cost functionx: inputy(x): approximatew: collection of all weightsb: all the biasesn: total number of training inputsa: the vector of outputs from the network when x is input

Page 26: Advanced Data Visualization - Scientific Computing and ... · Visual representation of the input-output mapping of the network Visualizing alternative structures and their performance

Learning with gradient descent

http://neuralnetworksanddeeplearning.com/chap1.html

Page 27: Advanced Data Visualization - Scientific Computing and ... · Visual representation of the input-output mapping of the network Visualizing alternative structures and their performance

Back propagation Algorithm

Back propagation algorithm: gives an efficient way to compute these partial derivatives.http://ufldl.stanford.edu/tutorial/supervised/MultiLayerNeuralNetworks/

Cost function with a single training example:

Cost function with m training examples:

Page 28: Advanced Data Visualization - Scientific Computing and ... · Visual representation of the input-output mapping of the network Visualizing alternative structures and their performance

Feature convolution

http://ufldl.stanford.edu/tutorial/supervised/MultiLayerNeuralNetworks/

Page 29: Advanced Data Visualization - Scientific Computing and ... · Visual representation of the input-output mapping of the network Visualizing alternative structures and their performance

Pooling

Aggregate statistics of convolved features at various locationshttp://ufldl.stanford.edu/tutorial/supervised/Pooling/

Page 30: Advanced Data Visualization - Scientific Computing and ... · Visual representation of the input-output mapping of the network Visualizing alternative structures and their performance

Pooling

Aggregate statistics of convolved features at various locationshttp://ufldl.stanford.edu/tutorial/supervised/Pooling/

Page 31: Advanced Data Visualization - Scientific Computing and ... · Visual representation of the input-output mapping of the network Visualizing alternative structures and their performance

Convolutional Neural Network

A CNN consists of an input and an output layer, as well as multiple hidden layers. The hidden layers of a CNN typically consist of convolutional layers, pooling layers, fully connected layers and normalization layers

Page 32: Advanced Data Visualization - Scientific Computing and ... · Visual representation of the input-output mapping of the network Visualizing alternative structures and their performance

Stochastic Gradient Descent

http://ufldl.stanford.edu/tutorial/supervised/OptimizationStochasticGradientDescent/

Page 33: Advanced Data Visualization - Scientific Computing and ... · Visual representation of the input-output mapping of the network Visualizing alternative structures and their performance

Visualization for Deep Learning

Page 34: Advanced Data Visualization - Scientific Computing and ... · Visual representation of the input-output mapping of the network Visualizing alternative structures and their performance

Topics

Directly visualizing the activations and parameters in intuitive aggregatesVisualizing weights as featuresVisualizing gradient aggregates during trainingImproving interpretability of networksLocalizing “responsibility” in the network for particular outputsSensitivity/stability of network behaviorVisualizing loss function geometry and the trajectory of the gradient descent processVisual representation of the input-output mapping of the networkVisualizing alternative structures and their performanceMonitoring/debugging the training process, i.e to detect saddle points or local optima, saturation unitsVisualizing distributed training methods across a clusterUsing animation in network visualizationInteractive visualizations for exploration or parameter tuningSoftware architectures for effective visualizationVisualization and interaction user interfaces

https://icmlviz.github.io/icmlviz2016/

Page 35: Advanced Data Visualization - Scientific Computing and ... · Visual representation of the input-output mapping of the network Visualizing alternative structures and their performance

Visualizing the inner workings of neurons

Page 36: Advanced Data Visualization - Scientific Computing and ... · Visual representation of the input-output mapping of the network Visualizing alternative structures and their performance

http://playground.tensorflow.org/

Page 37: Advanced Data Visualization - Scientific Computing and ... · Visual representation of the input-output mapping of the network Visualizing alternative structures and their performance

Deep Vis

http://yosinski.com/deepvis#toolbox

Page 38: Advanced Data Visualization - Scientific Computing and ... · Visual representation of the input-output mapping of the network Visualizing alternative structures and their performance

NguyenYosinskiClune2016

Multifaceted Feature Vis

Uncovering the Different Types of Features Learned By Each Neuron in Deep Neural Networks

Page 39: Advanced Data Visualization - Scientific Computing and ... · Visual representation of the input-output mapping of the network Visualizing alternative structures and their performance

NguyenYosinskiClune2016

Page 40: Advanced Data Visualization - Scientific Computing and ... · Visual representation of the input-output mapping of the network Visualizing alternative structures and their performance

Visualizing the Data flow of DL algorithms

Page 41: Advanced Data Visualization - Scientific Computing and ... · Visual representation of the input-output mapping of the network Visualizing alternative structures and their performance

Data flow graphA data flow graph (DFG) is a graph which represents a data dependancies between a number of operations.

http://bears.ece.ucsb.edu/research-info/DP/dfg.html

Page 42: Advanced Data Visualization - Scientific Computing and ... · Visual representation of the input-output mapping of the network Visualizing alternative structures and their performance

Dataflow graph in TensorFlowA TensorFlow model is a data flow graph that represents a computation.Nodes in the graph represent various operations: addition, matrix multiplication, summary variable operations for storing model parameters, etc. Edges in TensorFlow:

Data dependency edges represent tensors, or multidimensional arrays, that are input and output data of the operations. Reference edges, or outputs of variable operations, represent pointers to the variable rather than its valueControl dependency edges do not represent any data but indicate that their source operations must execute before their tail operations can start.

Page 43: Advanced Data Visualization - Scientific Computing and ... · Visual representation of the input-output mapping of the network Visualizing alternative structures and their performance

Simplifying data flow graph

Given a low-level directed data flow graph of a model as input, produce an interactive visualization that shows the high-level structure of the model.Enables user to explore its nested structure on demand.

WongsuphasawatSmilkovWexler2018

Page 44: Advanced Data Visualization - Scientific Computing and ... · Visual representation of the input-output mapping of the network Visualizing alternative structures and their performance

WongsuphasawatSmilkovWexler2018

Page 45: Advanced Data Visualization - Scientific Computing and ... · Visual representation of the input-output mapping of the network Visualizing alternative structures and their performance

Techniques employed

Overview: a clustered graph by grouping nodes based on their hierarchical namespacesExploration: edge bundling that supports expansion of clustersDeclutter: heuristics to extract non-critical nodesDetect and highlight repeated structuresOverlay the graph with additional quantitative information to help developers inspect their models.

WongsuphasawatSmilkovWexler2018

Page 46: Advanced Data Visualization - Scientific Computing and ... · Visual representation of the input-output mapping of the network Visualizing alternative structures and their performance

Learn more on deep learning

Stanford deep learning tutorial:http://deeplearning.stanford.edu/tutorial/http://neuralnetworksanddeeplearning.com/

Page 47: Advanced Data Visualization - Scientific Computing and ... · Visual representation of the input-output mapping of the network Visualizing alternative structures and their performance

Further Reading

Workshop on Visualization for Deep Learninghttp://icmlviz.github.io/https://icmlviz.github.io/icmlviz2016/

WongsuphasawatSmilkovWexler2018

Page 48: Advanced Data Visualization - Scientific Computing and ... · Visual representation of the input-output mapping of the network Visualizing alternative structures and their performance

Thanks!You can find me at: [email protected]

Any questions?

Page 49: Advanced Data Visualization - Scientific Computing and ... · Visual representation of the input-output mapping of the network Visualizing alternative structures and their performance

Vector Icons by Matthew Skiles

Presentation template designed by Slidesmash

Photographs by unsplash.com and pexels.com

CREDITSSpecial thanks to all people who made and share these awesome resources for free:

Page 50: Advanced Data Visualization - Scientific Computing and ... · Visual representation of the input-output mapping of the network Visualizing alternative structures and their performance

Presentation DesignThis presentation uses the following typographies and colors:

Colors used

Free Fonts used:http://www.1001fonts.com/oswald-font.html

https://www.fontsquirrel.com/fonts/open-sans