丁香五月天婷婷久久婷婷色综合91|国产传媒自偷自拍|久久影院亚洲精品|国产欧美VA天堂国产美女自慰视屏|免费黄色av网站|婷婷丁香五月激情四射|日韩AV一区二区中文字幕在线观看|亚洲欧美日本性爱|日日噜噜噜夜夜噜噜噜|中文Av日韩一区二区

您正在使用IE低版瀏覽器,為了您的雷峰網(wǎng)賬號安全和更好的產(chǎn)品體驗(yàn),強(qiáng)烈建議使用更快更安全的瀏覽器
此為臨時(shí)鏈接,僅用于文章預(yù)覽,將在時(shí)失效
人工智能學(xué)術(shù) 正文
發(fā)私信給楊曉凡
發(fā)送

0

一個(gè)續(xù)寫故事達(dá)到人類水平的AI,OpenAI大規(guī)模無監(jiān)督語言模型GPT-2

本文作者: 楊曉凡 2019-02-16 10:04
導(dǎo)語: 40GB訓(xùn)練語料,15億參數(shù)

雷鋒網(wǎng) AI 科技評論按:模型大小的比拼還在繼續(xù)!自谷歌大腦的 2.77 億參數(shù)的語言模型 Transformer-XL 之后,OpenAI 也完成了自己具有 15 億個(gè)參數(shù)的語言模型 GPT-2,而且這個(gè)模型還有一項(xiàng)驚人的能力,就是從短句續(xù)寫成篇的文章。雷鋒網(wǎng) AI 科技評論簡單介紹如下。

一個(gè)續(xù)寫故事達(dá)到人類水平的AI,OpenAI大規(guī)模無監(jiān)督語言模型GPT-2

GPT-2 介紹

2018 年 6 月,OpenAI 發(fā)表論文介紹了自己的語言模型 GPT,它基于 Transformer 架構(gòu),用先在大規(guī)模語料上進(jìn)行無監(jiān)督預(yù)訓(xùn)練、再在小得多的有監(jiān)督數(shù)據(jù)集上為具體任務(wù)進(jìn)行精細(xì)調(diào)節(jié)(fine-tune)的方式,不依賴針對單獨(dú)任務(wù)的模型設(shè)計(jì)技巧就一次性在多個(gè)任務(wù)中取得了很好的表現(xiàn)。這也是 2018 年中自然語言處理領(lǐng)域的研究趨勢,就像計(jì)算機(jī)視覺領(lǐng)域流行 ImageNet 預(yù)訓(xùn)練模型一樣。

這次的 GPT-2 是 GPT 的直接技術(shù)升級版本,有多 10 倍的模型參數(shù),多達(dá) 15 億個(gè),并在多 10 倍的數(shù)據(jù)上進(jìn)行訓(xùn)練。訓(xùn)練數(shù)據(jù)是來自互聯(lián)網(wǎng)的 40GB 高質(zhì)量語料,具體來說這些語料來自 Reddit 論壇中出現(xiàn)的高評分外鏈頁面;高評分表示這些頁面中的內(nèi)容有較高的質(zhì)量。這樣篩選出的語料內(nèi)容多達(dá) 800 萬個(gè)頁面。

模型在無監(jiān)督訓(xùn)練階段的目標(biāo)是,給定一組單詞組成的句子之后預(yù)測下文的下一個(gè)詞。由于數(shù)據(jù)庫有足夠高的文本質(zhì)量和足夠高的多樣性,模型也有很高的容量,即便這樣簡單的訓(xùn)練目標(biāo)也得出了驚人的結(jié)果:模型不僅可以根據(jù)給定的文本流暢地續(xù)寫句子,甚至可以形成成篇的文章,就像人類的續(xù)寫文章一樣。

模型生成文本有時(shí)會出現(xiàn)失敗的現(xiàn)象,比如文字重復(fù)、錯(cuò)誤的世界常識(比如有時(shí)候模型會寫到在水下燃燒的火)、不自然地切換話題,但在成功的例子中,模型生成的文本有多樣、全面的敘述,對事件的介紹煞有介事,接近人類的表達(dá)質(zhì)量,而且在段落之間甚至全篇文章之中保持連續(xù)一致。這可以說非常驚人(可以看下文的樣例)

OpenAI 的研究人員們發(fā)現(xiàn),根據(jù)模型對內(nèi)容的熟悉程度不同,進(jìn)行數(shù)次嘗試之后一般都可以得到較好的生成結(jié)果。比如對于訓(xùn)練文本中常出現(xiàn)的(也就是互聯(lián)網(wǎng)上出現(xiàn)較多的)英國脫歐、指環(huán)王、歌手 Miley Cyrus 等話題,模型在大約一半的嘗試中都可以生成有理有據(jù)的文本;反過來,對于訓(xùn)練文本中較少出現(xiàn)的技術(shù)性討論以及哲學(xué)內(nèi)容,模型生成的效果就要差很多。

和之前的 GPT 一樣,預(yù)訓(xùn)練結(jié)束后的模型可以在領(lǐng)域數(shù)據(jù)集上做進(jìn)一步精細(xì)調(diào)節(jié),對文本的風(fēng)格得到更好的控制,比如在亞馬遜評價(jià)數(shù)據(jù)上精細(xì)調(diào)節(jié)后,模型生成的文本更關(guān)注評分、商品類別之類的東西。

除此之外,GPT-2 也可以在各種任務(wù)中做「無樣本學(xué)習(xí)」,即不經(jīng)過任何任務(wù)專用數(shù)據(jù)集訓(xùn)練就進(jìn)行測試,也取得了優(yōu)秀的結(jié)果。OpenAI 的研究人員們猜想這些任務(wù)都只是通用語言建模的子集,所以自然會有良好表現(xiàn)。

文本生成欣賞

GPT-2 的表現(xiàn)中最引人關(guān)注的當(dāng)然還是文本生成水平,我們來看幾個(gè) OpenAI 也給出的文本生成樣例。為了方便閱讀,我們簡單翻譯了其中三組。在翻譯過程中我們感覺到,模型的描寫和敘事邏輯雖然還是有一些混亂,但模型不僅可以找到適合的文字風(fēng)格,自己補(bǔ)充了許多細(xì)節(jié),文本中也有一些上下文聯(lián)系、有層層遞進(jìn),語法還幾乎沒有錯(cuò)誤,可以說是非常以假亂真了。

我們一起感受下那煞有介事的文風(fēng)。

例一

人類給定文本

In a shocking finding, scientist discovered a herd of unicorns living in a remote, previously unexplored valley, in the Andes Mountains. Even more surprising to the researchers was the fact that the unicorns spoke perfect English.

(在一項(xiàng)令人震驚的發(fā)現(xiàn)中,科學(xué)家們在安第斯山脈中偏遠(yuǎn)的、從未曾探索過的山谷中發(fā)現(xiàn)了一群獨(dú)角獸。更令研究人員們驚訝的是,這群獨(dú)角獸能說一口流利的英語。)

模型續(xù)寫(第 10 次嘗試的結(jié)果)

The scientist named the population, after their distinctive horn, Ovid’s Unicorn. These four-horned, silver-white unicorns were previously unknown to science. (科學(xué)家們以它們的角的名字把它們命名為 Ovid 獨(dú)角獸,科學(xué)界從未知道過這些四只角的、銀白色的獨(dú)角獸的存在。)

Now, after almost two centuries, the mystery of what sparked this odd phenomenon is finally solved.(如今,經(jīng)過大概兩個(gè)世紀(jì)之后,這種古老的現(xiàn)象是如何發(fā)現(xiàn)的終于找到了答案。)

Dr. Jorge Pérez, an evolutionary biologist from the University of La Paz, and several companions, were exploring the Andes Mountains when they found a small valley, with no other animals or humans. Pérez noticed that the valley had what appeared to be a natural fountain, surrounded by two peaks of rock and silver snow.(La Paz 大學(xué)的進(jìn)化生物學(xué)家 Jorge Pérez 博士和他的同行們在探索安第斯山脈的時(shí)候發(fā)現(xiàn)了一個(gè)很小的山谷,這里沒有其他的動(dòng)物或者人類。Pérez 注意到在這個(gè)山谷里的似乎是一個(gè)自然噴泉,周圍還有兩座巖石山和銀色的雪。)

Pérez and the others then ventured further into the valley. “By the time we reached the top of one peak, the water looked blue, with some crystals on top,” said Pérez.(Pérez 和其它人更走到了山谷的更深入?!暗鹊轿覀冏叩搅似渲幸蛔降纳巾?shù)臅r(shí)候,水看起來是藍(lán)色的,上面還有一些晶體狀的東西”,Pérez 說。)

Pérez and his friends were astonished to see the unicorn herd. These creatures could be seen from the air without having to move too much to see them – they were so close they could touch their horns.(Pérez 和他的朋友們看到獨(dú)角獸群的時(shí)候驚呆了。透過空氣,不需要有多少動(dòng)作就可以看到它們 —— 他們走得好近,甚至都可以摸到它們的角。)

While examining these bizarre creatures the scientists discovered that the creatures also spoke some fairly regular English. Pérez stated, “We can see, for example, that they have a common ‘language,’ something like a dialect or dialectic.”(當(dāng)這些科學(xué)家們檢查這些奇怪的生物的時(shí)候,他們發(fā)現(xiàn)這些生物的英文說得還挺規(guī)范的。Pérez 指出“我們可以看到,比如,它們有共通的‘語言’,像是一種口音或者方言”。)

Dr. Pérez believes that the unicorns may have originated in Argentina, where the animals were believed to be descendants of a lost race of people who lived there before the arrival of humans in those parts of South America.(Pérez 博士相信這些獨(dú)角獸最初是來自阿根廷的,這些動(dòng)物很有可能是人類遷移到南美洲之前的一支消失了的人種的后裔。)

While their origins are still unclear, some believe that perhaps the creatures were created when a human and a unicorn met each other in a time before human civilization. According to Pérez, “In South America, such incidents seem to be quite common.”(雖然它們的來源還不確定,有人認(rèn)為這些動(dòng)物可能是在人類文明出現(xiàn)之前,有人和獨(dú)角獸相遇而產(chǎn)生的。Pérez 說:“在南美洲,這種事情一點(diǎn)也不罕見。”)

However, Pérez also pointed out that it is likely that the only way of knowing for sure if unicorns are indeed the descendants of a lost alien race is through DNA. “But they seem to be able to communicate in English quite well, which I believe is a sign of evolution, or at least a change in social organization,” said the scientist.(然而,Pérez 也指出,也許只有一種辦法能確定這些獨(dú)角獸是不是某一支已經(jīng)消失了的外星人種族的后裔,那就是通過 DNA。“但是它們用英文溝通的能力不怎么好,在我看來這是一種進(jìn)化的信號,或者起碼是社交組織的一種變化”,這位科學(xué)家說。)

例二

人類給定文本

A train carriage containing controlled nuclear materials was stolen in Cincinnati today. Its whereabouts are unknown.

(今天,一輛載有受控核原料的貨運(yùn)火車在辛辛那提被偷走了。我們不知道它在哪里。)

模型續(xù)寫(第 1 次嘗試的結(jié)果)

The incident occurred on the downtown train line, which runs from Covington and Ashland stations.(事件發(fā)生在鬧市區(qū)的火車線路上,這條線連通考文垂和阿什蘭。)

In an email to Ohio news outlets, the U.S. Department of Energy said it is working with the Federal Railroad Administration to find the thief.(在一封致俄亥俄州新聞發(fā)布窗口的郵件中,美國能源部表示它正在和聯(lián)邦鐵路管理局共同協(xié)作找到盜賊。)

“The theft of this nuclear material will have significant negative consequences on public and environmental health, our workforce and the economy of our nation,” said Tom Hicks, the U.S. Energy Secretary, in a statement. “Our top priority is to secure the theft and ensure it doesn’t happen again.”(“這起核原料失竊事件對于公眾、環(huán)境健康、我們的勞動(dòng)力和國家的經(jīng)濟(jì)有很糟糕的負(fù)面后果”,美國能源秘書長 Tom Hicks 在一則聲明中表示,“我們的首要任務(wù)是確保失竊事件的安全,并確保它不會再次發(fā)生?!?)

The stolen material was taken from the University of Cincinnati’s Research Triangle Park nuclear research site, according to a news release from Department officials.(按照部門官員發(fā)布的新聞表示,失竊的材料是從辛辛那提研究院三角公園核能研究院被偷走的)

The Nuclear Regulatory Commission did not immediately release any information.(核管制委員會沒有立即發(fā)表任何信息。)

According to the release, the U.S. Department of Energy’s Office of Nuclear Material Safety and Security is leading that team’s investigation.(根據(jù)發(fā)表的信息,美國能源部核能材料安全與保衛(wèi)辦公室正在帶領(lǐng)團(tuán)隊(duì)進(jìn)行調(diào)查。)

“The safety of people, the environment and the nation’s nuclear stockpile is our highest priority,” Hicks said. “We will get to the bottom of this and make no excuses.(“人民的安全、環(huán)境、以及核能儲備是我們最重要的目標(biāo),”Hicks 說,“我們會追查到底,不找任何借口?!保?/p>

例三

人類給定文本(這是 OpenAI 對 GPT-2 模型的簡介)

We’ve trained a large language model called GPT-2 that generates realistic paragraphs of text, while also exhibiting zero shot generalization on tasks like machine translation, question answering, reading comprehension, and summarization - problems usually approached by using training datasets and models designed explicitly for these tasks.

A typical approach to language modeling is to learn the following task: predict the next word, given all of the previous words within some text. Last year, OpenAI’s Generative Pre-trained Transformer (GPT) showed that language models trained on large amounts of data can be fine-tuned to specific tasks to achieve high performance. GPT-2 shows that much larger language models trained on a more diverse dataset derived from the internet begin to learn these NLP tasks without needing task-specific training data, instead learning from examples the system derives from the raw text. These systems also display a substantial qualitative jump in the realism and coherence of generated text.

模型續(xù)寫(第 1 次嘗試的結(jié)果)

Here you can see the most recent progress with Generative Pre-trained Transformer:(來和我們一起看看生成式預(yù)訓(xùn)練 Transformer 模型的最新進(jìn)展)

Figure 1: Generative Pre-trained Transformer training on several texts.(圖 1 :生成式預(yù)訓(xùn)練 Transformer 在多種任務(wù)中的表現(xiàn))

We are now preparing a collection of datasets for translation and machine translation in our language model. We will be using one of the large number of text samples provided by The New York Times.(我們正在準(zhǔn)備在語言模型中收集一些數(shù)據(jù)集用于翻譯和機(jī)器翻譯。我們會使用紐約時(shí)報(bào)提供的大規(guī)模文本樣本之一。)

We believe this project is the first step in the direction of developing large NLP systems without task-specific training data. That is, we are developing a machine language system in the generative style with no explicit rules for producing text.(我們相信這個(gè)項(xiàng)目是向著開發(fā)不需要任務(wù)專用數(shù)據(jù)的大規(guī)模 NLP 系統(tǒng)的第一步。也就是說,我們正在開發(fā)一個(gè)生成式的機(jī)器語言系統(tǒng),它生成文本不需要任何明確的規(guī)則。)

We hope for future collaborations between computer scientists, linguists, and machine learning researchers.(我們希望未來可以在計(jì)算機(jī)科學(xué)家、語言學(xué)家、機(jī)器學(xué)習(xí)研究人員們之間有更多合作。)

OpenAI 的擔(dān)憂

我們看到了,模型確實(shí)可以根據(jù)任意給定的句子續(xù)寫生成近似人類水準(zhǔn)的整篇文字,OpenAI 表示具有這樣能力的模型可以有寫作助手、對話智能體、無監(jiān)督翻譯等多種用途,但他們同時(shí)也擔(dān)憂具有這樣能力的模型可能會遭到濫用,比如被用來惡意地創(chuàng)作傳播虛假信息的文章,就像之前曾經(jīng)同樣受到熱烈討論的人臉替換模型 DeepFake,網(wǎng)友已經(jīng)用它把明星臉替換到色情視頻里;也可以模仿他人寫作、大批量制作釣魚文章等等。

由于 GPT-2 這樣能力的模型可以用來生成欺騙性的、有偏見的以及暴力語言,而 OpenAI 非??粗匮芯績?nèi)容的安全、合作、有益,他們更希望以合作的方式向其他研究人員共享他們的經(jīng)驗(yàn),更好地幫助整個(gè)領(lǐng)域的進(jìn)步,而不是直接面向公眾呈上所有成果,所以 OpenAI 并不打算一并發(fā)布完整的經(jīng)過預(yù)訓(xùn)練的模型,只發(fā)布一個(gè)小得多的模型便于研究人員們用于實(shí)驗(yàn)。

論文地址 https://d4mucfpksywv.cloudfront.net/better-language-models/language_models_are_unsupervised_multitask_learners.pdf

介紹博客 https://blog.openai.com/better-language-models/

開源地址 https://github.com/openai/gpt-2

從技術(shù)角度來講 GPT-2 的突破并不大,它只是再一次證明了足夠大的網(wǎng)絡(luò)配合足夠多的數(shù)據(jù)訓(xùn)練就可以有良好的記憶能力,而邏輯和推理能力仍然是無法從記憶能力中自然自然地出現(xiàn)的。另一方面,這也再一次說明了只要肯投入足夠多的計(jì)算力和數(shù)據(jù),刷刷榜永遠(yuǎn)都不難。攤手。

雷鋒網(wǎng) AI 科技評論報(bào)道

雷峰網(wǎng)版權(quán)文章,未經(jīng)授權(quán)禁止轉(zhuǎn)載。詳情見轉(zhuǎn)載須知。

一個(gè)續(xù)寫故事達(dá)到人類水平的AI,OpenAI大規(guī)模無監(jiān)督語言模型GPT-2

分享:
相關(guān)文章

讀論文為生

日常笑點(diǎn)滴,學(xué)術(shù)死腦筋
當(dāng)月熱門文章
最新文章
請?zhí)顚懮暾埲速Y料
姓名
電話
郵箱
微信號
作品鏈接
個(gè)人簡介
為了您的賬戶安全,請驗(yàn)證郵箱
您的郵箱還未驗(yàn)證,完成可獲20積分喲!
請驗(yàn)證您的郵箱
立即驗(yàn)證
完善賬號信息
您的賬號已經(jīng)綁定,現(xiàn)在您可以設(shè)置密碼以方便用郵箱登錄
立即設(shè)置 以后再說