Inference techniques in MRFs