Will DeepMind’s AlphaCode Replace Programmers?

New milestone achieved by AlphaCode in competitive programming. Should software engineers fear for their jobs? Will AI replace us or assist us?

Will DeepMind’s AlphaCode Replace Programmers?
Image by author


The Alphabet subsidiary DeepMind has done it again, and this time, they are testing the boundaries of AI in software development sectors. DeepMind’s AlphaCode was tested against human performance on coding challenges and achieved rank among the top 54% of human coders on Codeforces. This is a remarkable achievement as it is one of its kind. There are other code generation machine learning models, such as OpenAI Codex, but none of them tried to compete with human programmers. 

A coding challenge is like solving puzzles. To solve these challenges, an individual must have an understanding of logic, math, and programming skills. 


"Solving competitive programming problems is a really hard thing to do. It requires good coding skills and problem-solving creativity in humans," said Petr Mitrichev, software engineer at Google.


Competitive programming is hard to master, and AlphaCode's first version has surpassed average coders. We will learn how AlphaCode works and discuss the possibility of AI replacing human programmers. We will also learn about AI-assisted programming and how it is shaping the future.

What is AlphaCode?


In simple words, the AplhaCode reads structured problem statements and generates the best possible solution. It was only possible due to large-scale transformers, which have shown promising results in code generations. These transformers were pre-trained on 175 GB of data from GitHub and later fine-tuned on small competitive programming data - Tech Monitor

The AplhaCode reads the problem statement and comes up with thousands of potential solutions. These solutions are passed through a filtering process that reduces potential results to ten. Later, these results are submitted to a coding contest to evaluate results. The drawback of coming up with thousands of solutions and filtering down to ten is curating a large complex programming dataset if we want AlphaCode to solve more complex problems. 

AlphaCode solved ten challenges that had been tackled by 5,000 users on the Codeforces platform. It was placed among the top 28% of users who have competed on the site in the last six months. It is quite an achievement for the initial release. The DeepMind team says that AlphaCode is limited to a competitive programming domain, and they are expanding the domain to make its programming accessible and fully automated - The Verge

alphacode deepmind
Gif from AlphaCode



Will AI Replace Human Programmers?


In short, No. We are light years away from AI replacing humans. AlphaCode is a useful contribution to AI research, but it is far from reaching the skilled level of a human programmer. 


“This is not AlphaGo in terms of beating humans, and not AlphaFold in terms of revolutionizing an entire field of science.”, Dzmitry Bahdanau, a research scientist who has deep knowledge about AlphaCode.


Apart from this, there are security vulnerabilities in code generation that can cause serious damage to companies. In the study, researchers found that 40% of GitHub’s Copilot-generated code contained security vulnerabilities. Even if we somehow resolve this issue by cleaning the dataset. We are not ready for bad actors trying to push faulty code on the internet, which might be used to train AI models. There is no secure AI development without humans in the loop, so we will always need software developers and engineers to monitor the progress.  

Even if we were able to resolve all the issues I mentioned above, real-world software development is quite different from coding challenges. In software development the requirement for a project is vague, and you improve the initial idea with incremental iterations. It’s a back and forth negotiation between programmer and stakeholder. There are no inputs and outputs, you need to figure out outputs with every iteration. It’s hard to write all the requirements of stakeholders in a structured form, so AlphaCode is just an experiment, not a real threat to humans. 

Coding Challenge Vs. Software Development
Image by Author | Coding Challenge Vs. Software Development | Code Challenge is from DeepMind


AI Assisted Programming


Let’s talk about where AlphaCode and similar AI applications come in handy. The GitHub Copilot is assisting developers by auto-completing the code, and sometimes it learns from your coding practice and comes up with personalized solutions that can automate a lot of software development. The future of AlphaCode is to assist coders and non-coders. The main mission is to make repeated tasks automated and allow software development hassle-free for both programmers and non-technical individuals. Recently, we have seen a rise in no-code or few-code software development, and this is just the start. These AI programs won’t replace humans but make us better at creating software solutions.

OpenAI Codex | Python Autocomplete
Image from OpenAI Codex | Python Autocomplete


The Future


The future is conversational AI code generation. It is just like talking to an intelligent bot, which remembers past conversations and talks like a human. The SalesForce CodeGen mimics real-life software development, where you write a prompt and then see the results. With every iteration, we are adding and removing things, and AI is constantly improving the initial code. For example, Prompt 1: “Solve the two sum problem” and Prompt 2: “Solve the problem using a hash map”. The final code is generated by understanding the previous input sequence. In this way, we are evolving our code to add new features and remove the existing bug. 

To conclude our discussion, I think AI is here to assist us. It is an advanced tool that will help us solve complex problems and automate repetitive tasks. 

SalesForce CodeGen
Image from SalesForce CodeGen | Conversational AI Programming


Abid Ali Awan (@1abidaliawan) is a certified data scientist professional who loves building machine learning models. Currently, he is focusing on content creation and writing technical blogs on machine learning and data science technologies. Abid holds a Master's degree in Technology Management and a bachelor's degree in Telecommunication Engineering. His vision is to build an AI product using a graph neural network for students struggling with mental illness.