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?》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!

查看所有标签

猜你喜欢:

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

Collective Intelligence实战

Collective Intelligence实战

阿拉克 / 2010-9 / 58.00元

《Collective Intelligence实战》内容简介:在互联网上,利用用户的集体智慧是成功的关键。集体智慧是一种新兴的编程技术,可让您从人们访问web和与web交互的过程中找到有价值的模式、发现这些访问者之间的关系和确定他们的个人偏好及习惯等。《collective Intelligence实战》首先介绍了集体智慧的原则和构建更具交互性网站的思想,然后通过示例开发了一个直接可用的基于Ja......一起来看看 《Collective Intelligence实战》 这本书的介绍吧!

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

RGB转16进制工具
RGB转16进制工具

RGB HEX 互转工具

XML 在线格式化
XML 在线格式化

在线 XML 格式化压缩工具