  Estimation of density functions supported on general domains arises when the
data is naturally restricted to a proper subset of the real space. This problem
is complicated by typically intractable normalizing constants. Score matching
provides a powerful tool for estimating densities with such intractable
normalizing constants, but as originally proposed is limited to densities on
$\mathbb{R}^m$ and $\mathbb{R}_+^m$. In this paper, we offer a natural
generalization of score matching that accommodates densities supported on a
very general class of domains. We apply the framework to truncated graphical
and pairwise interaction models, and provide theoretical guarantees for the
resulting estimators. We also generalize a recently proposed method from
bounded to unbounded domains, and empirically demonstrate the advantages of our
method.
