We propose a simple estimator based on composite likelihoods for parameter learning in random field models. The estimator can be applied to all discrete graphical models such as Markov random fifields and conditional random fifields, including ones with higher-order energies. It is computationally effifficient because it requires only inference over tree-structured subgraphs of the original graph, and it is consistent, that is, it asymptotically gives the optimal parameter estimate in the model class. We verify these conceptual advantages in synthetic experiments and
demonstrate the diffifficulties encountered by popular alternative estimation approaches.