立即打开
距离机器人读懂诗歌,还有几年?

距离机器人读懂诗歌,还有几年?

Jeremy Kahn 2020-08-23
语言处理正在进入一个黄金时代,曾经不可能完成的任务越来越触手可及。

今年1月,我为《财富》杂志撰写了一篇特别报道,纵论方兴未艾的自然语言处理(NLP)革命。这些人工智能系统不仅可以操纵语言,而且在一定程度上还能够“理解”语言。

语言处理正在进入一个黄金时代,曾经不可能完成的任务越来越触手可及。这些新系统已经开始改变企业的运作方式,并且有望在未来几年以一种更为戏剧化的方式实现这一转变。

今年夏天出现了一些令人震惊的例证,充分彰显了这些方法所能取得的成就。人们讨论最多的是研究机构OpenAI开发的GPT-3系统。它可以从人类书写的一两行文字提示中生成条理清楚的长篇大论。在许多情况下,系统生成的内容与人类书写的文本没有什么区别。

目前,GPT-3仍然只是一种派对把戏。例如,它很难控制系统生成的内容是否符合事实,是否过滤掉它可能从庞大的训练集(其中不仅包括莎士比亚的所有作品,还包括像Reddit这样的人类美德库)中获取的种族主义或歧视女性想法。但一些公司已经开始围绕它开发真正的产品。比如,一家公司正在创建的系统能够从几个要点中生成完整的电子邮件;一家法律技术公司正在试验GPT-3,看它能否在诉讼发现和合规方面有所帮助。

旧金山另一家人工智能公司Primer开发了一款文档分析软件。多家美国情报机构都是它的客户。8月18日,该公司发布了一个名为Primer Labs的网站,意在展示它在过去一年中创建的三个NLP系统,并允许任何人上传任何文本来使用这项技术。

早在去年12月,我就为撰写那篇谈论NLP的特别报道采访过Primer科学总监约翰·博汉农。上周,我又通过Zoom对他进行了采访。博汉农告诉我,自从我们第一次谈话以来,这项技术一直在加速发展。

他将NLP领域正在发生的事情描述为“一场工业革命”。现在,将多个NLP工具组合在一起成为可能——就像机械工程师将锅炉、飞轮、传送带和压力机结合起来一样——从而创造出一些能够在实际业务中从事实际工作的系统。建立这些系统变得越来越容易。“过去需要几个月,现在只需要一周时间。”他说。

博汉农给了我提前进入Primer Labs的访问权,让我用自己选择的文本进行试验。

第一个工具:问答

上传任何文档,然后你就可以用自然语言提问,提示系统在文本中找到答案。系统还会提示一些你可能想问的问题。

·对于一篇关于民主党总统候选人乔·拜登选择贺锦丽作为副总统人选的新闻简报,这款软件在回答一系列问题时表现得非常出色。

·然而,当我上传制药巨头默沙东公司在2012年提交给美国证券交易委员会的一份长达159页,约10万字的文件时,这款软件的表现却差强人意,缺乏连贯性。我问它默沙东公司2011年的销售额是多少,它给出了正确的答案:480亿美元。但当我问它该公司的营业利润是多少时,我收到的信息是,软件“在回答这个特定问题时遇到了困难。” 对于该公司奉行什么样的收入确认政策这一问题,我收到了一个不准确但很搞笑的回答:“非公认会计原则每股收益是公司的收入确认政策。”

下一个Primer工具:“实体识别”

它的任务是识别文档中所有专有名称,并弄清楚文本中哪些代词指的是哪些人或哪些组织。对人类来说,这项任务相对简单,尽管有时候非常耗时。但它向来都让计算机望而却步。这个例子表明,NLP革命现在帮助软件掌握了新技能。在Primer 发布的基准测试中,其系统的表现优于谷歌和Facebook开发的类似软件。

·为了给Primer软件出难题,我特意上传了一篇谈论19世纪法国作家乔治·桑和维克多·雨果的文章。需要指出的是,乔治·桑其实是一位女作家的笔名,尽管它听起来很像男性的名字(她的原名是阿曼蒂娜-露西-奥萝尔·杜班)。我的如意算盘是,系统可能会发蒙,无法判断代词“他”究竟指的是桑,还是雨果。但令我惊讶的是,其表现完美无缺,它明白这段话中的每一个“他 ”都是指雨果,而“她 ”指的是桑。

Primer Labs工具执行的最后一项,或许也是最困难的任务:总结

对人类来说,准确地总结长文也是很困难的。而衡量一段摘要的有用程度往往是一件非常主观的事情。但Primer想出了一个聪明的办法——根据BERT自动判断摘要的质量。BERT是谷歌创建并免费提供的一个非常庞大的语言模型,以“屏蔽语言模型”著称,因为它的训练包括学习如何正确猜出文本中隐藏的单词。Primer开发的BLANC系统通过评估BERT在摘要填空游戏中的表现有多好来评判摘要。BERT做得越好,摘要的质量就越高。借助于BLANC系统,Primer能够训练出一个可以生成非常流畅的摘要的总结工具。

·我给Primer的总结工具上传了一篇我为《财富》杂志8 / 9月刊撰写的专题报道,内容是阿斯利康制药如何在追寻新冠病毒疫苗的过程中,成功地走在了制药巨头的前列。这款软件在总结这篇长文方面的出色表现给我留下了深刻印象。它抓住了阿斯利康制药成功转型的关键点,以及新冠疫苗的极端重要性。

·但这个系统还远远不够完美。该工具的另一个部分试图将文本精简为几个要点,而不是整个段落。在这里,它输出的结果非常奇怪地偏离了文本要旨:这款软件专注于文章开头提及的一则轶事所包含的事实信息(尽管这些信息无关主旨,并不重要),但忽略了文章正文中包含的关键点。

·出于搞笑的目的,我给系统输入了T.S. ·艾略特的经典作品《J. ·阿尔弗瑞德·普鲁弗洛克的情歌》。博汉农事先警告我说,这款软件很难总结创意文字,尤其是诗歌,而结果也确实不够理想。除了对“房间里的女人们来往穿梭,谈论着米开朗基罗”这行诗歌理解到位之外,系统并不确定到底发生了什么。很多高中生大概都能感同身受。但没有一个英语老师会给Primer的成绩打高分。(有趣的是,GPT-3在写诗方面表现得还不错。但这并不意味着它能真正理解自己在写什么。)

话又说回来,诗歌可能不是最迫切需要Primer产品施以援手的商业领域。总结是一个巨大的潜在市场。1995年,对一位负责追踪某个国家动态的美国情报分析师每天的阅读量要求只有2万字(大约相当于《纽约客》杂志的两篇长文)。到2016年,同一位分析师的每日阅读量估计要达到20万字——超过了看书最快的读者在24小时内的阅读极限。这种现象也在影响着金融和法律领域的分析师。而对于那些试图跟上爆炸式增长的学术论文的科学界人士来说,这同样是一个大问题。(事实上,为了帮助广大公众应对疫情,Primer专门创建了一个网站来总结每天发布的关于新冠病毒的新论文。)

因此,NLP革命来得正是时候。能够简缩、总结,以及从文本中提取信息的自动化工具正变得越来越重要。如今的NLP技术还不够完美,但它已经足够好,完全有能力在广泛的领域一展身手。(财富中文网)

译者:任文科

今年1月,我为《财富》杂志撰写了一篇特别报道,纵论方兴未艾的自然语言处理(NLP)革命。这些人工智能系统不仅可以操纵语言,而且在一定程度上还能够“理解”语言。

语言处理正在进入一个黄金时代,曾经不可能完成的任务越来越触手可及。这些新系统已经开始改变企业的运作方式,并且有望在未来几年以一种更为戏剧化的方式实现这一转变。

今年夏天出现了一些令人震惊的例证,充分彰显了这些方法所能取得的成就。人们讨论最多的是研究机构OpenAI开发的GPT-3系统。它可以从人类书写的一两行文字提示中生成条理清楚的长篇大论。在许多情况下,系统生成的内容与人类书写的文本没有什么区别。

目前,GPT-3仍然只是一种派对把戏。例如,它很难控制系统生成的内容是否符合事实,是否过滤掉它可能从庞大的训练集(其中不仅包括莎士比亚的所有作品,还包括像Reddit这样的人类美德库)中获取的种族主义或歧视女性想法。但一些公司已经开始围绕它开发真正的产品。比如,一家公司正在创建的系统能够从几个要点中生成完整的电子邮件;一家法律技术公司正在试验GPT-3,看它能否在诉讼发现和合规方面有所帮助。

旧金山另一家人工智能公司Primer开发了一款文档分析软件。多家美国情报机构都是它的客户。8月18日,该公司发布了一个名为Primer Labs的网站,意在展示它在过去一年中创建的三个NLP系统,并允许任何人上传任何文本来使用这项技术。

早在去年12月,我就为撰写那篇谈论NLP的特别报道采访过Primer科学总监约翰·博汉农。上周,我又通过Zoom对他进行了采访。博汉农告诉我,自从我们第一次谈话以来,这项技术一直在加速发展。

他将NLP领域正在发生的事情描述为“一场工业革命”。现在,将多个NLP工具组合在一起成为可能——就像机械工程师将锅炉、飞轮、传送带和压力机结合起来一样——从而创造出一些能够在实际业务中从事实际工作的系统。建立这些系统变得越来越容易。“过去需要几个月,现在只需要一周时间。”他说。

博汉农给了我提前进入Primer Labs的访问权,让我用自己选择的文本进行试验。

第一个工具:问答

上传任何文档,然后你就可以用自然语言提问,提示系统在文本中找到答案。系统还会提示一些你可能想问的问题。

·对于一篇关于民主党总统候选人乔·拜登选择贺锦丽作为副总统人选的新闻简报,这款软件在回答一系列问题时表现得非常出色。

·然而,当我上传制药巨头默沙东公司在2012年提交给美国证券交易委员会的一份长达159页,约10万字的文件时,这款软件的表现却差强人意,缺乏连贯性。我问它默沙东公司2011年的销售额是多少,它给出了正确的答案:480亿美元。但当我问它该公司的营业利润是多少时,我收到的信息是,软件“在回答这个特定问题时遇到了困难。” 对于该公司奉行什么样的收入确认政策这一问题,我收到了一个不准确但很搞笑的回答:“非公认会计原则每股收益是公司的收入确认政策。”

下一个Primer工具:“实体识别”

它的任务是识别文档中所有专有名称,并弄清楚文本中哪些代词指的是哪些人或哪些组织。对人类来说,这项任务相对简单,尽管有时候非常耗时。但它向来都让计算机望而却步。这个例子表明,NLP革命现在帮助软件掌握了新技能。在Primer 发布的基准测试中,其系统的表现优于谷歌和Facebook开发的类似软件。

·为了给Primer软件出难题,我特意上传了一篇谈论19世纪法国作家乔治·桑和维克多·雨果的文章。需要指出的是,乔治·桑其实是一位女作家的笔名,尽管它听起来很像男性的名字(她的原名是阿曼蒂娜-露西-奥萝尔·杜班)。我的如意算盘是,系统可能会发蒙,无法判断代词“他”究竟指的是桑,还是雨果。但令我惊讶的是,其表现完美无缺,它明白这段话中的每一个“他 ”都是指雨果,而“她 ”指的是桑。

Primer Labs工具执行的最后一项,或许也是最困难的任务:总结

对人类来说,准确地总结长文也是很困难的。而衡量一段摘要的有用程度往往是一件非常主观的事情。但Primer想出了一个聪明的办法——根据BERT自动判断摘要的质量。BERT是谷歌创建并免费提供的一个非常庞大的语言模型,以“屏蔽语言模型”著称,因为它的训练包括学习如何正确猜出文本中隐藏的单词。Primer开发的BLANC系统通过评估BERT在摘要填空游戏中的表现有多好来评判摘要。BERT做得越好,摘要的质量就越高。借助于BLANC系统,Primer能够训练出一个可以生成非常流畅的摘要的总结工具。

·我给Primer的总结工具上传了一篇我为《财富》杂志8 / 9月刊撰写的专题报道,内容是阿斯利康制药如何在追寻新冠病毒疫苗的过程中,成功地走在了制药巨头的前列。这款软件在总结这篇长文方面的出色表现给我留下了深刻印象。它抓住了阿斯利康制药成功转型的关键点,以及新冠疫苗的极端重要性。

·但这个系统还远远不够完美。该工具的另一个部分试图将文本精简为几个要点,而不是整个段落。在这里,它输出的结果非常奇怪地偏离了文本要旨:这款软件专注于文章开头提及的一则轶事所包含的事实信息(尽管这些信息无关主旨,并不重要),但忽略了文章正文中包含的关键点。

·出于搞笑的目的,我给系统输入了T.S. ·艾略特的经典作品《J. ·阿尔弗瑞德·普鲁弗洛克的情歌》。博汉农事先警告我说,这款软件很难总结创意文字,尤其是诗歌,而结果也确实不够理想。除了对“房间里的女人们来往穿梭,谈论着米开朗基罗”这行诗歌理解到位之外,系统并不确定到底发生了什么。很多高中生大概都能感同身受。但没有一个英语老师会给Primer的成绩打高分。(有趣的是,GPT-3在写诗方面表现得还不错。但这并不意味着它能真正理解自己在写什么。)

话又说回来,诗歌可能不是最迫切需要Primer产品施以援手的商业领域。总结是一个巨大的潜在市场。1995年,对一位负责追踪某个国家动态的美国情报分析师每天的阅读量要求只有2万字(大约相当于《纽约客》杂志的两篇长文)。到2016年,同一位分析师的每日阅读量估计要达到20万字——超过了看书最快的读者在24小时内的阅读极限。这种现象也在影响着金融和法律领域的分析师。而对于那些试图跟上爆炸式增长的学术论文的科学界人士来说,这同样是一个大问题。(事实上,为了帮助广大公众应对疫情,Primer专门创建了一个网站来总结每天发布的关于新冠病毒的新论文。)

因此,NLP革命来得正是时候。能够简缩、总结,以及从文本中提取信息的自动化工具正变得越来越重要。如今的NLP技术还不够完美,但它已经足够好,完全有能力在广泛的领域一展身手。(财富中文网)

译者:任文科

Back in January, I wrote a big story for Fortune about the ongoing revolution in natural language processing. These are A.I. systems that can manipulate and, to some degree, “understand” language.

Language processing is now entering a kind of golden age, in which once impossible tasks are increasingly within reach. These new systems are already starting to transform how businesses operate—and they stand poised to do so in a much bigger way in the coming years.

This summer has seen some startling examples of what these methods can accomplish. The most discussed breakthrough has been OpenAI's GPT-3, which can generate long passages of coherent prose from a human-written prompt of just a line or two. In many cases, what the system generates is indistinguishable from human-written text.

GPT-3 is, for the moment, still something of a party trick—it is difficult to control, for instance, whether what the system generates is factually accurate, or to filter out racist or misogynistic ideas that it might have picked up from its large training set (which included not only the complete works of Shakespeare, but such repositories of human virtue as Reddit). But some companies are starting to build real products around it: One is creating a system that will generate complete emails from just a few bullet points. And a legal technology firm is experimenting with GPT-3 to see if it can aid in litigation discovery and compliance.

Another San Francisco A.I. company, Primer, creates software that helps analyze documents. It counts a number of U.S. intelligence agencies among its customers. It unveils a website on August 18, Primer Labs, that showcases three NLP systems it built in the past year and allows anyone to upload any text to play around with the tech.

I had interviewed John Bohannon, Primer’s Director of Science, back in December for that feature about NLP. Last week, I caught up with him again by Zoom. Bohannon told me things have only accelerated since we first talked.

He describes what is happening in NLP as “an industrial revolution,” where it is now becoming possible to string together multiple NLP tools—much the same way a mechanical engineer might combine boilers, flywheels, conveyor belts and presses—to create systems that can do real work in real businesses. And building these systems is getting easier and easier. “What used to take months,” he says, “now takes a week.”

Bohannon gave me early access to Primer Labs to let me experiment on texts of my own choosing.

The first tool: question-answering.

Upload any document and you can then ask questions in natural language to prompt the system to find an answer in the text. The system also suggests questions that you might want to ask.

·The software was fantastic at answering a series of questions about a simple news story on Joe Biden’s selection of Kamala Harris as his veep pick.

·However, when I uploaded a 2012 Securities and Exchange Commission filing from the pharmaceutical giant Merck that runs to 159 pages and about 100,000 words, its performance was hit-and-miss. When I asked it what Merck's sales were in 2011, it returned the correct answer: $48 billion. But when I asked it what the company’s operating profit was, I received a message that the software “was having trouble answering that particular question.” And when I asked it what the company’s revenue recognition policies were, I received the inaccurate but hilarious reply that “non-GAAP EPS is the company's revenue recognition policies.”

The next Primer tool: “named entity recognition.”

This is the task of identifying all the proper names in a document and figuring out which pronouns in the text refer to which people or which organizations. This task is relatively easy—if time-consuming—for humans, but it's historically stumped computers. It is a good example of a skill that is now within software’s grasp thanks to the NLP revolution. In benchmark tests Primer has published, its system has outperformed similar software created by Google and Facebook.

·I tried to stump Primer’s software by giving it a passage about the 19th-century French authors George Sand and Victor Hugo. I was hoping that the fact Sand is the male nom de plume of a female writer (her real name was Amantine Lucile Aurore Dupin) would confuse the system when it had to decide whether the pronoun “he” belonged to Sand or Hugo. But, to my surprise, the system performed flawlessly, understanding that every “he” in the passage referred to Hugo while “she” referred to Sands.

The final and perhaps most difficult task Primer Labs’ tools perform: summarization.

Accurately summarizing long documents is difficult for humans too. And gauging how useful a summary is can be highly subjective. But Primer came up with a clever way to automatically judge summary quality based on BERT, a very large language model that Google created and has made freely available. BERT is what is known as a “masked language model,” because its training consists of learning how to correctly guess what a hidden word in a text is. Primer's BLANC judges summaries by assessing how much better BERT performs in this fill-in-the-blank game after having accessed the summary. The better BERT does, the better the summary. Thanks to BLANC, Primer was able to train a summarization tool that can generate pretty fluent summaries.

·I fed Primer’s summarization tool a feature story I wrote for Fortune’s August/September double-issue about how AstraZeneca has managed to leap ahead of its Big Pharma rivals in the quest for a COVID-19 vaccine. I was impressed at how well the software did in abstracting the lengthy article. It captured key points about AstraZeneca’s corporate turnaround as well as the importance of a COVID-19 vaccine.

·But the system is still far from perfect. Another part of the tool tries to reduce the text to just a handful of key bullet points instead of whole paragraphs. Here the results were strangely off-base: The software fixated on factual information from an anecdote at the beginning of the article that was not essential, and yet missed crucial points contained further down in the body of the piece.

·For a laugh, I fed the system T.S. Eliot’s “The Love Song of J. Alfred Prufrock.” Bohannon had warned me that the software would struggle to summarize more creative writing, particularly poetry, and the results were not pretty. Other than the fact that “the women come and go, speaking of Michelangelo,” the system wasn’t really sure what was happening. A lot of high school students could probably sympathize. But no English teacher would give Primer’s results high marks. (Interestingly, GPT-3 isn't half bad at writing poetry. But that doesn't mean it has any real understanding of what it's writing.)

Then again, poetry is probably not the most pressing business case for Primer’s products. Summarization is a huge potential market. In 1995, the average daily reading requirement of a U.S. intelligence analyst assigned to follow the events in one country was just 20,000 words (or about the equivalent of two New Yorker longreads). By 2016, the same analyst’s daily reading load was estimated at 200,000 words—more than the most capable speed reader could possibly skim in 24 hours. This phenomenon is affecting analysts in finance and law too, and is a huge issue for people in the sciences trying to keep up with the explosion in published research. (In fact, to help out during the pandemic, Primer has created a site that summarizes each day’s new research papers on COVID-19.)

So the NLP revolution has arrived not a moment too soon. Automated tools that help condense and summarize and extract information from written text are becoming more and more essential. Today’s NLP isn’t perfect—but it is getting good enough to make a difference.

热读文章
热门视频
扫描二维码下载财富APP