Two-dimensional images of human faces (top row) and front views of three-dimensional models of the same faces, produced by both a new MIT system (middle row) and one of its predecessors (bottom row)

Probabilistic language cuts coding from thousands of lines to 50

Programs written in a probabilistic programming language that take just 50 lines of code where conventional systems would take thousands will be unveiled in June.

The development of these new programming languages has been spurred by the rise in machine-learning applications searching for patterns in big data sets, which rely extensively on probabilistic reasoning.

At the Computer Vision and Pattern Recognition conference in June, MIT researchers will present working programs written in their new code Picture that have been applied to standard computer-vision tasks.

Not only did the programs take much less code to write, on some tasks they actually outperformed prior systems – the error rate of a program that estimated human poses, for example, was between 50 and 80 per cent lower than that of its predecessors.

“This is the first time that we’re introducing probabilistic programming in the vision area,” said Tejas Kulkarni, an MIT graduate student in brain and cognitive sciences and first author on the new paper.

“The whole hope is to write very flexible models, both generative and discriminative models, as short probabilistic code, and then not do anything else. General-purpose inference schemes solve the problems.”

The Picture language – an extension of another language developed at MIT called Julia – was used to tackle a variety of common problems in computer vision, each involving inferring the three-dimensional shape of an object from 2D information.

The researchers used an approach known as inverse graphics, which essentially reverses the process of synthesising realistic 3D images by calculating the way in which light reflects off of virtual objects, as used by CGI companies like Pixar.

While creating 3D graphics is a deterministic process, the fact that the colour of a given area on a 2D image could be down to a variety of variables such as the colour of light, the direction of light and the properties of the material reflecting the light, inferring the shape of its 3D counterpart is probabilistic.

To deal with this several different inference algorithms are built into Picture – algorithms that continuously readjust probabilities on the basis of new pieces of training data until the probabilistic model allows the program to predict outcomes.

For example, one of the tasks the researchers investigated involved constructing a 3D model of a human face from 2D images.

Their program describes the principal features of the face as being two symmetrically distributed objects (eyes) with two more centrally positioned objects beneath them (the nose and mouth). After that the program was fed with examples of 2D images and their corresponding 3D models until it could create the 3D models itself.

“When you think about probabilistic programs, you think very intuitively when you’re modelling,” Kulkarni said. “You don’t think mathematically. It’s a very different style of modelling.”

In addition, Picture is designed so that its inference algorithms can themselves benefit from machine learning by modifying themselves as they go to emphasise strategies that seem to lead to good results.

“Using learning to improve inference will be task-specific, but probabilistic programming may alleviate re-writing code across different problems,” said Kulkarni. “The code can be generic if the learning machinery is powerful enough to learn different strategies for different tasks.”

Recent articles

Info Message

Our sites use cookies to support some functionality, and to collect anonymous user data.

Learn more about IET cookies and how to control them