Can a computer write poetry Oscar Schwartz

I have a question.

Can a computer write poetry?

This is a provocative question.

You think about it for a minute,

and you suddenly have a bunch
of other questions like:

What is a computer?

What is poetry?

What is creativity?

But these are questions

that people spend their entire
lifetime trying to answer,

not in a single TED Talk.

So we’re going to have to try
a different approach.

So up here, we have two poems.

One of them is written by a human,

and the other one’s written by a computer.

I’m going to ask you to tell me
which one’s which.

Have a go:

Poem 1: Little Fly / Thy summer’s play, /
My thoughtless hand / Has brush’d away.

Am I not / A fly like thee? /
Or art not thou / A man like me?

Poem 2: We can feel / Activist
through your life’s / morning /

Pauses to see, pope I hate the / Non
all the night to start a / great otherwise (…)

Alright, time’s up.

Hands up if you think Poem 1
was written by a human.

OK, most of you.

Hands up if you think Poem 2
was written by a human.

Very brave of you,

because the first one was written
by the human poet William Blake.

The second one was written by an algorithm

that took all the language
from my Facebook feed on one day

and then regenerated it algorithmically,

according to methods that I’ll describe
a little bit later on.

So let’s try another test.

Again, you haven’t got ages to read this,

so just trust your gut.

Poem 1: A lion roars and a dog barks.
It is interesting / and fascinating

that a bird will fly and not / roar
or bark. Enthralling stories about animals

are in my dreams and I will sing them all
if I / am not exhausted or weary.

Poem 2: Oh! kangaroos, sequins, chocolate
sodas! / You are really beautiful!

Pearls, / harmonicas, jujubes, aspirins!
All / the stuff they’ve always talked about (…)

Alright, time’s up.

So if you think the first poem
was written by a human,

put your hand up.

OK.

And if you think the second poem
was written by a human,

put your hand up.

We have, more or less, a 50/50 split here.

It was much harder.

The answer is,

the first poem was generated
by an algorithm called Racter,

that was created back in the 1970s,

and the second poem was written
by a guy called Frank O’Hara,

who happens to be
one of my favorite human poets.

(Laughter)

So what we’ve just done now
is a Turing test for poetry.

The Turing test was first proposed
by this guy, Alan Turing, in 1950,

in order to answer the question,

can computers think?

Alan Turing believed that if
a computer was able

to have a to have a text-based
conversation with a human,

with such proficiency
such that the human couldn’t tell

whether they are talking
to a computer or a human,

then the computer can be said
to have intelligence.

So in 2013, my friend
Benjamin Laird and I,

we created a Turing test
for poetry online.

It’s called bot or not,

and you can go and play it for yourselves.

But basically, it’s the game
we just played.

You’re presented with a poem,

you don’t know whether it was written
by a human or a computer

and you have to guess.

So thousands and thousands
of people have taken this test online,

so we have results.

And what are the results?

Well, Turing said that if a computer
could fool a human

30 percent of the time
that it was a human,

then it passes the Turing test
for intelligence.

We have poems on the bot or not database

that have fooled 65 percent
of human readers into thinking

it was written by a human.

So, I think we have an answer
to our question.

According to the logic of the Turing test,

can a computer write poetry?

Well, yes, absolutely it can.

But if you’re feeling
a little bit uncomfortable

with this answer, that’s OK.

If you’re having a bunch
of gut reactions to it,

that’s also OK because
this isn’t the end of the story.

Let’s play our third and final test.

Again, you’re going to have to read

and tell me which you think is human.

Poem 1: Red flags the reason
for pretty flags. / And ribbons.

Ribbons of flags / And wearing material /
Reasons for wearing material. (…)

Poem 2: A wounded deer leaps
highest, / I’ve heard the daffodil

I’ve heard the flag to-day /
I’ve heard the hunter tell; /

‘Tis but the ecstasy of death, /
And then the brake is almost done (…)

OK, time is up.

So hands up if you think Poem 1
was written by a human.

Hands up if you think Poem 2
was written by a human.

Whoa, that’s a lot more people.

So you’d be surprised to find that Poem 1

was written by the very
human poet Gertrude Stein.

And Poem 2 was generated
by an algorithm called RKCP.

Now before we go on, let me describe
very quickly and simply,

how RKCP works.

So RKCP is an algorithm
designed by Ray Kurzweil,

who’s a director of engineering at Google

and a firm believer
in artificial intelligence.

So, you give RKCP a source text,

it analyzes the source text in order
to find out how it uses language,

and then it regenerates language

that emulates that first text.

So in the poem we just saw before,

Poem 2, the one that you all
thought was human,

it was fed a bunch of poems

by a poet called Emily Dickinson

it looked at the way she used language,

learned the model,

and then it regenerated a model
according to that same structure.

But the important thing to know about RKCP

is that it doesn’t know the meaning
of the words it’s using.

The language is just raw material,

it could be Chinese,
it could be in Swedish,

it could be the collected language
from your Facebook feed for one day.

It’s just raw material.

And nevertheless, it’s able
to create a poem

that seems more human
than Gertrude Stein’s poem,

and Gertrude Stein is a human.

So what we’ve done here is,
more or less, a reverse Turing test.

So Gertrude Stein, who’s a human,
is able to write a poem

that fools a majority
of human judges into thinking

that it was written by a computer.

Therefore, according to the logic
of the reverse Turing test,

Gertrude Stein is a computer.

(Laughter)

Feeling confused?

I think that’s fair enough.

So far we’ve had humans
that write like humans,

we have computers that write
like computers,

we have computers that write like humans,

but we also have,
perhaps most confusingly,

humans that write like computers.

So what do we take from all of this?

Do we take that William Blake
is somehow more of a human

than Gertrude Stein?

Or that Gertrude Stein is more
of a computer than William Blake?

(Laughter)

These are questions
I’ve been asking myself

for around two years now,

and I don’t have any answers.

But what I do have are a bunch of insights

about our relationship with technology.

So my first insight is that,
for some reason,

we associate poetry with being human.

So that when we ask,
“Can a computer write poetry?”

we’re also asking,

“What does it mean to be human

and how do we put boundaries
around this category?

How do we say who or what
can be part of this category?”

This is an essentially
philosophical question, I believe,

and it can’t be answered
with a yes or no test,

like the Turing test.

I also believe that Alan Turing
understood this,

and that when he devised
his test back in 1950,

he was doing it
as a philosophical provocation.

So my second insight is that,
when we take the Turing test for poetry,

we’re not really testing
the capacity of the computers

because poetry-generating algorithms,

they’re pretty simple and have existed,
more or less, since the 1950s.

What we are doing with the Turing
test for poetry, rather,

is collecting opinions about what
constitutes humanness.

So, what I’ve figured out,

we’ve seen this when earlier today,

we say that William Blake
is more of a human

than Gertrude Stein.

Of course, this doesn’t mean
that William Blake

was actually more human

or that Gertrude Stein
was more of a computer.

It simply means that the category
of the human is unstable.

This has led me to understand

that the human is not a cold, hard fact.

Rather, it is something
that’s constructed with our opinions

and something that changes over time.

So my final insight is that
the computer, more or less,

works like a mirror
that reflects any idea of a human

that we show it.

We show it Emily Dickinson,

it gives Emily Dickinson back to us.

We show it William Blake,

that’s what it reflects back to us.

We show it Gertrude Stein,

what we get back is Gertrude Stein.

More than any other bit of technology,

the computer is a mirror that reflects
any idea of the human we teach it.

So I’m sure a lot of you have been hearing

a lot about artificial
intelligence recently.

And much of the conversation is,

can we build it?

Can we build an intelligent computer?

Can we build a creative computer?

What we seem to be asking over and over

is can we build a human-like computer?

But what we’ve seen just now

is that the human
is not a scientific fact,

that it’s an ever-shifting,
concatenating idea

and one that changes over time.

So that when we begin
to grapple with the ideas

of artificial intelligence in the future,

we shouldn’t only be asking ourselves,

“Can we build it?”

But we should also be asking ourselves,

“What idea of the human
do we want to have reflected back to us?”

This is an essentially philosophical idea,

and it’s one that can’t be answered
with software alone,

but I think requires a moment
of species-wide, existential reflection.

Thank you.

(Applause)

我有个问题。

电脑能写诗吗?

这是一个挑衅性的问题。

你想了一会儿

,突然间又有
一堆其他的问题,比如:

什么是计算机?

什么是诗?

什么是创造力?

但这些问题

是人们
一生都在试图回答的问题,

而不是在一次 TED 演讲中。

所以我们将不得不
尝试不同的方法。

所以在这里,我们有两首诗。

其中一个是人写的

,另一个是电脑写的。

我要请你告诉我
哪个是哪个。 试一试

诗歌1:小苍蝇/你夏天的游戏,/
我轻率的手/已经擦掉了。

我不是/像你一样的苍蝇吗? /
或者你不是 / 像我这样的人?

诗歌2:我们可以
通过你的生活/早晨/

暂停来感受/积极分子,教皇我讨厌/非
整夜开始/伟大的否则(…)

好吧,时间到了。

如果你认为诗 1
是人类写的,请举手。

好的,你们中的大多数人。

如果您认为第 2 首诗
是人类写的,请举手。

你真勇敢,

因为第一个是
人类诗人威廉布莱克写的。

第二个是由一种算法编写的,该算法

在一天内从我的 Facebook 提要中获取所有语言

,然后

根据我稍后将描述的方法通过算法重新生成它

所以让我们尝试另一个测试。

再说一次,你还没来得及读这篇文章,

所以相信你的直觉。

诗一:狮子咆哮,狗吠。

一只鸟会飞而不是/咆哮
或吠叫,这很有趣/令人着迷。 关于动物的迷人故事

在我的梦中,
如果我/不累或不累,我会全部唱出来。

诗2:哦! 袋鼠,亮片,巧克力
汽水! / 你真的很美!

珍珠,/口琴,枣,阿司匹林!
所有/他们一直在谈论的东西(…)

好吧,时间到了。

因此,如果您认为第一首诗
是人类写的

,请举手。

行。

如果你认为第二首诗
是人类写的

,请举手。

我们在这里或多或少有 50/50 的比例。

这要困难得多。

答案是

,第一首诗是
由一个名为 Racter 的算法生成的,该算法

创建于 1970 年代

,第二首诗是
由一个名叫弗兰克·奥哈拉的人写的,

他恰好
是我最喜欢的人类诗人之一。

(笑声)

所以我们现在做的
是一个诗歌的图灵测试。

图灵测试最早是
由艾伦·图灵这个家伙在 1950 年提出的,

为了回答这个问题

,计算机会思考吗?

Alan Turing 认为,
如果计算机能够

与人类进行基于文本的
对话,

并且其熟练程度
使人类无法

分辨他们是在
与计算机交谈还是与人类交谈,

那么计算机可以
据说有智慧。

所以在 2013 年,我和我的朋友
Benjamin Laird,

我们为在线诗歌创建了一个图灵测试

叫不叫bot

,你自己去玩吧。

但基本上,这是
我们刚刚玩的游戏。

你看到一首诗,

你不知道它是人写
的还是电脑写的

,你必须猜测。

所以成千上万
的人在网上参加了这个测试,

所以我们有结果。

结果如何?

好吧,图灵说,如果一台计算机
可以在

30% 的时间内欺骗
人类,

那么它就通过了智能图灵测试

我们在机器人或非机器人数据库上有诗,这些诗

已经欺骗了 65%
的人类读者,让他们认为

它是人类写的。

所以,我认为我们已经回答
了我们的问题。

按照图灵测试的逻辑,

电脑能写诗吗?

嗯,是的,绝对可以。

但是,如果您对这个答案感到
有点不舒服

,那没关系。

如果你
对它有很多直觉反应,

那也没关系,因为
这不是故事的结局。

让我们进行第三次也是最后一次测试。

同样,您将不得不阅读

并告诉我您认为哪个是人类。

诗1:红旗
是漂亮旗子的原因。 / 和丝带。

旗帜丝带 / 和磨损材料 / 磨损材料的
原因。 (…)

诗歌2:受伤的鹿跃得
最高,/我听到了水仙花,

我听到了今天的旗帜/
我听到了猎人的诉说; /

‘这不过是死亡的狂喜,
/然后刹车几乎完成(…)

好吧,时间到了。

如果你认为诗 1
是人类写的,请举手。

如果您认为第 2 首诗
是人类写的,请举手。

哇,人多了。

所以你会惊讶地发现诗歌 1

是由非常
人性化的诗人格特鲁德·斯坦 (Gertrude Stein) 写的。

Poem 2 是
由一种称为 RKCP 的算法生成的。

现在,在我们继续之前,让
我快速简单地描述

一下 RKCP 的工作原理。

所以 RKCP 是

谷歌工程总监

、人工智能的坚定
信徒 Ray Kurzweil 设计的算法。

所以,你给 RKCP 一个源文本,

它分析源文本
以找出它如何使用语言,

然后它重新生成

模拟第一个文本的语言。

所以在我们之前看到的那首诗中,

诗 2,你们都
认为是人类的

那首,它是

由一位名叫艾米莉·狄金森的诗人提供的一堆诗,

它研究了她使用语言的方式,

学习了模型,

然后它
根据相同的结构重新生成模型。

但是要了解 RKCP 的重要

一点是它不知道
它所使用的单词的含义。

语言只是原材料

,可能是中文
,可能是瑞典语,

也可能是
一天内从你的 Facebook 提要中收集的语言。

这只是原材料。

尽管如此,它还是
能够创作出一首

看起来
比格特鲁德斯坦的诗更人性化的诗,

而格特鲁德斯坦是一个人。

所以我们在这里所做的
或多或少是一个反向图灵测试。

因此,人类格特鲁德·斯坦 (Gertrude Stein
) 能够写出一首诗

,让
大多数人类评委误

以为它是由计算机编写的。

因此,按照
逆向图灵测试的逻辑,

格特鲁德·斯坦因是一台计算机。

(笑声)

感到困惑?

我认为这很公平。

到目前为止,我们已经有了
像人类一样写作的人类,

我们有像计算机一样写作的
计算机,

我们有像人类一样写作的计算机

,但
也许最令人困惑的是,我们也有

像计算机一样写作的人类。

那么我们能从这一切中得到什么呢?

我们是否认为威廉布莱克
在某种程度上

比格特鲁德斯坦更像人类?

或者说格特鲁德斯
坦比威廉布莱克更像一台电脑?

(笑声)

这些是
我两年来一直在问自己

的问题,但

我没有任何答案。

但我所拥有的是一堆

关于我们与技术关系的见解。

所以我的第一个见解是,
出于某种原因,

我们将诗歌与人类联系在一起。

所以当我们问,
“电脑能写诗吗?”

我们也在问,

“作为人类意味着

什么,我们如何为
这个类别设置界限

?我们如何说谁或什么
可以成为这个类别的一部分?” 我相信,

这本质上是一个
哲学问题,

不能像图灵测试那样
用是或否测试来回答

我也相信艾伦·图灵
理解这一点,

并且当他
在 1950 年设计测试时,

他这样做是出于
哲学上的挑衅。

所以我的第二个见解是,
当我们对诗歌进行图灵测试时,

我们并没有真正测试
计算机的能力

,因为诗歌生成算法

非常简单,并且
或多或少自 1950 年代以来就已经存在。 相反,

我们对诗歌的图灵测试所做的

是收集关于什么
构成人性的意见。

所以,我发现,

我们在今天早些时候看到了这一点,

我们说威廉布莱克

比格特鲁德斯坦更像人类。

当然,这并不
意味着威廉

布莱克实际上更像人类,

或者格特鲁德
斯坦更像一台计算机。

它只是意味着人类的类别
是不稳定的。

这让我明白

,人并不是一个冷冰冰的事实。

相反,它是
由我们的观点构建的,

随着时间的推移而变化的东西。

所以我最后的见解是
,计算机

或多或少就像一面镜子
,它反映

了我们展示给它的任何关于人类的想法。

我们给它看 Emily Dickinson,

它把 Emily Dickinson 还给我们。

我们向它展示威廉布莱克,

这就是它反映给我们的东西。

我们给它展示格特鲁德斯坦,

我们得到的是格特鲁德斯坦。

与任何其他技术相比

,计算机是一面镜子,它反映
了我们教给它的人类的任何想法。

所以我敢肯定,你们中的很多人最近都听说过

很多关于人工智能的事情

大部分对话是,

我们可以建造它吗?

我们可以制造一台智能计算机吗?

我们可以制造一台有创意的计算机吗?

我们似乎一遍又一遍地问,

我们能不能造出类似人类的计算机?

但是我们刚才看到的

是,人类
不是一个科学事实

,它是一个不断变化的、
串联的概念,

并且随着时间的推移而变化。

因此,当我们开始
应对

未来人工智能的想法时,

我们不应该只问自己,

“我们能建造它吗?”

但我们也应该问自己,


我们希望向我们反映什么关于人类的想法?”

这是一个本质上是哲学的想法

,它不能
仅用软件来回答,

但我认为需要片刻
的物种范围内的存在主义反思。

谢谢你。

(掌声)