ML Visualization NeurIPS Tutorial
ML Visualization NeurIPS Tutorial
(Image: Wikipedia)
Florence Nightingale (1858)
These charts led to the
adoption of better hygiene /
sanitary practices in military
medicine, saving millions of
lives.
(Image: Wikipedia)
W. E. B. Du Bois (1900)
For 1900 World's Fair, a
compendium of
visualizations. Many new
chart types!
Excellent example of
visualization aimed at
political change.
(Quartz)
What do these have in common?
Using special properties of the visual system to help us think.
What do these have in common?
Using special properties of the visual system to help us think.
On computer
● Interactive exploration
How do visualizations work?
Find visual encodings that
● Guide viewer's attention
● Communicate data to the viewer
● Let viewer calculate with data
On computer
● Interactive exploration
Encodings: some examples
32.1
59.7
20.8
32.1
59.7
20.8
32.1
59.7
20.8
32.1
59.7
20.8
Conclusions:
● Rainbow scales: bad
● There is no “best” scale
Practically speaking...
When in doubt, use the "Color Brewer" site:
http://colorbrewer2.org
Color Shape
Layering & separation
after Tufte
Layering & separation
after Tufte
Theory: calculation
Calculation
Example: we naturally average sizes.
“Seeing Sets: Representation by Statistical Properties.” Dan Ariely (2001)
Calculation
We can do weighted averages, too!
Example
Calculation
Hertzsprung-Russell diagram (via Wikipedia)
Source: Wikipedia
How do visualizations work
- on computers?
How do visualizations work
- on computers?
Beyond static representations
● Interaction
● Conversation and collaboration
Theory: interaction
Shneiderman “mantra”:
(1996: “The Eyes Have It: A Task by Data Type
Taxonomy for Information Visualizations”)
● Overview first
● Zoom and filter
● Details on demand
Theory: interaction
Shneiderman “mantra”:
(1996: “The Eyes Have It: A Task by Data Type
Taxonomy for Information Visualizations”)
● Overview first
● Zoom and filter
● Details on demand
On computer
● Interactive exploration
Some common techniques
That could help in the ML context…
Drought’s Footprint
Haeyoun Park, Kevin Quealy
NY Times
Data
faceting
Vis Opportunities
TensorBoard Visdom
But: Way easier to inspect what’s going on in artificial classifiers than in human
classifiers ;-)
Since these are visual systems, it's natural to use visualization to inspect them
- What features are these networks really using?
- Do individual units have meaning?
- What roles are played by different layers?
- How are high-level concepts built from low-level ones?
Saliency maps - examples
Gray: trying to maximize neural response. Colorful squares: maximal examples from an image data set
Visualizing and Understanding Convolutional Networks
Zeiler & Fergus, 2013
Understanding Neural Networks Through Deep Visualization
Yosinski et al. , 2015
http://yosinski.com/deepvis
drawNet
Torralba
Deep Dream
deepdream
Mordvintsev, Tyka, Olah
Combining these
interpretability
ideas to create new
visualizations
Examine model
decisions
Connect decisions to
previous examples
Test alternative
decisions
Linking multiple
views...
DQNViz: A Visual
Analytics Approach
to Understand
Deep Q-Networks
Wang et al.,
VAST 2018.
4. High-dimensional data
Why high-dimensional data?
Vectors spaces are the lingua franca of much of ML these days
- Data such as images, audio, video is naturally high-dimensional
- Dense representations of discrete data (e.g. word embeddings) have had major
successes
Why is it hard? Because it's impossible
Why is it hard? Because it's impossible
Uses an adaptive sense of "distance." Translates well between geometry of high- and
low-dimensional space
Has become a standard tool, so we'll spend some time discussing how to read it.
Demo: MNIST visualization
Embedding Projector
Open Source visualization tool
Also available on Tensorboard
projector.tensorflow.org/
"Close reading" a visualization technique
What's the right way to understand
a "magic" visualization technique?
Theory
- Roughly: manifold learning combined with explicit topology
- In detail: I don't completely understand the theory!
- This note does an amazing job of extracting key bits of UMAP paper:
https://www.math.upenn.edu/~jhansen/2018/05/04/UMAP/
UMAP: New kid on the block
Comparison of UMAP (left) and t-SNE (right) from McInnes
& Healy.
For more
Let's compare in real-time on an audio data set!
Comparative Audio Analysis With Wavenet, MFCCs, UMAP,
t-SNE and PCA
(Leon Fedden)
Putting this together
The Beginner's Guide to Dimensionality Reduction
Matthew Conlen and Fred Hohman
https://idyll.pub/post/dimensionality-reduction-293e465c2a3443e8941b016d/
(just Google "Beginner's Guide to Dimensionality Reduction")
Pitfalls of high-dimensional space
Geometry of high-dimensional space holds many surprises…
Be careful about interpreting visualizations!
https://arxiv.org/abs/1611.04558
Google's Multilingual Neural Machine Translation System: Enabling Zero-Shot Translation
Melvin Johnson, Mike Schuster, Quoc V. Le, Maxim Krikun, Yonghui Wu, Zhifeng Chen, Nikhil Thorat, Fernanda Viégas,
Martin Wattenberg, Greg Corrado, Macduff Hughes, Jeffrey Dean
Training: English ← → Japanese
English ← → Korean
Japanese ← → Korean (zero shot)
Visualize internal representation ("embedding space")
Research question
What does the multi language embedding space look like?
or
like this?
<2en>
<2pt>
English
Portuguese
What do parallel sentences look like in embedding space?
(same meaning, different language)
or like this?
English
Portuguese
Interlingua?
Sentences with the same meaning mapped to similar regions regardless of language!
Distance between bridge / non-bridge sentences is inversely related to translation quality
5. Education and communication
Education & communication
for technical audiences
TensorFlow Playground
playground.tensorflow.org
GAN Lab
https://poloclub.github.io/ganlab/
Distill.pub
Editors: Carter, Olah, Satyanarayan
Görtler, Kehlbeck,
Deussen. 2018
Education & communication
for non-technical audiences
Attacking discrimination with smarter machine learning
research.google.com/bigpicture/attacking-discrimination-in-ml