[MUSIC PLAYING]
LAURENCE MORONEY: So
Christopher, welcome to "Coffee
with a Googler."
It's great to have you on.
CHRISTOPHER OLAH: Thank
you, for having me.
LAURENCE MORONEY:
So I know you are
one of the people-- you
work on Google Brain
and you're behind Distill for
great dissemination of machine
learning.
Could you tell us all about it?
CHRISTOPHER OLAH: Yeah.
So I guess maybe I'd split
it sort of into two parts.
So there's the thing
that we're doing,
and then there's how
Distill's a vehicle for that.
So often we have this idea of
there being technical debt,
right?
You can only write software, and
maybe you don't always use good
variable names, you don't
document it very well,
you don't--
you end up with all of these--
you know, you don't refactor it.
And your software
becomes hard for people
to go and build
on and work with.
I actually think a
kind of analogous thing
can happen in research where,
if we don't explain things well,
if we don't develop the right
ways for thinking about things,
it can become harder to
go and build on research.
And it sort of
becomes this mountain
of papers where
people-- and I think
people take pride in it, right?
They're like, you know,
I spent all these years
going and climbing this
mountain, and I got to the top.
And I'm going to
do more research
and build up this mountain.
But I think, often,
we actually could
have done a much
better job of making
the mountain easy to climb.
LAURENCE MORONEY: Yeah.
CHRISTOPHER OLAH:
And so what Distill
is really trying to do is to
create a vehicle where people
can do that kind of
work, and do really
amazing work of that kind,
and have it be acknowledged
as a real contribution
to the community,
and be the sort of thing that
can then help them get support
in doing more of that work.
LAURENCE MORONEY: So it
becomes like a, really,
a best of both worlds
kind of thing, right?
CHRISTOPHER OLAH: Yeah.
LAURENCE MORONEY: So very
accessible to the nonacademic
community, but it's
also referentiable--
if that's the word--
you know, something
that can be referenced
by the academic community
so you get the best of both.
CHRISTOPHER OLAH: Yeah.
Many of these things
that were already just
a better version of
scientific papers,
but they weren't
being counted as such.
And so I think Distill
is a legitimizing
vehicle that allows--
and I think we also
provide some help to people
in doing good work in this way.
So there's all this sort of
weird, bureaucratic stuff.
And we just sort of
crossed all our t's, dotted
all our i's, and set up--
Distill's also peer
reviewed --and created
this scientific journal.
Except it's a scientific journal
full of interactive diagrams
where we really--
really, if somebody's writing
in a very academic style,
we might encourage them to try
to do a little bit less of that
and subvert what a
paper is, in some sense,
and I think explore
what's possible.
LAURENCE MORONEY: Right.
I mean, I'll talk about from
my personal perspective,
and that is that I have been
out of academia for a long time.
And I've been working
in software and software
development, that kind of stuff.
But as I've been getting into
machine learning, of course
I have to start reading
more and more papers.
And as I'm reading
those papers, as soon
as I start getting into
mathematical notation,
and sigmas, and phis, and that
kind of stuff, part of my brain
begins to go to sleep.
And it's not that I
don't understand it,
it's just so alien to me.
It's so long in the past.
And you used the
image of a mountain.
And it's like I used to be
kind of 3/4 of the way up
the mountain.
Now, I'm just in the foothills.
And it's a lot of effort
to get climbing again.
So with something
like Distill and what
you've been doing
with Distill has
been great for
me, personally, so
that I can start
really beginning
to grasp some of the concepts.
And speaking of those concepts,
another thing you've been
working on is Lucid, right?
So I know you're using
Distill to disseminate Lucid.
Could you tell us a
little bit about that?
CHRISTOPHER OLAH: Yeah.
So I think a lot of this really
traces back to Deep Dream,
or maybe even a
little bit further.
There's a lot of people, but
there's a small cluster of us
who've working together
who've been very
interested for a
number of years in know
how do neural
networks really work
and how can humans
understand these really
complicated systems?
And a couple years ago,
we had these really
exciting results where we--
we came up with all
these techniques
for visualizing, what do neural
networks think are interesting?
LAURENCE MORONEY: What
do they really see?
CHRISTOPHER OLAH: Yeah.
Really, I think the right way
to think about those images
is they're trying to make
the most interesting image
for a network as possible.
And so it gets filled with
all those sorts of things
the network finds very
interesting in some sense,
that activates it.
And so it gets full of dog
slugs and who knows what else.
And it's a lot of fun.
And it's even become
this artistic movement.
There was this event at
the Gray Area Foundation
where people were
auctioning off art
that was made with Deep Dream.
And I was like, whoa.
LAURENCE MORONEY: This is great.
CHRISTOPHER OLAH: This
thing that I was involved in
is like--
there's real artists who
are doing things, which is--
LAURENCE MORONEY: I hope
you have some of those.
[LAUGHTER]
CHRISTOPHER OLAH: They were all
too expensive for me to buy.
So Deep Dream, I think
part of what's exciting
about it is all this art.
And I think we were
really excited or really
lucky to see this-- and there's
all these amazing videos.
But in addition to
that, I think we--
it was also really an
attempt to understand what's
going on inside neural nets.
LAURENCE MORONEY: Right.
CHRISTOPHER OLAH: And
it didn't stop there.
We continued thinking
about this a lot.
And then about a year ago,
or like a couple months ago,
we published this
article on feature
visualization, which
is really exploring,
how can we take these techniques
that we started developing
with Deep Dream and then go and
turn them into tools that are--
instead of just trying to
make interesting images,
really understand what
individual neurons
in the network are looking for.
And we discovered in early
layers, it's looking for edges.
And then it starts
to look for textures.
And then it uses the
textures to describe
simple patterns, like stripes,
and fluffy balls, and logos,
and hexagons, and clusters
of circles, and these--
I don't even know what-- like
putty, like sphere-like things.
And then those get turned in
to simple parts of objects,
like a button
detector, or a flower
detector, or a patches-of-fluff
detector, or a bubble
detector, or a chain
detector, or a nose detector.
And those get turned
into partial objects,
like parts of buildings,
or people walking around,
or helmets, or dogs with
floppy ears, and little
insect-like things.
LAURENCE MORONEY: Right.
CHRISTOPHER OLAH: And so
that was a really exciting
transition.
And it was the result
of us fiddling a lot
with ideas around Deep Dream.
And not just us, you know?
There's a big
community of people
who've been doing really
exciting work in this area.
And we have been
building on that
and building up infrastructure.
Really, that to us is
just a means to an end.
What that work was giving us
was it was giving us a way
to go and understand, what
are individual neurons
doing, the individual
neurons in the network,
so those individual neurons
that seem to detect floppy ears
and things like this?
But then, what we've
been doing lately
is we've been going and
taking that a step further
and going and saying,
how can we then use
that as a building block in
conjunction with other things
to try to really explore how
the network makes decisions?
And so I'll start
with a simple example.
So over here, we have an image--
right now we're looking at
an image of this Labrador
Retriever and this tiger cat.
That's actually apparently,
a species of cat.
LAURENCE MORONEY: They
call them tiger cats?
CHRISTOPHER OLAH: Yeah.
I mean, there's real
tigers, and then
there's also tiger cats,
which I guess maybe they have
stripes on them or something.
But there's also, you know,
like you have tabby cats,
you have tiger cats.
Apparently, that's a tiger cat.
I wouldn't have known.
LAURENCE MORONEY:
But the network does.
CHRISTOPHER OLAH:
But the network does.
It's really amazing.
Actually, I wouldn't have
known it was a Labrador
Retriever either.
The network-- really,
it's pretty phenomenal.
It classifies dogs into
more than 100 species.
And I don't even know the
names of 100 species of dogs,
let alone, how to go
and tell them apart.
But the network can.
And one thing you
might wonder is,
how does the network do that?
LAURENCE MORONEY: Right.
CHRISTOPHER OLAH: And one really
exciting thing that we'll see
is--
well, let's just dive
into this for a second.
LAURENCE MORONEY: Sure.
CHRISTOPHER OLAH: This
interface here, it
allows us to go and
look at the vectors.
So the neural net runs
the seam detectors
at every position in the image.
And normally, those
detectors, they all
give a number output
that sort of describes
how much they fired.
And normally, you get this
so-called activation vector.
And it's just a list of numbers.
And it's really inscrutable.
You're like, neuron
53 was firing a lot.
Well, what does that mean?
That's not very useful to me.
That doesn't tell me
very much, you know?
Neuron 134 also fired a bunch.
But neuron 12, it didn't fire.
Well, great.
Thanks.
That doesn't tell me anything.
LAURENCE MORONEY: Neuron
12 was having a bad day.
CHRISTOPHER OLAH: [LAUGHS] Yep.
But what we can do
is we can combine it
with these feature
visualizations that
gives us a sense of what
the neurons are looking for.
And we can combine--
we can create this--
we call them semantic
dictionaries where
we have these things
that sort of give us
a name for the neuron.
They give us sort
of a visual symbol
that describes what
they're looking
for with how much they fire.
And that's a lot
more informative.
So if we look over
here, and all over here,
we see that there's these
floppy ear detector neurons that
are firing really intensely.
It turns out that this
neural net, GoogLeNet,
has a really rich vocabulary
of different kinds of ears.
And that's a really big part
of how it tells apart animals.
So it has different
kinds of floppy ears,
not just floppy
ears, but there's
these longer floppy
ears, there's
these mid-length floppy ears.
And then it has all
sorts of pointy ears
as well, and ears
that are sort of
in between pointy and floppy.
Here, we're seeing that there's
really these two floppy ear
detectors that are
firing pretty strongly.
That's really
interesting, but it's
something that would have
been completely opaque to me
without going and combining
these techniques together.
LAURENCE MORONEY: Right.
CHRISTOPHER OLAH: And so that's
the first thing we're doing.
And we can look in other places.
So there's a snout
detector over here
that really is firing
pretty strongly.
And if we go over
here, now we're
seeing some pointy ear detectors
and a cat face-like detector.
And it almost looks a little
bit like an ape detector that's
firing a little bit over here.
If we go down here, we see these
fur detectors and these leg
detectors that are firing.
If you go down
here to the grass,
there's some grass detectors.
But they don't fire very
strongly, because that's not
very interesting.
And we can look at other images.
So over here, we
have this fellow
with sunglasses and a bow tie.
And it turns out there's
a bow tie detector.
And there's also a neck without
a bow tie detector and--
LAURENCE MORONEY: What I
really liked about this one
was that the bow tie and
sunglasses look similar.
Right?
It's two dark oblongs
joined by a small bridge.
CHRISTOPHER OLAH: Oh, yeah.
Wow.
LAURENCE MORONEY:
But this was actually
able to detect the
difference between a bow
tie and sunglasses.
CHRISTOPHER OLAH: Oh, yeah.
No, it's really-- you
know, you can see here.
And you can see that
part of what it's doing
is it's looking for the
chin above the bow tie.
And I think, also, for the
shirt with buttons a little bit
below it.
So it's these other
things that are cueing it.
But it actually has a
pretty sophisticated sense
of what a bow tie is.
And it also has the suit
detector and the other neck
detector.
And yeah.
And Here's some kind
of face detector
that seems to mostly
be about noses,
and mouths, and skin texture.
And there's the sunglasses
detector up here.
I don't know.
Let's look at this one.
It turns out that this has
a top of vase detector, body
of vase detector.
There's sort of a
flower detector.
There's an antler detector that
helps it detect the handle.
LAURENCE MORONEY:
How interesting.
CHRISTOPHER OLAH:
Yellow spheres.
LAURENCE MORONEY: And that
was another thing that
was interesting in this
one is because the lemons
at the bottom of the
image are yellow oblongs,
and the tulips at the
top are yellow oblongs.
CHRISTOPHER OLAH: Uh-huh.
Uh-huh.
LAURENCE MORONEY:
But despite those two
being very similar,
that it's able to detect
that they're different things.
CHRISTOPHER OLAH: Yeah.
And in fact, if we-- well,
I'll go to that in a second.
But there's some other one--
we can see some
interesting things
about how these all play
together in a second.
But yeah.
So I think the
first thing is just
this is allowing us to
understand-- you know,
sort of look at which
neurons are firing
and see what's going on.
Oh, I wanna show you
the pig for a second.
The pig is a great
example of something
that has lots of
pointy ear detectors.
I might have to move
around a little bit
to find a place
where we're really
getting all of the pointy
ear detectors to fire.
There's two, but there's
some places where more fire.
Well, maybe I'm not
gonna be patient.
Oh, yeah, there's
a bunny-- here.
OK, look.
So we have pointy ear,
pointy ear, pointy ear,
and then some kind
of rabbit-like thing
with another kind of pointy ear.
It has this whole
vocabulary for talking
about different kinds of ears.
And I don't have anything
like that, and I love it.
[LAUGHTER]
Right, so that's the first step,
but we wanted to go and take
that a little bit further.
So another thing that you
can do is you could ask,
what do all these neurons
together represent?
And there's all these
neurons that are
firing to different extents.
And if we, instead
of just trying
to visualize individual ones,
we try to visualize them
all together, we see what
the network collectively
saw at that position.
And then if you
stitch those together,
you can kind of see how the
network saw the whole image.
So here's our pig,
or hog, or whatever
it is, or our cat and our dog.
And you can see, really seeing
the ear here, and the snout,
and the cat head, and
the legs, and the grass,
or over here, the
top of the vase,
and the handle, and the flowers,
and the lemons down here,
and the wooden surface
in the background.
Or over here, there's
the bird on the chain.
And it really sees the
bird's beak and the feathers,
the chain, and all of this.
I mean, that's kind
of interesting.
LAURENCE MORONEY:
Pretty incredible.
CHRISTOPHER OLAH: And
then we could actually
go a step further.
And the way that these networks
work, remember, is they
have multiple layers.
They build up
their understanding
over the course of
a bunch of layers.
And so initially,
they're really--
let's zoom in here--
you know, initially,
they're really focused
on relatively simple things.
In fact, we don't show
you the first layer,
but it would really
be about edges.
LAURENCE MORONEY: Right.
CHRISTOPHER OLAH: But
here, it's getting
really simple
combinations of edges,
or maybe the
beginnings of textures.
But if we go down just two
more layers, we now have--
we're skipping a layer
in the middle here--
we now have this thing
where it's really
got a much richer
sense of textures.
And it's starting to get
a bit of 3D structure.
And if you go a little
bit further down,
now we're seeing the chain,
and the beak, and so on.
And if we go a
little bit further,
it sort of becomes
more abstract,
and it's sort of
birds and chains.
And similarly, if we go--
let's look at the dog.
I love this dog and this cat.
So here, again, very simple
patterns with-- really
mostly about edges.
But you go just a step up,
and now there's fur textures.
There's grass textures.
You can really see that
there's this 3D structure where
there's boundaries and
surfaces, a little bit.
And then you go another
step, and it's starting
to understand eyes too.
But now, it's
really got the snout
with eyes, the ears, the leg.
And so you can really
see these jumps
in its sophistication
of understanding
the object as you go up.
LAURENCE MORONEY: And this is
part of the magic of Distill,
right?
So this isn't just
a dry academic paper
with illustrations in it.
We can see you
interacting with it.
We can see you actually
seeing what a neuron is seeing
and getting hands-on to that.
So it helped me to learn a lot
more about what's going on.
CHRISTOPHER OLAH: Yeah.
I think there's just
something extremely
powerful about
allowing people to--
you know, there's these pictures
that I have in my head and--
I think there's actually two
interesting things going on.
So one is there's these
pictures I have in my head.
And by really turn
them into interfaces,
I'm able to crystallize
those pictures into things
that I can really test
my intuitions against
and that can sort of
offload some of the thinking
that I have in imagining what
this would be what's going on
in the network and really
reifying it, really
turning it into this thing
that I can interact with.
And then not only do
I get that for myself,
but I get to share
it with other people.
And so they get to now
see this thing that's, I
think, deeper than
what one would normally
get where it's not just
me telling you results,
but I'm really sharing this
way of thinking about it
and interacting with
this type of problem.
And I think that's
really, really exciting.
LAURENCE MORONEY: Yeah.
I mean, because to me, there's
two levels of opaqueness
with machine learning, right?
First of all there's
learning to begin with,
which is already opaque.
And then secondly is like, when
you start dealing with models,
it's a black box, right?
There's a trained
graph in this thing
that you give it a
picture, and it tells
you what's in the picture.
So it's not like
source code that you
can open up and step through
and see what's going on.
So between those two
levels of opaqueness,
it's really, really hard for
somebody to get into this
and to learn it.
And what I like about this
is that this is cracking open
the second of those.
So I can begin to
really see what's
happening in the network,
and help me understand
the network, and then
later on, help me to build
and tune my own networks,
which is super cool.
So now, Lucid.
Where does Lucid fit
into this picture?
Right.
So with all of this, we've been
building up all of these tools,
and we've been building
a lot of infrastructure
to go along with it.
And so one of the
things we're really
excited about with this
paper is we're also
open-sourcing all of
the infrastructure
that we've built up to
go and do this research.
And so that includes both that
first feature visualization
article that I was showing
you where all of the tools
you need to go
and produce images
like this where you visualize
what a neuron's looking for,
and then also, to go and--
you know, that's also what
underlies all of these tools
that we have here.
LAURENCE MORONEY:
And the neurons
in this one, are they
just trained on something
like inception?
CHRISTOPHER OLAH: Yeah.
For both articles, we're
using this network, GoogLeNet,
which was at one point a
state-of-the-art model.
It's now several
years out of date,
but it's one that we have used
for a while as a standard test
for visualization.
It seems like it actually--
there's something a little bit
mysterious about
it where it seems
like the neurons in GoogLeNet
especially correspond to ideas
that are meaningful to humans.
LAURENCE MORONEY: I see.
CHRISTOPHER OLAH: It's a fun one
to start playing around with.
LAURENCE MORONEY: Cool.
Cool.
CHRISTOPHER OLAH: But you can
go and plug in whatever model
you want and try and use
these techniques on it.
LAURENCE MORONEY: Nice.
Nice.
CHRISTOPHER OLAH:
We actually made
these notebooks that
reproduce each one
of the diagrams in the paper.
LAURENCE MORONEY: Oh, cool.
CHRISTOPHER OLAH: So
you can go and then--
LAURENCE MORONEY:
You can get hands on.
CHRISTOPHER OLAH:
Yeah, so you can just--
you now, there's sort of this
continuum where you can just
read the paper passively.
You can engage
with the diagrams.
And you can go a step deeper
and go and start playing around
with one of these notebooks.
And so here we have a notebook
for these activation grid
visualizations.
And then you can go and just--
I guess we have to open
it in a playground.
LAURENCE MORONEY: But it used
to be like, once upon a time
that you'd read a paper,
and you try to understand
what was in the paper.
And you try to figure it out.
And maybe there'd be
a bit of source code.
And you'd take that source
code, but then you'd
have to go and find a data
set of images to train.
But you'd have a
different data set
than the people
in the paper had.
And there are all these
concepts, these frictions,
these little bumps that
you have to get over.
CHRISTOPHER OLAH: Right.
And now we can make it this
continuous transition where
you can be reading the
paper, you can be like,
I want to play around with
this diagram a little bit
and start doing that.
I want to go a little step
further and start actually
playing around with the
code and fiddling with it.
And then if you want
to really dive in,
we have all of our
code's open source.
And then you can
learn the library
a little bit by playing
around with the notebooks,
and then go and--
LAURENCE MORONEY: Super cool.
And as you mentioned, if you
want to start playing with it,
all the code is open source.
So say I'm a developer, and
I want to learn this stuff,
and I want to get started
now, where would I go?
CHRISTOPHER OLAH: Go to
tensorflow/lucid on GitHub.
That's our repository.
And from there, you can get
access to tutorials on using it
and a list of notebooks to
go and play around with.
And then the next step
after that is you could--
well, you might come
up with some ideas
after you've gone and
played with some notebooks.
And you might want to
just use code that's
very similar to what's
in the notebooks
so you could start writing
your own fun things.
And a lot of this could also
be used for artistic purposes
where--
LAURENCE MORONEY: Cool.
CHRISTOPHER OLAH:
You can certainly
do traditional Deep
Dream-style stuff, as well.
LAURENCE MORONEY: And also
your papers on Distill, I'll
put links to them in the
description of this video.
CHRISTOPHER OLAH: Fantastic.
Yeah.
LAURENCE MORONEY: So
that people can go there,
and they can do it.
CHRISTOPHER OLAH: Yeah.
I think that probably
what I would do first
is I would read the papers.
And then from the papers,
you can go and jump
to the notebooks.
LAURENCE MORONEY: Right.
CHRISTOPHER OLAH: Or
after you've read them,
you can also look at
the Lucid repository
and look at more tutorials and
stuff like that to play around.
LAURENCE MORONEY: Sounds good.
Thank you so much, Christopher.
This has been so much fun.
CHRISTOPHER OLAH:
Oh, my pleasure.
LAURENCE MORONEY:
You know, we've
been sitting here for a
little while geeking out
about this stuff, and it's one
of the things I love to do.
So thank you, so much.
And thank you, everybody,
for watching this episode
of "Coffee with a Googler."
If you've any questions
for me, or if you've
any questions for
Christopher, please leave them
in the comments below.
We'll also have links in the
description below to everything
that we spoke about today.
So thank you so much, again.
And don't forget to hit
that Subscribe button.
And remember, we'll have a
TensorFlow channel on YouTube,
so go check it out.
Thank you, so much.
