hello and thanks for coming to watch my
virtual CHI 2020 talk on understanding
and visualizing data iteration in
machine learning to motivate the talk I
want to start with an example assume
you're building some sort of machine
learning model and you're working with
some convolutional neural network you've
imported your your data you're able to
do the data transformation and prepare
it in a way that makes sense you get
your modeling code up and running you
train it and you're presented with an
accuracy of about 81 percent on your
test data set and that doesn't quite
meet your bar in order to deploy this
model so you want to boost it up a
little bit well that's one natural
question how are we going to improve
this models performance there's a couple
of different things we could do for
example we could try different
architecture maybe this convolutional
neural network model needs some more
layers less layers or it's too
complicated we just need a simpler model
in general another thing we could do is
try to tweak some of the hyper
parameters of the the training process
or maybe some hyper parameters of the
the model architecture itself we could
also try to adjust the loss function
maybe either adding or removing some
term and seeing how that affects the the
test accuracy or maybe we really need to
reconsider this problem go to our
statistics Texas folks and and
understand a little bit more about what
this data really is but all these things
sound much too hard and I'm too lazy to
really bother to do any one of them I
wish there's just an easier way to boost
this accuracy without having to do these
complicated options and so I want to
propose an alternative which is don't
worry about those things I just
mentioned just simply add more data to
your data set and see what happens to
your test accuracy now when you do this
you actually see that you can boost your
accuracy quite a bit on the left hand
side I have this example taken from the
Charis github project I've just I just
run the the code as is but I've reduced
a number of data a little bit so on the
left hand side we have 6,000 data points
and on the right hand side we have
60,000 data points so there's a ten
times increase and you see by not
changing anything else besides the
amount of data we can get our test
accuracy all the way to 99% this sounds
silly but it actually worked you can go
and run this example yourself just as is
you don't need to do any other
modifications to the code and this is
actually resonated with the machine
learning community
here's a fake archive paper that I
thought it was pretty funny that's
titled surpassing the state-of-the-art
on image net by collecting more labels
and a couple of things in this abstract
that I find particularly funny or maybe
even more relevant is that they're able
to clean and grow the training data set
it's the primary way that they achieve
this this fake you know 100 percent
performance and they just repeat this
process until the accuracy is approved
enough and something about this
repeating and iteration process is
really interesting because this actually
happens in practice and this repetitive
process is called a data iteration so
what is it exactly a data iteration well
let's look at the high level view of
machine learning so given the world we
collected sample data sets from some
sort of phenomena that exists from those
data sets we then constructed machine
learning models now the data
visualization in HCI community isn't a
great job of producing tools to help
people do model iteration these are
things like tweaking hyper parameters
and seeing the outputs of different
types of models and selecting the best
model you want to use but there's this
whole other part of machine learning as
well namely data iteration where instead
of changing the modeling code we're
actually changing the data set we're
adding features removing features we're
removing points or maybe adding more
points from from the world and there's
really a lack of tooling around this
area which leads us to archive paper
this year about understanding and
visualizing data iteration in this
machine learning process so in the paper
we have a couple of different
contributions this first one is that
we're able to identify common data
iterations and challenges through
practitioner interviews with machine
learning researchers designers
developers and managers at Apple and
then from all those findings were able
to design develop a collection of
interactive visualizations to support
various tasks within data generation we
build all these into a tool that we call
chameleon with chameleon we then show
and present two case studies revealing
interesting things about someone's data
iteration process on to real datasets
and machine learning projects at Apple
so the rest of this talk let's go
through these contributions one by one
let's start with some of these
practitioner interviews that we did at
Apple so
with 23 different practitioners across
13 teams we're able to understand their
specific needs and challenges around
data iteration in their own work and one
thing that really stood out is that this
notion of doing data iteration to
improve performance here's one of my
favorite quotes from all these
interviews it says most the time we
improve performance more by adding
additional data or cleaning data rather
than changing the models code so besides
improving model performance whilst if
people want to do data in aeration well
data bootstraps modeling for example at
the beginning of the machine learning
project you may not have all your
training data set yet but you still need
to get started to learn something about
your domain so as you start with a small
data set and more data comes in you're
inherently doing a data iteration namely
an ad iteration on your training set in
the world changes and as the world
changes the data that we collect is
going to change with it when it comes to
data iteration frequency we saw that
developers said that their models can
change on the order from either months
or all the way down to daily but data
can actually change on the order for
months all the way to per minute so
every minute you could be getting new
points to add to your training data set
that could either be in or out of your
normal distributions and one one other
challenge that they mentioned is this
notion of entangled iterations so we've
shown that through can be both model and
data iterations but what's interesting
is that you need to make sure - you have
to separate them in order to have fair
comparison if you change your data and
your modeling code at the same time and
you get an accuracy increase you may not
know which to attribute it to so you
need to have this clear separation
between either changing your data and
retraining the model or changing your
models parameters keeping your data fix
and then retraining a model when it
comes to the common types of data
variations most developers added
something to their data set but there
was other cases of removing or modifying
things as well when it comes to addition
we see that there's there's iterations
for just adding more data instances from
some sample population sort of randomly
adding specific instances in the case of
something like class and balance adding
synthetic instances so this could be
either augmenting an existing data set
with rotation or translation
translation of different types of data
adding different labels in a supervised
machine learning case but then also
removing instances that are either
noisier have errors in them or are
outliers and then also modifying
different features or labels as well
this include things like cleaning or
editing and fixing ones data and then
lastly some of the challenges that came
up time and time again is that
developers aren't able to track their
experimental and iteration history and
because data is changing all the time
it's not quite clear when to unfreeze a
data version to include more data or
when it's time to stop collecting and
call it a day one other thing that they
happened to face a lot is doing a lot of
manual failure case analysis finding
different data points that weren't
working correctly and then having to go
back and track them all themselves and
then once they find outlier points they
build these data black lists if they
don't want to include in their model but
this all has to be doing manually and
defining different filters to filter out
these points so all those challenges led
us to build this tool that we call
chameleon and chameleon has a number of
interesting features so we're able to
retro actively track and explore data
iterations and model metrics over
different data versions and then we're
able to attribute model metric changes
to different data iterations that have
been taken and then one other
interesting thing about some of the
views within chameleon is that we're
able to understand models sensitivity
over different data iterations so just
by simply adding or removing data points
your model is going to behave in
different ways so we can find those data
points that go back and forth and change
predictions to find out how sensitive
different regions of one's data set is
and in the tool chameleons every single
feature gets one of these what we call
an overlaid diverging histogram so for
every feature we're able to encode a lot
of information in one single chart so
you can compare feature distributions by
their training and testing splits you
can do it by performance either correct
or incorrect
incorrect predictions this is above or
below the axis and then also byte data
versions which we use as color so this
pink and blue and then where they
overlap is where you had some shared
data across two different data
iterations so we have some other
visualizations in the two
as well that I briefly want to mention
we have this aggregated and betting view
which as a dimensionality reduction of
all of our data points at a particular
data iteration we also have a prediction
change matrix so here we list two
different data iterations and it shows
which data points were correct in both
versions incorrect in both versions or
the ones that had a bit more interesting
that these off diagonals where you have
some points that flipped their
prediction over different data
iterations but besides just to deter
Asians we can actually look at the
sensitivity of all data points over
every single data iteration which we
shown the sensitivity histogram on the
right so here's just a quick demo of
some of the other features of our tool
at the very top you'll see we have this
timeline of data iteration versions and
as we click on different things like
1.13 data version one point ten or even
one point eight you see all the
different views in the tool update to
reflect what your data looked like at
that particular version all these views
are linked as well so say if we click a
particular cell in the aggregated
embedding view that updates which data
is shown in the features on the right
hand side here this gives us pretty
really quick access to filter down our
data space in order to compare these
subsets within the aggregated embedding
view to the global distributions of your
entire data set the prediction change
matrix allows us to find the points that
flip predictions over data iterations
this is equivalent to splitting these
two these histograms to show either the
pink or blue directly above or below and
then the sensitivity histogram allows us
to find data points whose predictions
are changing quite a bit which tells us
that these points may be outliers really
hard to learn and maybe you should think
about adding more data within their
particular feature range so to sum up I
want to present just these two case
studies quickly and some of the findings
and learnings we had by showing
chameleons working on real data sets
collected in the wild so for this first
case study it's on a sensor prediction
task which has about 64,000 instances
collected over two months and each data
point has about 20 features now one
thing that was really interesting when
the developers of this project used our
tool in their own data was that
visualization was able to challenge
their prior data collection beliefs so
for example in the chart below we see
that this
feature is relatively steep in
long-tailed and there's a slight bimodal
distribution going on here too now the
developers knew that their data was
bimodal but they didn't know how steep
this first part of the the graph was so
there's much more points on the
left-hand side around the value of 0
than there are in the the second smaller
hump that comes up later
further down the feature range so this
was something that visualization was
able to show them immediately but not
only that over data iterations as we
move from left to right we see that this
features distribution really solidifies
over time and the shape doesn't move a
whole lot
now this helped them you know understand
both that's the data features shape is a
bit more drastic than they thought
originally but they were also sort of
relieved to know that the distribution
wasn't changing greatly over time and
that it really solidifies to a
particular bimodal shape in a second
case study we have about 48,000
instances from a user's logs collect
over six months in each data point is
about 34 features and one thing if we
get down to this instance level analysis
that chameleon really promotes and
encourages is that the developers here
were really interested in the
aggregating embedding view there was a
lot of smaller clusters and when they
would click on one of the points it
would of course filter the different
views and this helped him inspect the
performance across features which was
something that was really important to
them because they had a very strong
understanding of what their domain and
data set was but they didn't always know
how it fit into the global distributions
one thing that was also really
interesting and in this case study is
that halfway through their modeling
process they actually changed the
modeling code at one point in between
two data iterations and that was
immediately captured in our tool so in
between two particular data iterations
there was a steep drop-off in the
accuracy because of that modeling code
changed and they're able to use
chameleons to inspect that a bit more
detailed ly with it with a data first
focus so to sum up on what I've just
list a few opportunities for future
machine learning iteration tools so
we've shown that there's existing work
on model iteration and this is one of
the first works really promoting day
generation but these two things go hand
in hand in practice so there needs to be
interfaces that can handle both data and
model iterations jointly we also think
that data iteration tooling can help
experimental handoff so by that I mean
if a new team member joins a machine
learning team or leaves they can use
chameleon or some other tool to actually
go back and have this nice rich
interactive history of what's already
been tried in the project we also think
data can be a shared connection across
user experience if you have your own
data and you know it well you still
maybe want to use machine learning so if
we can actually promote data as the
primary object to be modifying changing
and adding to to boost performance it
can actually incorporate a lot more
people in the machine learning process
besides just these expert machine
learning users another interesting area
for future work is visualizing
probabilistic labels from different
techniques like data programming where
if you add new data points or you add a
labeling function you get new labels and
you want a way to visualize and track
those labels update over time and tools
like chameleon could be really well
adapted to this problem and then lastly
one limitation of this work is that we
are doing it primarily on numeric and
tabular data but there can be a lot of
opportunity to extend these these
histograms these feature histograms to
other types of data like images or even
text data and with that I want to thank
you all for watching this talk and the
bottom right here I've put a URL if you
go there you'll find all the materials
of the paper the PDF some other video
demos and recording of this talk as well
so thank you all for your attention and
I'm happy to take questions and you can
find my email at the link below