Can Neural Networks Write Other Neural Networks? Inside the Neural Complete Project

Neural Complete, an open‑source project by Pascal van Kooten, trains a neural network to auto‑complete the code of another neural network using LSTM and Keras, demonstrating AI‑driven metaprogramming that could accelerate software development, research, and numerous future applications.

21CTO
21CTO
21CTO
Can Neural Networks Write Other Neural Networks? Inside the Neural Complete Project
Everyone knows neural networks can't yet "program", but a new work "Neural Complete" takes the first step. Programmer Pascal van Kooten trained a neural network to automatically complete the code of another neural network, effectively making a neural network "program". The code is open‑source on GitHub.

Artificial intelligence holds the potential to solve the long‑standing problem of code generation, a concept known as metaprogramming that dates back to Lisp in the late 1950s.

With AI, a computer can understand the entire development history of a software project and instantly improve or delete buggy lines of code, regardless of the programming language, enabling even inexperienced programmers to harness self‑programming capabilities.

Neural Complete

Neural Complete is an auto‑completion technique based on a generative LSTM network. It is trained with Python code and can be used to improve Python source code.

The training uses files containing Keras inputs, resulting in an upgraded network that assists in writing neural‑network code.

Unlike word‑level completion, it completes whole lines of code by using information from preceding lines.

Model

Neural Complete includes two models: a character‑based model and a Python‑representation model. The character model can complete at any time, while the representation model works only when the code is fully represented, operating at a higher semantic level.

The character model looks at the previous 80 characters; the representation model considers the previous 20 representations.

Data Collection

Because GitHub’s API cannot search by filename, a custom script was written to collect Python files used for Keras training.

The models are trained on just 26 scripts.

Frontend and Backend

Backend: uses Keras to train the models.

Frontend: a very thin neural‑network layer written in Angular 2 that communicates with the backend to receive auto‑completion suggestions.

Conclusion

Automatic completion of neural‑network code relies on training one network to understand another, enabling self‑improvement of code.

While most machine‑learning applications focus on specific tasks, enabling AI to understand and refine its own code could accelerate breakthroughs in medicine, robotics, mobile devices, software reliability, and fraud detection.

Neural Complete GitHub repository: https://github.com/kootenpv/neural_complete/network

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

machine learningDeep Learningcode completionNeural NetworksAI programming
21CTO
Written by

21CTO

21CTO (21CTO.com) offers developers community, training, and services, making it your go‑to learning and service platform.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.