5 min
Your smartphone OS contains more than 10 million lines of code. A million lines of code takes 18000 pages to print which is equal to Tolstoy’s War and Peace put together 14 times!
Though the number of lines of code is not a direct measure of the quality of a developer, it indicates the quantity which has been generated over the years. There is always a simpler, shorter version of the code and also a longer more exhaustive version.
Coding is an art form in its own right only exception is that it doesn’t defy logic. It might have been tough for AI to compete with humans on many creative frontiers. But now efforts are being made to teach AI to code on its own as code can be defined through constraints; a field that AI basks in.
For example, when asked to write a program to find multiples of 2 from a given set of integers, different programmers think about the problem in a different way. Few might go through each step or with knowledge of domain might use some functions. So, coding involves both the understanding words of the question and also how to represent it symbolically before going ahead with it.
Depending on the familiarity of the domain and the complexity of the problem, humans use a flexible combination of recognition of learned patterns and explicit reasoning to solve programming problems.
In their paper titled Learning to Infer Program Sketches, a team from MIT’s computer science department propose a system SKETCHADAPT, to build systems which write code automatically from the kinds of specifications humans can most easily provide, such as examples and natural language instruction.
SketchAdapt, is a model trained on tens of thousands of program examples and learns how to compose short, high-level programs while letting the second set of algorithms find the right sub-programs to fill in the details.
The authors claim that their training algorithm will enable a program synthesis system to learn, without direct supervision, when to rely on pattern recognition and when to perform a symbolic search. The key idea in this work is to allow a system to learn a suitable intermediate sketch representation between a learned neural proposer and a symbolic search mechanism.
The system consists of two main components:
- a Sketch generator, and
- a program synthesizer
Schematic overview of the model
With the experiment showing encouraging results, the authors hypothesize that learned integration of different forms of computation is necessary not only for writing code, but also for other complex AI tasks, such as high-level planning, rapid language learning, and sophisticated question answering as well.
Key Ideas
The authors in their work have tried to accomplish the following:- Develop a novel neuro-symbolic program synthesis system, which writes programs from input-output examples and natural language specification by learning a suitable intermediate sketch representation between a neural network sketch generator and a symbolic synthesizer.
- Introduce a novel training objective, which we used to train our system to find suitable sketch representations without explicit supervision.
- Validate the system by demonstrating results in two programming-by-example domains, list processing problems and string transformation problems, and achieve state-of-the-art performance on the AlgoLisp English-to-code test dataset.
- The AI Slowdown Narrative Doesn’t Reflect Enterprise Reality
- India’s Enterprises are Scaling AI. Is the Infrastructure Ready?
- Industry Wants Faster Approvals and Cheaper Power in India’s Data Centre Policy
- Inside Jio Platforms: Its Tech Bets, Loss-Making Subsidiaries and Hidden Risks
- India’s GCCs to Add 1.4 Million Jobs, Drive 170 Million Sq. Ft. Office Demand by 2031
- AI Can Be Cyborg or Centaur. But Can Enterprises Monetise It?

