Submodular relaxation in associative hierarchical random field