北京物流信息联盟

【实测】谷歌翻译特朗普就职演讲,正确率如何(附技术原理解析)

2021-09-09 12:15:03

1新智元原创   

 作者: 王楠  刘小芹  胡祥杰

新智元日前宣布,获6家顶级机构总额达数千万元的PreA轮融资,蓝驰创投领投,红杉资本中国基金、高瓴智成、蓝湖资本 、蓝象资本跟投。本轮融资将用于新智元团队规模扩充并增加新产品服务线,目标打造 To B 的人工智能全产业链服务平台。

新智元启动新一轮大招聘:COO、执行总编、主编、高级编译、主笔、运营总监、客户经理、咨询总监、行政助理等 9 大岗位全面开放。 

简历投递:jobs@aiera.com.cn

HR 微信:13552313024

新智元为COO和执行总编提供最高超百万的年薪激励;为骨干员工提供最完整的培训体系、高于业界平均水平的工资和奖金。

加盟新智元,与人工智能业界领袖携手改变世界。


【新智元导读】 美国新总统特朗普1月21日发表就职演讲,讲话内容受到国内高度关注。新智元使用谷歌翻译对特朗普就职演讲的内容进行了翻译实测,发现谷歌翻译的准确率相当高,对于阅读层面来说基本可以满足。文章后半部分带来谷歌2016年最重要的人工智能技术突破之一——基于神经网络的机器翻译技术原理解析。


特别感谢立委@立委NLP频道带来的文章思路。点击阅读原文可查看立委文章《神经机译:川普宣告,米国人民今天站起来了》。



谷歌基于神经网络的机器翻译在2016年取得了重要进展,是较为重要的一项人工智能技术,那么,这个技术实用性如何?翻译质量怎么样?乘着特朗普就职演讲发表的机会,新智元带来测评。


以下是新智元在谷歌翻译中输入特朗普就职演讲英文后得到的中文结果,不到一分钟即可完成:


首席大法官罗伯茨,卡特总统,克林顿总统,布什总统,奥巴马总统,美国人和世界人民,谢谢。


我们,美国公民,现在加入了伟大的国家努力,重建我们的国家,恢复其对我们所有人民的承诺。


在一起,我们将决定美国和世界的路线许多,未来几年。我们将面临挑战,我们将面临艰难,但我们将完成这项工作。


每四年,我们将采取这些步骤,进行有秩序和和平的权力转移,。他们是壮观的。谢谢。


然而,今天的仪式具有非常特殊的意义,因为今天我们不只是将权力从一个政府转移到另一个政府,或从一个转移到另一个政府,而是我们从华盛顿转移权力,并把它交给你,人民。


长期以来,我们国家首都的一个小团体获得了政府的奖励,而人民承担了成本。华盛顿蓬勃发展,但人民没有分享其财富。,但工作离开,工厂关闭。企业保护自己,但不是我们国家的公民。他们的胜利不是你的胜利。他们的胜利不是你的胜利。虽然他们在我们国家的首都庆祝,但没有什么可以庆祝在我们的土地上奋斗的家庭。


所有的变化从这里开始,现在,因为这一刻是你的时刻,它属于你。


它属于今天聚集在这里的每个人,每个人都在整个美国。这是你的一天。这是你的庆祝。而这个,美利坚合众国,是你的国家。


真正重要的不是哪个党控制我们的政府,而是我们的政府是否由人民控制。


2017年1月20日将被记住为人民成为这个国家的统治者的那一天。


我们国家被遗忘的男人和女人将不再被忘记。


每个人都在听你的。你来自成千上万的人成为历史运动的一部分,世界从未见过的那些喜欢。


在这个运动的中心是一个关键的信念,一个国家存在为其公民服务。美国人想要他们的孩子的伟大的学校,他们的家庭的安全的邻里,并为自己好的工作。这些是对义人和公义的公正和合理的要求。


但对于我们太多的公民,存在一个不同的现实:母亲和儿童陷入我们内部城市的贫困;生锈的工厂散落像墓碑横跨我们国家的景观;教育制度与现金齐齐,但使我们年轻美丽的学生失去了所有的知识;和犯罪,帮派和毒品偷走了太多的生命,抢夺了我们国家这么多未实现的潜力。


这美国大屠杀停在这里,现在停止。


我们是一个国家,他们的痛苦是我们的痛苦。他们的梦想是我们的梦想。他们的成功将是我们的成功。我们分享一颗心,一个家,一个光荣的命运。我今天所做的宣誓就是对所有美国人的忠诚宣誓。


几十年来,我们以牺牲美国工业为代价丰富了外国产业;补贴了其他国家的军队,同时允许我们的军队非常悲伤的消耗。我们捍卫了其他国家的边界,拒绝为自己辩护。


在海外花费了数万亿美元,美国的基础设施已经失修和腐烂。我们已经使其他国家富有,而我们国家的财富,实力和信心已经消失了地平线。


一个接一个地,工厂关闭了,离开了我们的岸边,甚至没有想到数百万和数百万留在美国工人。我们的中产阶级的财富已经从他们的家里被剥夺,然后再分配到世界各地。

但这是过去。现在,我们只看到未来。


我们今天聚集在这里,正在发布一项新法令,在每个城市,每个外国首都和每一个权力大厅上听到。从今天起,我们的土地将有一个新的愿景。从这一天开始,它将只有美国第一,美国第一。


每一项关于贸易,税收,移民,外交事务的决定都将使美国工人和美国家庭受益。我们必须保护我们的边界免受其他国家的蹂躏,使我们的产品,偷窃我们的公司和破坏我们的工作。


保护将导致巨大的繁荣和力量。我会为我的身体每一口气,为你而战,我永远不会让你失望。


美国将再次赢得胜利,赢得前所未有的胜利。


我们将带回我们的工作。我们将带回我们的边界。我们将带回我们的财富,我们将带回我们的梦想。我们将在我们美好的国家建设新的道路,高速公路和桥梁,机场,隧道和铁路。我们将让我们的人民失去福利,回到用美国手和美国劳工重建我们的国家。我们将遵循两个简单的规则 - 购买美国人和雇用美国人。


我们将与世界各国寻求友谊和善意。


但是我们这样做的理解是,所有国家都有权利将自己的利益放在第一位。我们不试图把我们的生活方式强加于任何人,而是让它闪耀为例。我们会照耀大家跟随。


我们将加强老联盟,形成新的联盟。,我们将从地球上完全消灭。


,将完全忠于美利坚合众国,并通过我们对我们的忠诚,我们将重新发现我们对彼此的忠诚。当你打开你的心,爱国主义,没有偏见的余地。


告诉我们,当神的子民团结在一起时,是多么美好和美好。我们必须公开地表达我们的意见,诚实地辩论我们的分歧,但总是追求团结。当美国团结起来时,美国是完全不可阻挡的。


应该没有恐惧。我们受到保护,我们将永远受到保护。最重要的是,我们将受到我们军事和执法的伟大男女的保护。我们将受神的保护。


最后,我们必须认为大和梦想更大。在美国,我们理解,一个国家只有在努力才生存。我们不再接受所有人都在谈论,,不断抱怨,但从不做任何事情。


空谈的时间结束了。现在到达行动的小时。


不要让任何人告诉你它不能做。没有挑战能符合美国的心脏和战斗和精神。我们不会失败。我们国家将再次茁壮成长。我们站在一个新的千年的诞生,准备解开空间的奥秘,使地球免受疾病的苦难,并利用的能量,行业和技术的明天。一个新的民族自豪感将自我激励,提升我们的视野,治愈我们的分裂。现在是时候记住老智慧我们的士兵永远不会忘记 - 无论我们是黑色或棕色或白色,。


我们都享有同样的光荣自由,我们都向同一个伟大的美国国旗致敬。


无论一个孩子是出生在底特律的城市扩张还是内布拉斯加州的风吹平原,他们仰望同一个夜空,他们建立一个具有相同梦想的心,他们注入了生命的气息由同一个全能的创造者。


所以对于所有的美国人在每一个城市近,远,小,大,从山到山,从海洋到海洋,听到这些话 - 你永远不会再被忽视。


你的声音,你的希望和你的梦想将决定我们的美国命运。在一起,你的勇气,善良和爱情将永远指导我们的路上。我们将使美国再次强大。我们将使美国再次富裕。我们将使美国再次骄傲。我们将使美国再次安全。是的,一起,谢谢你。我们将使美国再次。上帝祝福你。上帝保佑美国。谢谢。


可以看到,标黑部分是较为不通顺的地方,但是通篇来看,谷歌翻译在正确性上已经让人印象非常深刻。基本上达到70%-80%的正确率。如果不是准确性要求非常严格的文本,在可用性上基本可以满足。


当然,演讲内容本身是比较正规的文本,翻译起来难度也会比其他形式的文本容易一些。


谷歌翻译技术原理解析


谷歌在去年9月推出了一个新的翻译模型,自那时起,这个项目有一些有趣的发展,这篇文章将尽可能简明地解释这个翻译系统。


早期版本的谷歌翻译使用基于短语的机器翻译(Phrase-based Machine Translation,PBMT)。PBMT 的做法是将输入的句子分成一系列单词或短语,然后单独翻译每个短语。这显然不是最佳的策略,因为它完全没有考虑整个句子的上下文。新的翻译模型使用称为Google神经机器翻译(Google Neural Machine Translation,GNMT)的模型,对传统版本的 NMT 模型进行了改进。让我们看看 GNMT 的工作原理:


编码器


在理解编码器之前,必须先了解 LSTM(长短期记忆人工神经网络)是什么。简单来说,它是一个具有一些记忆(memory)概念的神经网络。LSTM 通常用于“学习”时间序列(time-series)或时序数据(temporal data)中的模式。在给定的任何点,它接受最新的输入向量并使用(最新输入+之前看到的一些“上下文”)的组合产生预期输出:




在上图中,x_t是在时间t上的输入,h_t-1 表示在t-1的上下文。如果x_t具有维度d,则维度2d的h_ t-1 是两个向量的串联:


1. 同一个 LSTM 在最后一个时间步长t-1(短期记忆)上的预期输出,以及

2. 另一个d维向量编码长期记忆——也称为单元状态(Cell State)。


第二部分通常不用于架构中的下一个组件。相反,它被同一个 LSTM 用于以下步骤:通常通过向它们提供大量输入序列和期望的输出来训练 LSTM,这使得它们能够学习保留/保持输入的哪些部分,以及如何在数学上处理x_t和h_ t-1以得出h_t。


LSTM也可以“展开”(unfold),如下所示:




不用担心,它们是相同 LSTM 单元的一个副本(因此训练过程相同),每个单元将它们的输出馈送给下一个。这允许我们一次性输入整个输入向量的集合(也就是整个时间序列),而不用一步步通过 LSTM 的副本。


GNMT 的编码器网络本质上是一系列堆叠的 LSTM:




每个粉红色/绿色的框本身是一个展开的 LSTM,因此上图中每个序列有8个堆叠的 LSTM。整个架构的输入是句子的有序token集,每个token都以向量的形式表示。需要注意的是,这里说的是 token(语言符号),而非 word(单词)。GNMT 在预处理中将所有的词分解成了 tokens/pieces,然后作为序列馈入神经网络。这让框架(至少部分地)能够理解从未见过的复杂词。例如,“Pteromerhanophobia”这个词,即使你从没见过,你可能也能理解它大概是指一种“恐惧”,因为它含有“phobia”(恐惧症)这个 token。谷歌把这种方法称为 Wordpiece 建模(Wordpiece modeling)。在训练阶段,将词汇分解为 token 是基于统计学习的方法(哪个token组合最有意义)。


在堆叠(stack)LSTM 时,每层都会学习前面一层(下层)馈送到它的时间序列中的模式。随着阶梯越来越高,你会开到越来越多的数据中的抽象模式被馈送到最高层。例如,最低层可能看到一系列的点,并推导出一条线;下一层看到一些线,并推导出一个多边形;接下来的层看到一组多边形,并学习一个物体,等等。当然,堆叠的层数有一个限制,以什么方式堆叠 LSTM 也有限制——并不是层数越多越好,因为最终得到的模型可能太慢而难以训练。


除了 LSTM 的堆叠之外,上面所示的这种架构还有一些有趣的地方。




你会发现倒数第二层是绿色的。这是因为箭头(也即句子中token的顺序 [ordering])在这层中是相反的。这就意味着第二个 LSTM 看整句话时方向是反着的。原因很简单:当你把整个句子视为一个整体的时候,对于每个单词来说,“context”并不仅仅存在于它前面的单词里,同时也存在于它后面的那些单词里。最开始的两层都将原始句子视为输入,但是方向各不相同,彼此是相反的。第三层 LSTM 将从前面两层获得这种双向的输入——简单说,就是任何一个单词向前和向后的上下文语境。从这一层开始,每往后一层,神经网络都会学习到单词更加高层的模式。


你或许还会注意到在第五层及以后,输入前面都会增加“+”这个符号。这是残差学习的一种形式,发生在第 5 层及以后。对于每 N+1 层来说,输入相当于 N 和 N-1 层的输出之和。实验证明,使用这种方法能够减少因为梯度消失(Vanishing Gradient)等问题而产生的不准确,梯度消失是很多深度学习应用中都会出现的问题。形象一些看,你可以将残差学习想象为跨层之间的信息保存,同时将整个深度网络“稳定”在一定范围内,不会从输入的信息太跑偏。




最后,你会发现在编码器输入的最后会有 <2es> 和 </s> 的符号。</s> 代表“输入结束”,<2es> 代表目标语言——在本文中也就是西班牙语。这是 GNMT 才会有的特殊方法,将目标语言也视为输入,以此提升翻译性能。 


注意力模块和解码器




编码器产生一组有顺序的输出向量,然后它们被输入注意力模块和解码器的框架中。在很大程度上,解码器与编码器类似,在设计上都是堆叠的 LSTM 和残差连接。在这里细说一下不同的地方。


前面已经说过,GNMT 将整句话作为一个输入的整体。但是,对于解码器产生的每个 token,在输入的句子中的权重都是不一样的,这样考虑起来才更加自然。在你阅读的过程中,读过了的部分就会注意力就会转移到还没有阅读的内容上去。这部分工作是由注意力模块来负责的。注意力模块的输入实际上是编码器的全部输出,以及编码器堆栈中最后一个向量。这种方法使得注意力模块“了解”已经被翻译了的部分(以及已经翻译了多少),然后将解码器指向编码器输出的其他部分。


解码器 LSTM 堆栈根据编码器的输入和注意力模块的指向,持续输出向量。这些向量会被输入 Softmax 层(Softmax Layer)。你可以将 Softmax 层想象为概率分布生成器(Probability distribution-generator)。从 LSTM 最上层输入的向量开始,Softmax 层会给每一个可能的 token 分派一个概率(需要记住的是,目标语言已经提供给编码器了,因此这个信息已经传递了)。被分派到概率最大的那个token最终被输出。


整个过程在解码器/Softmax 决定当前token为无(即句子结尾)时停止。解码器不需要执行相当于输出向量的一系列步骤,因为它始终对所有计算步骤都保持着注意。

总的来说,上述过程可视化以后就是下面这个样子。



训练以及零数据翻译(Zero-Shot Translation)


整个框架(编码器+注意力模块+解码器)使用大量数据训练,这些数据包括输入的、经过翻译的句子对。系统架构通过将输入的语言转变为相应的向量来“了解”输入的语言。输出的语言(即目标语言)也被作为参数提供给系统。深度 LSTM 的美妙之处在于神经网络自己学会所有的计算,使用一类被称为反向传播/梯度下降的算法。




GNMT 团队的另一个惊人发现是:仅仅是将目标语言作为输入提供给框架,系统就能够进行零数据翻译!简单说就是,在你训练系统将英语翻译为日语,以及将英语翻译为韩语的过程中,系统自己就学会了将日语翻译为韩语。实际上,这正是 GNMT 团队最重大的成就。


从中我们可以知道,编码器实际上产生了一种通用语言(interlingua)。当我用任何语言说“狗”的时候,你脑海中都会产生一种可亲的犬科动物的形象,也就是“狗”的概念。编码器就产生了这种“概念”,与具体的语言无关。这也是为什么有些人评论说,谷歌的 AI 发明了自己的语言。


将目标语言作为输入使 GNMT 能够轻松使用神经网络训练任何语言对,也由此实现了零数据翻译。因此,这种新的机器翻译也变得更加接近人类在翻译时在头脑中经历的过程。

如果你想了解更多,可以阅读下面这些相关的文章:


1. First blog post about GNMT on the Google Research Blog. (Corresponding Research Paper)

2. Second blog post about Zero-Shot Translations. This one made the biggest splash. (Corresponding Research Paper)

3. A great NYTimes article that tells the story behind this Google Translate.


特朗普就职演讲英文原文


TRUMP: Chief Justice Roberts, President Carter, President Clinton, President Bush, President Obama, fellow Americans and people of the world, thank you.

We, the citizens of America, are now joined in a great national effort to rebuild our country and restore its promise for all of our people.

Together, we will determine the course of America and the world for many, many years to come. We will face challenges, we will confront hardships, but we will get the job done.

Every four years, we gather on these steps to carry out the orderly and peaceful transfer of power, and we are grateful to President Obama and First Lady Michelle Obama for their gracious aid throughout this transition. They have been magnificent. Thank you.

Today’s ceremony, however, has very special meaning because today, we are not merely transferring power from one administration to another or from one party to another, but we are transferring power from Washington, D.C. and giving it back to you, the people.

For too long, a small group in our nation’s capital has reaped the rewards of government while the people have borne the cost. Washington flourished, but the people did not share in its wealth. Politicians prospered, but the jobs left and the factories closed. The establishment protected itself, but not the citizens of our country. Their victories have not been your victories. Their triumphs have not been your triumphs. And while they celebrated in our nation’s capital, there was little to celebrate for struggling families all across our land.

That all changes starting right here and right now because this moment is your moment, it belongs to you.

It belongs to everyone gathered here today and everyone watching all across America. This is your day. This is your celebration. And this, the United States of America, is your country.

What truly matters is not which party controls our government, but whether our government is controlled by the people.

January 20th, 2017 will be remembered as the day the people became the rulers of this nation again.

The forgotten men and women of our country will be forgotten no longer.

Everyone is listening to you now. You came by the tens of millions to become part of a historic movement, the likes of which the world has never seen before.

At the center of this movement is a crucial conviction, that a nation exists to serve its citizens. Americans want great schools for their children, safe neighborhoods for their families, and good jobs for themselves. These are just and reasonable demands of righteous people and a righteous public.

But for too many of our citizens, a different reality exists: mothers and children trapped in poverty in our inner cities; rusted out factories scattered like tombstones across the landscape of our nation; an education system flush with cash, but which leaves our young and beautiful students deprived of all knowledge; and the crime and the gangs and the drugs that have stolen too many lives and robbed our country of so much unrealized potential.

This American carnage stops right here and stops right now.

We are one nation and their pain is our pain. Their dreams are our dreams. And their success will be our success. We share one heart, one home, and one glorious destiny. The oath of office I take today is an oath of allegiance to all Americans.

For many decades, we’ve enriched foreign industry at the expense of American industry; subsidized the armies of other countries, while allowing for the very sad depletion of our military. We’ve defended other nations’ borders while refusing to defend our own.

And spent trillions and trillions of dollars overseas while America’s infrastructure has fallen into disrepair and decay. We’ve made other countries rich, while the wealth, strength and confidence of our country has dissipated over the horizon.

One by one, the factories shuttered and left our shores, with not even a thought about the millions and millions of American workers that were left behind. The wealth of our middle class has been ripped from their homes and then redistributed all across the world.

But that is the past. And now, we are looking only to the future.

We assembled here today are issuing a new decree to be heard in every city, in every foreign capital, and in every hall of power. From this day forward, a new vision will govern our land. From this day forward, it’s going to be only America first, America first.

Every decision on trade, on taxes, on immigration, on foreign affairs will be made to benefit American workers and American families. We must protect our borders from the ravages of other countries making our products, stealing our companies and destroying our jobs.

Protection will lead to great prosperity and strength. I will fight for you with every breath in my body, and I will never ever let you down.

America will start winning again, winning like never before.

We will bring back our jobs.We will bring back our borders.We will bring back our wealth, and we will bring back our dreams. We will build new roads and highways and bridges and airports and tunnels and railways all across our wonderful nation. We will get our people off of welfare and back to work rebuilding our country with American hands and American labor. We will follow two simple rules -- buy American and hire American.

We will seek friendship and goodwill with the nations of the world.

But we do so with the understanding that it is the right of all nations to put their own interests first. We do not seek to impose our way of life on anyone but rather to let it shine as an example. We will shine for everyone to follow.

We will reinforce old alliances and form new ones. And unite the civilized world against radical Islamic terrorism, which we will eradicate completely from the face of the earth.

At the bedrock of our politics will be a total allegiance to the United States of America and through our loyalty to our country, we will rediscover our loyalty to each other. When you open your heart to patriotism, there is no room for prejudice.

The Bible tells us how good and pleasant it is when God's people live together in unity. We must speak our minds openly,  debate our disagreement honestly but always pursue solidarity. When America is united, America is totally unstoppable.

There should be no fear. We are protected, and we will always be protected. And most importantly, We will be protected by the great men and women of our military and law enforcement. We will be protected by God.

Finally, we must think big and dream even bigger. In America, we understand that a nation is only living as long as it is striving. We will no longer accept politicians who are all talk and no action, constantly complaining but never doing anything about it.

The time for empty talk is over. Now arrives the hour of action.

Do not allow anyone to tell you that it cannot be done. No challenge can match the heart and fight and spirit of America. We will not fail. Our country will thrive and prosper again. We stand at the birth of a new millennium, ready to unlock the mysteries of space, to free the earth from the miseries of disease and to harness the energies, industries and technologies of tomorrow. A new national pride will stir ourselves, lift our sights and heal our divisions. It’s time to remember that old wisdom our soldiers will never forget -- that whether we are black or brown or white, we all bleed the same red blood of patriots.

We all enjoyed the same glorious freedoms, and we all salute the same great American flag.

And whether a child is born in the urban sprawl of Detroit or the windswept plains of Nebraska, They look up at the same night sky, they build a heart with the same dreams and they are infused with the breath of life by the same Almighty Creator.

So to all Americans in every city near and far, small and large, from mountain to mountain, from ocean to ocean, hear these words -- you will never be ignored again.

Your voice, your hopes and your dreams will define our American destiny. Together, And your courage and goodness and love will forever guide us along the way. We will make America strong again. We will make America wealthy again. We will make America proud again. We will make America safe again. And yes, together, thank you. we will make America great again. God bless you. And God bless America. Thank You.




新智元招聘


新智元日前宣布,获6家顶级机构总额达数千万元的PreA轮融资,蓝驰创投领投,红杉资本中国基金、高瓴智成、蓝湖资本 、蓝象资本跟投。本轮融资将用于新智元团队规模扩充并增加新产品服务线,目标打造 To B 的人工智能全产业链服务平台。


职位  执行总编、主编


职位年薪:50万(工资+奖金)-100万元(工资+奖金+期权)
工作地点:北京-海淀区
所属部门:编辑部
汇报对象:CEO
下属人数:20人
年龄要求:25 岁至 40 岁
语  言:专业英语八级以上或海外留学从业背景

职位背景:在IT媒体领域有专业团队管理经验与主流话语权
学历要求:硕士及以上


职位描述:


  1. 热爱人工智能和媒体事业;

  2. 具有3年以上媒体采编经验,在业内有一定影响力及人脉;

  3. 具有原创+编译团队管理经验,善于部门间协作沟通;

  4. 对TMT领域有深入理解,对行业趋势有独到的洞察;

  5. 英文阅读写作及沟通能力优异;

  6. 较强的抗压能力和自驱力,能在竞争激烈的环境下激励团队;

  7. 具有创业精神及团队精神,有恒心肯吃苦;

  8. 理工科背景优先,有知名企业或知名媒体机构工作经验者优先。

职责


全权负责新智元内容平台策划、生产与运营,对内容质量、用户阅读体验、影响力负责。具体负责完成对内容平台定位和规划,组建并管理采编团队,策划执行重点选题,建立和维护供稿作者资源;监控公众号各项数据指标变动,并以此为基础改进提升内容质量。


新智元欢迎有志之士前来面试,更多招聘岗位请访问新智元公众号



友情链接

Copyright © 2023 All Rights Reserved 版权所有 北京物流信息联盟