Making Machines Creative.

[Music]

good morning um

today i want to talk about visual

creativity

and what it can teach us about our own

incredible brains

take a look at this painting what is it

about da vinci’s masterful brushstrokes

that evokes a living breathing

three-dimensional object

in our minds

how about this painting which despite

its very different

and perhaps unusual style still looks

kind of real

or this one or even this one

by three-year-old teresa it still looks

like a face right

how does that work now

we humans we’ve been using physical

tools like

brushes and chisels to reconstruct

our sensory observations in the form of

paintings and sculptures

for at least 60 000 years this

incredible cave painting for instance is

thought to be 17 000 years old

that’s thousands of years before we had

domesticated sheep and goats even

in fact we’ve been doing this

abstracting away from observations and

creating them in the form of paintings

for so long that it’s thought to be well

before

the earliest signs of any meaningful

written language even

take a look at this cave painting where

the artist

depicts this battle scene using a few

brush strokes

no more than say 10 or 20.

now many people believe that it is

precisely this ability to abstract away

from reality

and to conceptualize that reality that

underpins

the cognitive abilities that make us

uniquely intelligent as human beings

but it largely remains a mystery how

exactly we do this

and the field of artificial intelligence

or ai

concerns itself with this question

basically

what is intelligence what is it composed

of

how does it come to be and how can we

recreate it

i’m an ai scientist myself and i’ve

spent most of my career thinking about

how visual conceptualization

and visual abstraction can be recreated

now as you know and as you heard ai has

been making great progress over the past

couple of decades

we now have computer programs that can

play chess or go as well as the best

humans

and even self-driving cars seem within

reach

what i’m going to talk about today is

some of the early steps we’ve taken

towards getting computers to be visually

creative as well

now to do this we use computers heavily

and i’d like to begin by going over what

a computer actually is

so a computer in my mind is a simple

device that transforms

inputs to outputs and

the way we program a computer is by

giving it a list of instructions

or an algorithm to specify how we want

those inputs to be transformed into

outputs

in this example the inputs are

two numbers and what we want the

computer to do

is to output the sum and the algorithm

that’s run on the computer

is the summation algorithm now what

makes computers really useful

is that they are extremely fast and they

are extremely accurate

so they do those instructions very very

quickly and very accurately

but it turns out that there are certain

input output transformations

or certain tasks that we really care

about but no computer scientist has

succeeded in writing an

algorithm for it from scratch and only

from their own minds

for instance consider the case of

translation

where you want to go from one language

to another language now of course there

are many

human beings that know these two

languages and can translate

but none of them would be able to

describe how they do it with sufficient

formality to be able to express it to a

computer

and that’s where the idea of learning

comes in you will have heard of the term

machine learning

where the idea is that if we give the

computer enough examples of sentences in

both languages

it will by itself learn how to do this

transformation

and indeed today we now have systems

that can classify

pictures of cats and dogs and translate

sentences from languages into each other

with

fairly good accuracy now

the question that i asked um with my

colleagues a couple of years ago

was could we use this paradigm to get

computers to be creative

so if i consider the paintbrush and

paint

to be inputs to a computer can i get it

to

output visually interesting conceptually

abstract

outputs at the other end

now we know that computers can be used

to create images that’s what digital art

is all about

but in normal digital art the human is

specifying exactly what they want the

computer to do the algorithm is actually

being provided by the human

the question here is can the computer

learn that algorithm by itself

through trial and error kind of figure

out

what kinds of images are visually

appealing and conceptually abstract

so i’m going to dive into the setup that

we actually used

let’s begin with a painter in the bottom

right so the painter is a computer

program

that sends actions to another computer

program

in the form of brush strokes this

second thing which i call the canvas

here think of it as something like adobe

photoshop or microsoft paint it’s a

simulated painting environment

the painter’s job is to produce an image

that looks as real as possible

the final state of this painting

environment is sent as an image

to another computer program in the top

which i call the critic

the critic’s job is to determine how

real that image looks

and to express it in the form of a

reward

which is sent back to the painter the

reward is a single number that expresses

how

real the critic thinks that image looks

and this cycle is repeated millions or

billions of times

until the painter gets really good at

producing images

and the critic gets good at determining

what looks real and what looks fake

and this process is called adversarial

reinforcement learning

and is powered by machine learning

that’s how the critic and the painter

update themselves over time

more concretely the two computer

programs are implemented by what we call

neural networks

so in each one of these sections i’ve

shown

the neural network corresponding to the

painter and the neural network

corresponding to the critic

a neural network is basically a tunable

mathematical function that transforms

inputs to desirable outputs and it

updates itself slightly over time to do

better better

mappings of this kind

so the painter network takes a partially

complete image as input and it outputs

the actions that it wants the

environment to execute next

and the critic network as i said takes a

complete image as input in the bottom

and it outputs a single number which

expresses how real or fake the image

looks

and the action that the painter sends is

a single brush stroke

so this specifies how thick the brush

stroke is

how much pressure is applied what color

it is and

where it starts and where it ends and by

producing a sequence of these actions it

produces the complete image

now if you train this well enough and

for long enough

you can end up with computer programs

that

produce relatively good looking images

so here we’ve trained the program to

reconstruct the image on the left and

you can see that it’s using this

real robotic arm and a real paintbrush

with real ink

to create reconstructions of that image

that’s not too bad right

now naturally we wanted to see whether

we could scale this idea up even further

so we collected a data set of images of

human faces

and we asked the neural painter

to produce images that look like these

photographs

so all the computer is given is some

virtual paint

it’s given a fixed amount of time and is

given these photographs and is asked to

create something that looks like them

now keep in mind we never show the

computer how a human would draw a

portrait

and we never tell the computer how

humans judge

between real and fake looking portraits

all it’s given is the

the opportunity to try and it’s given

images that look real

and this is what it produces at the end

of that training process

so i’ll give you a few minutes to just

observe what it’s doing

you’ll notice that it starts off with

relatively simple shapes just to convey

the

approximate contours of a face

but it manages to use this brush quite

accurately to

gradually fix over the mistakes it makes

early on

and to eventually end up with an image

that looks kind of real

and the physical properties of the brush

are such that the

final image actually kind of resembles

the kinds of portraits we would create

if we were given just as much time

here’s another example of a portrait

painted by this painter

so you’ll see that it produces a variety

of images

and that it can vary the pose of the

person being painted

and that as i said it can control the

brush with sufficient accuracy

to create a variety of shapes and

textures

now in this example the computer is

generating the image

entirely from its own imagination so to

speak which means that we’re not asking

it to reconstruct a certain painting

we’re just saying give us an image that

looks real to you any image that you

want

and here’s another example of an image

produced by this model

now we were all very excited by these

results but what i really wanted to know

was instead of giving the computer

hundreds of brush strokes to create the

image what if we limited it to only 10

or 20 brush strokes

could it learn to be visually abstract

could it learn to

conceptualize what it means for

something to look like a face

could it be creative in other words

and so that’s what we did we retrained

the painter and the critic

but this time we only allowed it 10 or

20 interactions with the environment

and then this is the kind of portrait it

painted for us

i was super excited when i saw this

result for the first time

you’ll see that the painter uses

very succinct brush strokes to depict

the eyes of the face

it uses a single brush stroke to depict

the red lips

and look at the way it draws the

contours of the face

it’s actually quite reminiscent of how i

would draw a face if i were asked to do

so

you might even notice why it draws that

um

red red line in the third panel but if

you pay attention you’ll see that that

red line eventually becomes the cheek

and the faces

the blush in the piece faces cheeks at

the end

this is pretty remarkable and it shows

the agent’s ability to kind of make

long-term plans

and here are some more of the painters

images notice the picasso-esque image in

the top

left or the really super simple

minimal image in the bottom right one of

my favorites is this one in the left

where it

literally uses just a single dot for

each one of the faces eyes

remember none of this has ever been in

the data given to the

painter during training

all of this not because we made the

networks bigger or gave it more data

but because we gave it a set of tools

namely paint brushes

and we gave it an environment and we

gave it a fixed amount of time

and we asked it to do the best job that

it can

now an interesting question to consider

is whether this

computer program is creative it

certainly produces

interesting looking images i would say

that some of them are even aesthetically

pleasing i’d be happy to have them

on my own walls and it can produce an

infinite variety of them

so you can ask it to continuously paint

paintings and will produce more and more

images of this kind

but is this what we mean by creativity

is this what we

mean when we say an artist is being

creative now regardless of your answer

to that question

i think these demonstrations are

important because

they shed light on the cognitive

capabilities that are actually important

for our own creativity

so what what is a human artist doing

when they’re painting a painting what

objective function are they optimizing

for

a chess player who’s playing chess

what’s going on in their mind

or a driver when driving what’s going on

in their mind

and what i find most exciting is when

ai can discover solutions that were

previously hidden in plain sight

so for instance many of you will have

heard of alphago which was this

state-of-the-art goal playing neural

network

and how in a fabled move 37 it

discovered

a go move that has literally transformed

the way we humans play go now

now this back and forth between human

and machine

is tremendously powerful in my opinion

and we’re beginning to see this even in

the arts so

on this slide i’m showing the works of a

number of painters and artists

who use ai in their day-to-day work to

create pieces that previously would not

have been able to

be created and i’m very much looking

forward to seeing how more of these

innovations

will continue to create human ai

co-creations of new kinds

thank you

[音乐]

早上好,

今天我想谈谈视觉

创造力

以及它可以教给我们什么关于我们自己

不可思议的大脑

介意

这幅画怎么样,尽管

它的风格非常不同

,也许

不寻常 至少 60 000 年以来,我们一直使用

刷子和凿子等物理工具

以绘画和雕塑的形式重建我们的感官观察,

例如这幅令人难以置信的洞穴壁画被

认为有 17 000 年的历史

,这比我们

驯养绵羊和 山羊,

甚至事实上,我们一直在

从观察中抽象出来,并

以绘画的形式创作它们

很长时间,以至于人们认为它很好

b 在

任何有意义的书面语言的最早迹象之前,

甚至

看看这幅洞穴壁画

,艺术家

用不超过10或20的几笔笔触描绘了这场战斗场景。

现在很多人认为

正是这种抽象能力

从现实

出发,将

支撑认知能力的现实概念化,使我们

作为人类具有独特的智能,

但在很大程度上仍然是一个谜,我们

究竟是如何做到这一点

的,人工智能

或人工智能领域

基本上关注这个问题,

什么是智能什么是 它由

它是如何形成的以及我们如何

重新创建它组成

我自己是一名人工智能科学家

,我的职业生涯大部分时间都在思考

如何重新创建视觉概念化和视觉抽象化,

正如你所知道和听到的那样

在过去的几十年里,人工智能取得了长足的进步,

我们现在拥有可以

下棋或围棋的计算机程序

人类

甚至自动驾驶汽车似乎

触手可及

我今天要谈论的是

我们

为使计算机也具有视觉

创意而采取的一些早期步骤,

现在要做到这一点,我们大量使用计算机

,我会 喜欢首先回顾

一下计算机实际上是什么,

所以在我看来,计算机是一个简单的

设备,可以将

输入转换为输出

,我们对计算机进行编程的方式是

给它一个指令列表

或一个算法来指定我们想要

这些指令的方式

在这个例子中,输入被转换成输出,输入是

两个数字,我们希望

计算机做的

是输出总和,

在计算机上运行的算法

是求和算法,现在

让计算机真正有用

的是它们非常 快速且

非常准确,

因此它们非常

快速且非常准确地执行这些指令,

但事实证明,我们确实可以进行某些

输入输出转换

或某些任务

关于但没有计算机科学家

成功地

从头开始编写算法,例如

仅从他们自己的头脑

中考虑翻译的

情况,您现在想从一种语言

转到另一种语言当然

有很多

人知道 这两种

语言都可以翻译,

但没有一个能够

以足够的形式描述他们是如何做到这一点的,

以便能够将其表达到

计算机上

,这就是学习的想法

出现的地方,你会听说过机器学习这个术语

,其中 这个想法是,如果我们给

计算机提供足够多的两种语言的句子示例,

它自己就会学会如何进行这种

转换

现在的准确性相当

好几年前我问我的同事的问题

是我们可以使用这种范例来获得

计算机吗 要有创意,

所以如果我认为画笔和

颜料是计算机的输入,我可以让它

在另一端输出视觉上有趣的概念抽象输出

现在我们知道计算机可以

用来创建图像,这就是数字艺术

的全部

但是在正常的数字艺术中,人类正在

准确地指定他们希望

计算机做什么算法实际上

是由人类提供的,

这里的问题是计算机可以

通过反复试验自己学习该算法

吗? 图像在视觉上很

吸引人,在概念上很抽象,

所以我将深入研究

我们实际使用的设置

让我们从右下角的画家开始,

画家是一个计算机

程序

,它以笔触的形式将动作发送到另一个计算机

程序

我在这里称之为画布的第二个

东西把它想象成 adobe

photoshop 或 microsoft paint 之类的东西,它是一个

模拟的绘画环境

画家的工作是产生一个

看起来尽可能真实的图像,

这个绘画环境的最终状态

作为图像发送

到顶部的另一个计算机程序

,我称之为

评论家评论家的工作是确定

该图像看起来有多真实,

并且 以奖励的形式将

其发回给画家,

奖励是一个数字,表示

评论家认为图像看起来有多真实,

并且这个循环重复数百万或

数十亿次,

直到画家真正擅长

制作 图像

和评论家擅长确定

什么看起来是真实的,什么看起来是假的

,这个过程被称为对抗性

强化学习

,由机器学习驱动,

这就是评论家和画家

随着时间的推移更新自己的方式,

更具体地说,这两个计算机

程序是由什么实现的 我们称之为

神经网络,

所以在每一节中,我都

展示

了对应于

画家和神经的神经网络 l

对应于critic

的网络神经网络基本上是一个可调的

数学函数,它将

输入转换为期望的输出,并且

随着时间的推移它会稍微更新自己以进行

更好

的此类映射,

因此画家网络将部分

完整的图像作为输入并输出

它希望

环境接下来执行的动作

和我所说的评论家网络将

完整的图像作为底部的输入,

并输出一个数字,该数字

表示图像的真实或虚假

,而画家发送的动作

是 单个画笔描边,

因此这指定了画笔描边的粗细程度,

施加了多大的压力,它是什么颜色

从哪里开始,从哪里结束,通过

产生一系列这些动作,

如果你训练得足够好,它现在就会产生完整的图像,并且

足够长的时间,

您最终可以使用

生成相对好看的图像的计算机程序,

所以在这里我们已经训练程序

重建左边的图像,

你可以看到它正在使用这个

真正的机械臂和一个真正的画笔,

用真正的墨水

来创建那个图像的重建,

现在还不错

自然我们想看看

我们是否可以进一步扩大这个想法

所以我们收集了一组人脸图像的数据集

,我们要求神经

画家生成看起来像这些照片的图像,

所以给计算机的只是一些

虚拟颜料

,给定固定的时间,

给定这些照片,然后被问到 要

创建看起来像它们的东西,

请记住,我们从未向

计算机展示人类将如何绘制

肖像

,我们从未告诉计算机人类如何

判断真实和虚假的肖像,

它所给予的只是

尝试的机会,它已经给予

看起来真实的图像

,这就是它在训练过程结束时产生的结果

所以我会给你几分钟来

观察它在做什么,

你会注意到 它从

相对简单的形状开始,只是为了传达

脸部的大致轮廓,

但它设法非常准确地使用这种画笔

逐渐修复它早期犯下的错误

并最终以

看起来有点

真实的图像结束。 画笔的物理特性

使得

最终的图像实际上有点

类似于如果给我们足够的时间我们将创建的肖像类型

这是另一个由这位画家绘制的肖像的例子,

所以你会看到它产生了各种各样的

图像

,它可以改变

被画人

的姿势,正如我所说,它可以

足够精确地控制画笔,

以创建各种形状和

纹理

现在在这个例子中,计算机

完全根据自己的想象生成图像 可以这么

说这意味着我们不是要求

它重建某幅画

我们只是说给我们一个

对你来说看起来很真实的图像你想要的任何图像

t

,这是这个模型生成的图像的另一个例子,

现在我们都对这些结果感到非常兴奋,

但我真正想知道的

是,与其给计算机

数百个笔触来创建

图像,如果我们将其限制为只有 10

或者 20 笔笔触

能否学会视觉上的抽象

能否学会

概念化

看起来像一张脸的

东西意味着

什么 只允许它

与环境进行 10 或 20 次交互

,然后这是它为我们绘制的那种肖像

当我第一次看到这个结果时我非常兴奋,

你会看到画家使用

非常简洁的笔触来

描绘 脸部的眼睛

它使用单笔笔触来

描绘红唇

并观察它绘制

脸部轮廓的方式

它实际上很让人想起

如果我被要求画一张脸 o

所以

你甚至可能会注意到为什么它

在第三个面板中画出那条红色的红线,但如果

你注意你会发现那条

红线最终变成了脸颊

,而脸颊

上的脸红最终朝向脸颊,

这是 非常了不起,它显示

了代理制定长期计划的能力

,这里有更多的画家

图像注意左上角的毕加索式图像

或右下角真正超级简单的

最小图像是

我的最爱之一 是不是在左边

,它

实际上只为

每一张

脸使用了一个点? 更多的数据,

但是因为我们给了它一组工具,

即画笔

,我们给了它一个环境,我们

给了它一个固定的时间

,我们要求它做最好的工作,

现在可以考虑一个有趣的问题

是磨 她这个

计算机程序很有创意,它

肯定会产生

有趣的图像

不断地

绘画,并将产生越来越多

的此类图像,

但这就是我们所说的

创造力,这就是

我们所说的艺术家现在有创造力的意思,

不管你

对这个问题的回答如何,

我认为这些演示很

重要,因为

它们 阐明对我们自己的创造力

实际上很重要的认知能力,

因此人类艺术家

在绘画时会做什么,他们正在

为正在下棋的棋手优化

什么目标函数他们的想法

或 驾驶者在驾驶

他们的想法时

,我发现最令人兴奋的是,当

人工智能可以发现

以前隐藏在 pl 中的解决方案时

例如,你们中的许多人

都听说过 alphago,它是

一种最先进的目标游戏神经

网络,

以及它如何在一个传说中的移动 37 中

发现了一个真正改变

了我们人类现在玩围棋方式的围棋动作

现在,在我看来,人类和机器之间的这种来回

是非常强大的

,我们甚至开始在艺术中看到这一点,

所以

在这张幻灯片上,我展示了

许多

在他们那个时代使用人工智能的画家和艺术家的作品 -today 工作以

创造以前无法创造的作品

,我非常

期待看到更多这些

创新

将如何继续

创造新类型的人类 AI 共同创造

谢谢