Can We Use Deep Learning to Create New Programming Languages?

栏目: IT技术 · 发布时间: 4年前

内容简介:TransCoder form Facebook AI: Translation between high-level programming languagesI recently read aTranscompilers are generally used to transfer a code base written in a deprecated language to a more recent language. Currently used transcompilers are based

Can We Use Deep Learning to Create New Programming Languages?

TransCoder form Facebook AI: Translation between high-level programming languages

Photo by Karl Pawlowicz on Unsplash

I recently read a paper published by Marie-Anne Lachaux, Baptiste Roziere, Lowik Chanussot, Guillaume Lample from Facebook AI Research on 5 June, 2020. It is about a transcompiler created by neural networks. A transcompiler is basically a system that translates source codes between high-level programming languages (e.g. from C++ to Python).

Transcompilers are generally used to transfer a code base written in a deprecated language to a more recent language. Currently used transcompilers are based on hand-crafted rules which means lots of manual work and sensitive to mistakes. Furthermore, it requires expertise in both source and target programming language and manual modifications afterwards. Thus, the entire process becomes a tedious, time-consuming, and expensive task. According to an example given in the paper, Commonwealth Bank of Australia spent around $750 million and 5 years to convert its platform from COBOL to Java. It is just too much! Another programming language that fits better to your needs might be released in 5 years.

This inconvenient and laborious process motivated researchers of Facebook AI to create a transcompiler using neural networks. They were inspired by the advancements in natural language translation done by neural networks. One obstacle was the lack of training data. They overcomed this issue by downloading GitHub repositories available on Google BigQuery. To evaluate the model, they extracted a set of parallel functions in C++, Python, and Java frın GeeksforGeeks website. They also created a test set composed of 852 parallel functions. Their model, TransCoder, outperformed rule-based transcompilers by a significant margin. It translated the codes at function levels.

This paper made me think about a programming language designed by neural networks. If neural networks can translate code between high-level programming languages, they should be able to create a new one. Neural networks generate images, videos, news articles. Why not a programming language? I’m not an expert in software design or architecture but I think this paper shed light on what can be done in the future.

Deep learning models are data-hungry. Even if we build a highly-complex, well-structured model, the performance gets as good as the data we feed to it. The amount of data is a key factor in determining the robustness and accuracy of deep learning models. The researchers also mentioned about the lack of availability of data in this area. If we somehow manage to obtain lots of high-quality data, it does not seem impossible to create a new programming language with neural networks.

Photo by Artur Kraft on Unsplash

Crowdsourcing might be an option for data collection. For instance, CAPTCHA is used to digitize books by crowdsourcing. It was created as a challenge-response test to determine if a user is a human. We come across CAPTCHAs almost everyday. We are asked to type some letters that we see on the screen. The initial purpose was to provide security. Then, a brilliant idea comes to the mind of its creators. They saw the potential that there were millions of people typing words they see on a screen. So, they started to show people parts of scanned books. Eventually, lots of books have been digitized word-by-word by millions of people. This idea was taken one step further to create Duolingo, a free website to learn a new language. Here is the entire story told by its creator, Luis von Ahn.


以上所述就是小编给大家介绍的《Can We Use Deep Learning to Create New Programming Languages?》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

社交天性

社交天性

[美] 马修·利伯曼(Matthew D. Lieberman) / 贾拥民 / 浙江人民出版社 / 2016-6 / 69.90

[内容简介] ● 《社交天性》是社会心理学家马修·利伯曼解读人类“社会脑”的权威之作,它告诉我们为什么在充满合作与竞争的智慧社会中人们喜爱社交又相互连接,个人的社会影响力如何得以发挥,书中处处充满了令人惊喜的洞见。 ● 为什么有的人天生善于社交,而有的人总是充满障碍? 为什么智商越高的人越难相处? 心痛对人的伤害甚至超过头痛? 慈善组织如何激发人们的捐赠行为? ......一起来看看 《社交天性》 这本书的介绍吧!

HTML 压缩/解压工具
HTML 压缩/解压工具

在线压缩/解压 HTML 代码

在线进制转换器
在线进制转换器

各进制数互转换器

HEX HSV 转换工具
HEX HSV 转换工具

HEX HSV 互换工具