A fast toolkit for factorial conditional random fields. Supports both inference and parameter estimation in cyclic (factorial) graphical models. The core is written in C++, but the package comes with an easy-to-use Perl wrapper.

libviecrf-0.1.2.tar (core library)
VieCRF-0.1.2.tar (Perl wrapper)
install (installation instructions)

VieCRF was originally written for my master’s thesis. Please see our EMNLP 2008 paper for a shorter version.


A much more comprehensive and flexible conditional random field library written in Scala. Supports both (discrete) CRF and M3N training, and various algorithms for approximate inference. The instantiation of factors need not follow any repetitive structure and can be chosen freely in terms of factor types.

PhiWeave was used to obtain a large share of the results in my PhD thesis. On the downside – compared to VieCRF – it is very much research software, meaning that it comes without documentation and the code breaks regularly.

PhiWeave is available on

Regression Tree Fields

I am also the main author of the Regression Tree Fields code (together with Toby Sharp and Sebastian Nowozin). This is a computationally efficient implementation of non-parametric, tree-based conditional random field models mainly useful for low-level computer vision and image processing. The code can be obtained from the Microsoft Research downloads website.