A Quick Look at the Infer.NET Library

Infer.NET is a code library that allows you to create probabilistic programs. Probabilistic programs (PPs) are very different from normal computer programs. A PP sets up variables that are based on probability distributions (Bernoulli, Gaussian, Gamma, Dirichlet, etc.) instead of a data type (int, bool, double, etc.)

There are many PP languages. Wikipedia lists over 40 of them. The most popular is one is called Stan, but “most popular” is relative. I estimate that PPLs are used regularly by no more than a few hundred people, compared to languages like Java or Python that are used by tens or hundreds of thousands of developers. Of course this depends on how you define “regularly”.

Microsoft has a PPL called Infer.NET that has been around for about 10 years. I take a look at Infer.NET about once a year. My usual demo is to create a system that infers the strength of a sports team, based on some preliminary assumptions (team strength is Normal distributed with mean = 100.0 and standard deviation = 20.0) and some example win-lose data. I found a good example of Infer.NET somewhere on the Internet and used it as a template. (I can’t find that example now — it seems to have disappeared.)

All PPLs including Infer.NET have a very steep learning curve for most software developers. My PhD is in computational statistics so I’ve got a pretty good grasp of probability distributions and such, and I’m a very good programmer, but Infer.NET is very difficult for me to understand because it is so different. Using a PPL involves a completely different mental paradigm than normal procedural programming. And Infer.NET appears to be heavily influenced by F# and functional programming so there’s another conceptual blocker. And Infer.NET seems to make use of a lot of LINQ syntax, so there’s yet another obstacle. The fact that Infer.NET and other PPLs have such a big barrier to entry is a shame because PPLs can solve some niche problems that are very difficult to solve using standard programming languages.



“Across the Dunes”, Betty Smith and “Barrier Island House”, Shannon Hughes

This entry was posted in Machine Learning. Bookmark the permalink.