It’s interesting to imagine the future of AI: home service robots, Amazon’s echo and other devices will enter every home, as well as UAV express and more medical diagnosis. These eye-catching consumer applications are full of the imagination of the public, so that everyone ignores AI’s subversion of another field – the development of software itself.
Imagine what computers can do if they can understand themselves? It won’t be long before the computer can do it. Moreover, this is not to describe the distant future, but the present within reach, which can be achieved by using the current existing technology.
So far, machine learning experts tend to focus on AI applications developed for specific tasks, such as face recognition, autopilot, speech recognition and even search. But what if these similar algorithms can understand their own code structure without human help, explanation or intervention? Just as they understand human language and images.
If the code starts to analyze itself, self correct and improve, and the speed is faster than it thinks, then the technological breakthrough may come faster. The possibilities are endless: advances in medicine, more natural robots, smarter mobile phones, less buggy software, less bank fraud, and so on.
Artificial intelligence has the potential to solve an old problem in software development. The concept of the ability to write code or manipulate other code has existed for a long time, commonly known as metaprogramming (it actually originated in LISP in the late 1950s). The problems it solves are still in people’s imagination.
But now artificial intelligence has made a difference.
Using artificial intelligence, the computer can understand all the code in the development history of a software development project from scratch, and immediately improve or delete the bugs in a single line of code, no matter what programming language is used. Even an inexperienced or middle-level programmer can explain the principles of self programming. As a result, the research of a cancer project can be completed in a few days or months instead of years, which will bring about significant progress.
Today, the technology that will eventually bring disruptive change is still in its infancy, but it has begun to grow. For example, Google’s tensorflow machine learning software enables every programmer to directly integrate neural networks into the developed app, enabling the app to recognize people and objects in pictures. To make these ideas a reality, you will no longer need a doctorate. So that amateurs can also modify the program, which may become a major breakthrough in the history of AI development.
Google’s goal: most of the code doesn’t need to be written
In his article “how Google is remaking itself as an” Ai first “company” published in backchannel in June this year, Steven levy, a foreign science and technology journalist, mentioned that Jeff, the head of Google’s brain Dean said that as he and his team learned more about machine learning, their approach to machine learning became more bold. “In the past, we might have used machine learning in several subcomponents of the system,” says jeffdean. “Now we’re actually using machine learning to replace the whole system instead of trying to make a better machine learning model for each part.” Levy wrote that if jeffdean were to rewrite Google’s infrastructure now, most of the code would not be encoded by people, but would be automatically generated by machine learning.
Google’s code bug prediction system uses a scoring algorithm, and as commits get older and older, their value gets smaller and smaller.
Think computer self programming is far away from us? If I tell you that some big companies, such as Google, have begun to use this concept in their internal project management system, you may be shocked. However, Google has developed a bug prediction program that uses machine learning and statistical analysis to determine whether a line of code is defective. Ilya grigorik, Google engineer and W3C co chairman, has also developed an open source version of the bug prediction tool, which has been downloaded 20000 times.
Another example comes from Siri’s successor, VIV. In a recent report by wired, VIV not only uses a series of natural language processing to realize language recognition, but also builds complex adaptive computer programs based on English vocabulary. Code writing code. Since the code to be written is trained and specialized by VIV developers themselves, the “code writing” here is not what we usually call the ability to write code, but it’s really a big progress.
Another big advance in this direction comes from the non professional field. Emil Schutte once made a very provocative remark: tired of writing code? Me too. Let stack overflow do it. He shared an example to prove this concept. He extracted the complete working code from the large programming database of stackoverflow to provide the complete functional code block. However, the module obtained in this way is still based on the written code.
Deep mind’s attempt
In fact, earlier, the deepmind team developed a “neural programming interpreter” (NPI), which can learn and edit simple programs by itself, and the generalization ability of sorting is higher than that of sequence to sequence LSTM. The paper describing this research, neural programmer interpreters, was selected as the 16 best papers of iclr16.
NPI is a recurrent synthetic neural network, which can learn to represent and execute programs. The core module of NPI is a sequence model based on LSTM. The input of this model includes a learnable program embedding, program parameters passed by the calling program and the characterization of the environment. The output of this core module includes a key indicating which program will be called next, a parameter of a classic algorithm program, and a flag indicating whether the program should stop. In addition to the recursive kernel, the NPI architecture also includes an embedded key memory for learnable programs. This program memory structure is very important for the continuous learning and reuse of programs.
NPI has three learning components: one is the recursive kernel with unknown tasks, the other is the persistent key program memory, and the third is the domain specific encoder, which can make a single NPI provide different functions in multiple environments with different perceptions. By synthesizing low-level programs to express high-level programs, NPI reduces sample complexity and is easier to generalize than sequence to sequence LSTM. By constructing on the basis of existing programs, program memory can learn extra tasks. NPI can also make use of the environment to cache the intermediate results, thus reducing the long-term storage burden of recursive hidden units.
However, at that time, deepmind team did not use the unsupervised learning method to train NPI, and its model could only learn to synthesize several simple programs, including addition, sorting and regularization of 3D models. However, a single NPI can learn to execute these programs and all 21 associated subroutines.
Tian Yuandong’s research on computer self programming
Tian Yuandong, a researcher at Facebook’s Artificial Intelligence Laboratory, has studied this issue in one of his articles submitted to iclr17.
Abstract: it is still an open and challenging problem to build a computer program that can map a set of inputs to outputs by inferring automatically. Because there is a huge search space in the possible program and it needs to deal with high-order logic (such as for loop or recursion), it is very difficult for the program to carry out induction task. In this paper, we use hgcnn to automatically generate programs based on input / output pairs. Hgcnn predicts candidate code strings hierarchically, so it can use standard search techniques to construct programs. It should be noted that the model only uses randomly generated programs for training, so it can be regarded as an unsupervised learning method. We show that the proposed method can generate programs from simple swap to more complex loops and branches (such as finding large values in a string of arrays). We also show the good results when using this method to implement nested loop programs such as BubbleSort. Taking LSTM as the basis of comparison, the prediction accuracy of the new method has been significantly improved.
Tian Yuandong said in “theoretical problems unsolved in deep learning” that this paper extracts features from the input and output results of the algorithm, sends them into the literature of convolutional neural network, and then hierarchically generates the classic framework of the image, generating a two-dimensional image, each line is a line of code, or more precisely, the probability distribution of the code. With a good distribution, it can help heuristic search to find the right program. However, the training data of neural network is provided by a large number of random codes, random inputs and outputs after the execution of random codes, which basically does not need human intervention and can be regarded as an unsupervised method.
At the same time, Tian Yuandong added: “as soon as this year’s ICLR article is published, you can easily find seven articles about computer generated (or optimized) code. Open it up, and the introduction is all about the same motivation. “
So what’s the motivation?
Let the computer write its own code.
Once the machine can understand itself, a disruptive change will take place
As more and more of these technologies become mature, machines will surpass humans in a variety of tasks. So why can’t machines understand themselves? I think it’s just a matter of time. And once the machine does that, you’ll find that in all areas where software plays an important role, there will be a disruptive change.
One of the core challenges of AI is to teach machines to learn new programs, to write new programs quickly from existing programs, and to automatically execute these programs under certain conditions to solve a wide range of tasks. In all kinds of AI problems, programs appear in different faces, including motion behavior, image conversion, reinforcement learning strategy, classical algorithms and symbolic relations, etc.
Now, the machine has been able to automatically execute more and more programs, and now there are so many open source codes. If we learn all the codes in history, many programming scenarios should be automated, at least we can greatly reduce the manual labor. Human programmers, especially junior programmers, are more and more likely to be replaced.
Editor in charge: Tzh