The Technology Behind OpenAI's Fiction-Writing, Fake-News-Spewing A.I., Explained

The language model can write like a human, but it doesn't have a clue what it's saying

Go to the profile of MIT Technology Review
MIT Technology Review BlockedUnblockFollowFollowing Mar 4
BlockedUnblockFollow关注3月4日



Illustration: Ms. Tech
插图:科技女士

By Karen Hao

On Feb. 14, the nonprofit research firm OpenAI released a
2月14日,非营利性研究公司OpenAI发布了一份new language model capable of generating convincing passages of prose.
能够产生令人信服的散文段落。So convincing, in fact, that the researchers have refrained from open-sourcing the code, in hopes of stalling its potential weaponization as a means of
事实上,研究人员已经避免了开源代码,希望将其潜在的武器化作为一种手段,mass-producing fake news.
.

While the impressive results are a remarkable leap beyond what existing language models have achieved, the technique involved isn't exactly new. Instead, the breakthrough was driven primarily by feeding the algorithm ever more training data --- a trick that has also been responsible for most of the other recent advancements in teaching A.I. to read and write. "It's kind of surprising people in terms of what you can do with [...] more data and bigger models," says Percy Liang, a computer science professor at Stanford.
虽然令人印象深刻的结果是超越现有语言模型所取得的显着飞跃,但所涉及的技术并不是全新的。相反,这一突破主要是通过为算法提供更多的训练数据来推动的 - 这一技巧也是教授AI阅读和写作的大多数其他近期进步的原因。斯坦福大学计算机科学教授Percy Liang说:"对于你可以用更多的数据和更大的模型做什么,这是一种令人惊讶的人。"

The passages of text that the model produces are good enough to masquerade as something human-written. But this ability should not be confused with a genuine understanding of language --- the ultimate goal of the subfield of A.I. known as natural-language processing (NLP). (There's an analogue in computer vision: An algorithm can synthesize highly realistic images without any true visual comprehension.) In fact, getting machines to that level of understanding is a task that has largely eluded NLP researchers. That goal could take years, even decades, to achieve, surmises Liang, and is likely to involve techniques that don't yet exist.
模型产生的文本段落足以伪装成人类书写的东西。但是这种能力不应该与对语言的真正理解相混淆 - 人工智能子领域的最终目标是自然语言处理(NLP)。 (计算机视觉中有一个模拟:算法可以合成高度逼真的图像,而不需要任何真正的视觉理解。)事实上,让机器达到理解水平是一项很大程度上让NLP研究人员无法完成的任务。这个目标可能需要数年甚至数十年才能实现,推测梁,并且很可能涉及尚不存在的技术。

Four different philosophies of language currently drive the development of NLP techniques. Let's begin with the one used by OpenAI.
目前推动NLP技术的发展。让我们从OpenAI使用的那个开始。

1. Distributional semantics


Linguistic philosophy

Words derive meaning from how they are used. For example, the words "cat" and "dog" are related in meaning because they are used more or less the same way. You can feed and pet a cat, and you feed and pet a dog. You can't, however, feed and pet an orange.
单词来源于它们的使用方式。例如,单词"cat"和"dog"在含义上是相关的,因为它们或多或少地以相同的方式使用。你可以喂养和宠物猫,你喂养和宠物狗。但是,你不能喂食和喂橙色。

How it translates to NLP

Algorithms based on distributional semantics have been largely responsible for
基于分布式语义的算法在很大程度上负责the recent breakthroughs in NLP. They use
. They use machine learning to process text, finding patterns by essentially counting how often and how closely words are used in relation to one another. The resultant models can then use those patterns to construct complete sentences or paragraphs, and power things like autocomplete or other predictive text systems. In recent years, some researchers have also begun experimenting with looking at the distributions of random character sequences rather than words, so models can more flexibly handle acronyms, punctuation, slang, and other things that don't appear in the dictionary, as well as languages that don't have clear delineations between words.
处理文本,通过基本上计算单词相对于彼此的使用频率和接近程度来查找模式。然后,结果模型可以使用这些模式来构建完整的句子或段落,并为自动完成或其他预测文本系统提供支持。近年来,一些研究人员也开始尝试查看随机字符序列而不是单词的分布,因此模型可以更灵活地处理首字母缩略词,标点符号,俚语和其他未出现在字典中的内容,以及单词之间没有明确界定的语言。

Pros

These algorithms are flexible and scalable because they can be applied within any context and learn from unlabeled data.
这些算法具有灵活性和可扩展性,因为它们可以在任何上下文中应用,并从未标记的数据中学习。

Cons

The models they produce don't actually understand the sentences they construct. At the end of the day, they're writing prose using word associations.
他们制作的模型实际上并不理解他们构建的句子。在一天结束时,他们使用单词关联撰写散文。

2. Frame semantics


Linguistic philosophy

Language is used to describe actions and events, so sentences can be subdivided into subjects, verbs, and modifiers --- 
语言用于描述动作和事件,因此句子可以细分为主语,动词和修饰语--- who ,
, what ,
, where , and
, and when .
.

How it translates to NLP

Algorithms based on frame semantics use a set of rules or lots of labeled training data to learn to deconstruct sentences. This makes them particularly good at parsing simple commands --- and thus useful for chatbots or voice assistants. If you asked Alexa to "find a restaurant with four stars for tomorrow," for example, such an algorithm would figure out how to execute the sentence by breaking it down into the action ("find"), the
基于帧语义的算法使用一组规则或许多标记的训练数据来学习解构句子。这使得他们特别擅长解析简单命令 - 因此对聊天机器人或语音助理非常有用。例如,如果你让Alexa"找到明天有四颗星的餐馆",那么这样的算法会弄清楚如何通过将其分解为动作来执行句子("查找"), what ("restaurant with four stars"), and the
("四星级餐厅")和 when ("tomorrow").
("tomorrow").

Pros

Unlike distributional-semantic algorithms, which don't understand the text they learn from, frame-semantic algorithms can distinguish the different pieces of information in a sentence. These can be used to answer questions like "When is this event taking place?"
与不了解他们所学习的文本的分布式语义算法不同,帧语义算法可以区分句子中的不同信息。这些可用于回答诸如"此事件何时发生?"之类的问题。

Cons

These algorithms can only handle very simple sentences and therefore fail to capture nuance. Because they require a lot of context-specific training, they're also not flexible.
这些算法只能处理非常简单的句子,因此无法捕捉细微差别。因为它们需要大量特定于上下文的培训,所以它们也不灵活。

3. Model-theoretical semantics

Linguistic philosophy

Language is used to communicate human knowledge.
语言用于传播人类知识。

How it translates to NLP

Model-theoretical semantics is based on an old idea in A.I. that all of human knowledge can be encoded, or
模型理论语义基于人工智能中的旧观念,即所有人类知识都可以被编码,或者 modeled , in a series of logical rules. So if you know that birds can fly, and eagles are birds, then you can deduce that eagles can fly. This approach is no longer in vogue because researchers soon realized there were too many exceptions to each rule (for example, penguins are birds but can't fly). But algorithms based on model-theoretical semantics are still useful for extracting information from models of knowledge, like databases. Like frame-semantics algorithms, they parse sentences by deconstructing them into parts. But whereas frame semantics defines those parts as the
,在一系列逻辑规则中。因此,如果您知道鸟类可以飞翔,而鹰是鸟类,那么您可以推断出鹰可以飞翔。这种方法不再流行,因为研究人员很快意识到每条规则都有太多的例外(例如,企鹅是鸟类但不能飞行)。但是,基于模型 - 理论语义的算法对于从知识模型(如数据库)中提取信息仍然很有用。与帧语义算法一样,它们通过将句子解构为部分来解析句子。但是框架语义将那些部分定义为 who ,
, what ,
, where , and
, and when , model-theoretical semantics defines them as the logical rules encoding knowledge. For example, consider the question "What is the largest city in Europe by population?" A model-theoretical algorithm would break it down into a series of self-contained queries: "What are all the cities in the world?" "Which ones are in Europe?" "What are the cities' populations?" "Which population is the largest?" It would then be able to traverse the model of knowledge to get you your final answer.
,模型 - 理论语义将它们定义为编码知识的逻辑规则。例如,考虑一个问题"人口中欧洲最大的城市是什么?"模型理论算法将其分解为一系列独立的查询:"世界上所有城市都是什么?" "哪些在欧洲?" "城市的人口是多少?" "哪个人口最多?"然后,它将能够遍历知识模型,为您提供最终答案。

Pros

These algorithms give machines the ability to answer complex and nuanced questions.
这些算法使机器能够回答复杂而细微的问题。

Cons

They require a model of knowledge, which is time-consuming to build, and are not flexible across different contexts.
它们需要一种知识模型,这种模型构建起来非常耗时,并且在不同的环境中不灵活。

4. Grounded semantics


Linguistic philosophy

Language derives meaning from lived experience. In other words, humans created language to achieve their goals, so it must be understood within the context of our goal-oriented world.
语言源于生活经验的意义。换句话说,人类创造了语言来实现他们的目标,因此必须在我们以目标为导向的世界的背景下理解它。

How it translates to NLP

This is the newest approach and the one that Liang thinks holds the most promise. It tries to mimic how humans pick up language over the course of their life: The machine starts with a blank state and learns to associate words with the correct meanings through conversation and interaction. In a simple example, if you wanted to teach a computer how to move objects around in a virtual world, you would give it a command like "Move the red block to the left" and then show it what you meant. Over time, the machine would learn to understand and execute the commands without help.
这是最新的方法,也是梁认为最有希望的方法。它试图模仿人类在生命过程中如何获取语言:机器以空白状态开始,并学会通过对话和交互将单词与正确的含义联系起来。在一个简单的例子中,如果你想教一台计算机如何在虚拟世界中移动物体,你会给它一个命令,如"将红色块移到左边",然后显示它的意思。随着时间的推移,机器将学会理解并执行命令而无需帮助。

Pros

In theory, these algorithms should be very flexible and get the closest to a genuine understanding of language.
理论上,这些算法应该非常灵活,并且最接近对语言的真正理解。

Cons

Teaching is very time intensive --- and not all words and phrases are as easy to illustrate as "Move the red block."
教学是非常耗时的 - 并不是所有的单词和短语都像"移动红色块"一样容易说明。

In the short term, Liang thinks, the field of NLP will see much more progress from exploiting existing techniques, particularly those based on distributional semantics. But in the longer term, he believes, they all have limits. "There's probably a qualitative gap between the way that humans understand language and perceive the world and our current models," he says. Closing that gap would probably require a new way of thinking, he adds, as well as much more time.
在短期内,梁认为,NLP领域将从利用现有技术,特别是那些基于分布语义的技术中获得更多进展。但从长远来看,他认为,他们都有限制。 "人类理解语言和感知世界的方式与我们现有的模型之间可能存在质的差距,"他说。他补充说,缩小这一差距可能需要一种新的思维方式,以及更多的时间。

查看英文原文

查看更多文章

公众号:银河系1号
公众号:银河系1号

联系邮箱:public@space-explore.com
联系邮箱:public@space-explore.com

(未经同意,请勿转载)
(未经同意,请勿转载)