Original: Is Parameter Learning via Weighted Model Integration Tractable?
Revised: Is Parameter Learning via Weighted Model Integration Tractable?

Original: Abstract
Revised: Abstract

Original: Weighted Model Integration (WMI) is a recent and general formalism for reasoning over hybrid continuous/discrete probabilistic models with logical and algebraic constraints.
Revised: Weighted Model Integration (WMI) is a recent and general formalism for reasoning over hybrid continuous/discrete probabilistic models with logical and algebraic constraints.

Original: While many works have focused on inference in WMI models, the challenges of learning them from data have received much less attention.
Revised: While many works have focused on inference in WMI models, the challenges of learning them from data have received much less attention.

Original: Our contribution is twofold.
Revised: Our contribution is twofold.

Original: First, we provide novel theoretical insights on the problem of estimating the parameters of these models from data in a tractable way, generalizing previous results on maximum-likelihood estimation (MLE) to the broader family of log-linear WMI models.
Revised: First, we provide novel theoretical insights on the problem of estimating the parameters of these models from data in a tractable way, generalizing previous results on maximum-likelihood estimation (MLE) to the broader family of log-linear WMI models.

Original: Second, we show how our results on WMI can characterize the tractability of inference and
Revised: Second, we show how our results on WMI can characterize the tractability of inference and

Original: MLE for another widely used class of probabilistic models, Hinge Loss Markov Random Fields (HLMRFs).
Revised: MLE for another widely used class of probabilistic models, Hinge Loss Markov Random Fields (HLMRFs).

Original: Speciﬁcally, we bridge these two areas of research by reducing marginal inference in HLMRFs to WMI inference, and thus we open up new interesting applications for both model classes.
Revised: Speciﬁcally, we bridge these two areas of research by reducing marginal inference in HLMRFs to WMI inference, and thus we open up new interesting applications for both model classes.

Original:  INTRODUCTION
Revised:  INTRODUCTION

Original: Solving many complex AI tasks require both logical and numerical reasoning in uncertain environments.
Revised: Solving many complex AI tasks require both logical and numerical reasoning in uncertain environments.

Original: Probabilistic inference in hybrid continuous/discrete settings pose signiﬁcant challenges, in particular when logical and algebraic constraints are considered, such as laws of physics or safety requirements.
Revised: Probabilistic inference in hybrid continuous/discrete settings pose signiﬁcant challenges, in particular when logical and algebraic constraints are considered, such as laws of physics or safety requirements.

Original: In many discrete probabilistic models, reducing marginal inference to Weighted Model Counting (WMC) [Sang et al., 2005] is a state-of-the-art technique, thanks to its support for arbitrary propositional logic constraint.
Revised: In many discrete probabilistic models, reducing marginal inference to Weighted Model Counting (WMC) [Sang et al., 2005] is a state-of-the-art technique, thanks to its support for arbitrary propositional logic constraint.

Original: Recently, Weighted Model Integration (WMI)
Revised: Recently, Weighted Model Integration (WMI)

Original: [Belle et al., 2015] emerged as a generalization of WMC to hybrid domains.
Revised: [Belle et al., 2015] emerged as a generalization of WMC to hybrid domains.

Original: By extending propositional logic with algebraic relations over continuous variables and generalizing the weight function to piecewise densities, WMI uniﬁes marginal inference in a large class of probabilistic models under the same formalism.
Revised: By extending propositional logic with algebraic relations over continuous variables and generalizing the weight function to piecewise densities, WMI uniﬁes marginal inference in a large class of probabilistic models under the same formalism.

Original: WMI-based inference has been receiving increasing interest in recent years, with advancements both on practical algorithms [Morettin et al., 2021] and on theoretical aspects [Zeng et al., 2020a].
Revised: WMI-based inference has been receiving increasing interest in recent years, with advancements both on practical algorithms [Morettin et al., 2021] and on theoretical aspects [Zeng et al., 2020a].

Original: While its theoretical groundwork was initially developed to address inference and parameter learning in hybrid
Revised: While its theoretical groundwork was initially developed to address inference and parameter learning in hybrid

Original: Markov Random Fields, over the last ﬁve years it has been shown that a much larger class of problems can be reduced to WMI, such as marginal inference in Mixed Sum-Product Networks [Morettin et al., 2020], or veriﬁcation of fairness properties in probabilistic programs [Albarghouthi et al., 2017].
Revised: Markov Random Fields, over the last ﬁve years it has been shown that a much larger class of problems can be reduced to WMI, such as marginal inference in Mixed Sum-Product Networks [Morettin et al., 2020], or veriﬁcation of fairness properties in probabilistic programs [Albarghouthi et al., 2017].

Original: Yet, many questions related to learning this class of distributions from data are still open.
Revised: Yet, many questions related to learning this class of distributions from data are still open.

Original: In this paper, we investigate weight learning for WMI models in a principled way.
Revised: In this paper, we investigate weight learning for WMI models in a principled way.

Original: First, we show under which conditions weight learning can be done in a tractable way and by doing this we greatly extend the class of WMI models amenable to efﬁcient learning.
Revised: First, we show under which conditions weight learning can be done in a tractable way and by doing this we greatly extend the class of WMI models amenable to efﬁcient learning.

Original: Additionally, we show how a popular class of probabilistic models, namely Hinge Loss
Revised: Additionally, we show how a popular class of probabilistic models, namely Hinge Loss

Original: Markov Random Fields (HL-MRFs)
Revised: Markov Random Fields (HL-MRFs)

Original: [Bach et al., 2017], fall into this class by reducing marginal inference in HL-MRFs to WMI.
Revised: [Bach et al., 2017], fall into this class by reducing marginal inference in HL-MRFs to WMI.

Original: Leveraging recent results on the tractability of
Revised: Leveraging recent results on the tractability of

Original: WMI-based inference, we then characterize a subclass of
Revised: WMI-based inference, we then characterize a subclass of

Original: HL-MRFs that admit tractable maximum likelihood estimation of their parameters and marginal inference.
Revised: HL-MRFs that admit tractable maximum likelihood estimation of their parameters and marginal inference.

Original:  BACKGROUND
Revised:  BACKGROUND

Original: Notation.
Revised: Notation.

Original: Uppercase letters denote random variables ( X, B ) and lowercase letters denote their assignments ( x, b ).
Revised: Uppercase letters denote random variables ( X, B ) and lowercase letters denote their assignments ( x, b ).

Original: We use bold for sets of variables ( X , B ), and their joint assignments ( x , b ).
Revised: We use bold for sets of variables ( X , B ), and their joint assignments ( x , b ).

Original: We use capital Greek letters for logical formulas ( Γ , ∆ ).
Revised: We use capital Greek letters for logical formulas ( Γ , ∆ ).

Original: Literals are atomic formulas or their negation, and are denoted using either (cid:96) or lowercase Greek letters ( γ, δ ).
Revised: Literals are atomic formulas or their negation, and are denoted using either (cid:96) or lowercase Greek letters ( γ, δ ).

Original: We let x | = ∆ denote the satisfaction of a formula ∆ by an assignment x .
Revised: We let x | = ∆ denote the satisfaction of a formula ∆ by an assignment x .

Original: Its corresponding indicator function is (cid:74) x | = ∆ (cid:75) .
Revised: Its corresponding indicator function is (cid:74) x | = ∆ (cid:75) .

Original: A state-of-the-art approach for answering probabilistic queries in many discrete models reduces the problem to weighted model counting (WMC), i.e. the task of computing the weighted sum of the models (solutions) of a propositional formula ∆ :
Revised: A state-of-the-art approach for answering probabilistic queries in many discrete models reduces the problem to weighted model counting (WMC), i.e. the task of computing the weighted sum of the models (solutions) of a propositional formula ∆ :

Original: [Equation]
Revised: [Equation]

Original: Typically, it is assumed that the weight of a model factorizes as the product of non-negative constant weights associated with each literal (an atom or its negation) in the solution, i.e.
Revised: Typically, it is assumed that the weight of a model factorizes as the product of non-negative constant weights associated with each literal (an atom or its negation) in the solution, i.e.

Original: [Equation]
Revised: [Equation]

Original: , where (cid:74) .
Revised: , where (cid:74) .

Original: (cid:75) :
Revised: (cid:75) :

Original: B → { 0 , 1 } is the indicator function, L = Atoms (∆) ∪ {¬ A | A ∈ Atoms (∆) } denotes the set of all the literals and w (cid:96) ∈ R + is the positive weight of a literal (cid:96) (unweighted literals are assumed to have weight 1 ).
Revised: B → { 0 , 1 } is the indicator function, L = Atoms (∆) ∪ {¬ A | A ∈ Atoms (∆) } denotes the set of all the literals and w (cid:96) ∈ R + is the positive weight of a literal (cid:96) (unweighted literals are assumed to have weight 1 ).

Original: Example 1 Consider the formula ∆ =
Revised: Example 1 Consider the formula ∆ =

Original: ( A → B ) and weights w A
Revised: ( A → B ) and weights w A

Original: = 2 , w ¬ A = 3 , w B = 5 , then:
Revised: = 2 , w ¬ A = 3 , w B = 5 , then:

Original: [Equation]
Revised: [Equation]

Original: = 28 .
Revised: = 28 .

Original: The pair (cid:104) ∆ , W(cid:105) encodes an unnormalized joint distributions over the propositional variables in ∆ , thus the normalized probability of a formula ∆ Q given evidence expressed as another formula ∆ E is computed as:
Revised: The pair (cid:104) ∆ , W(cid:105) encodes an unnormalized joint distributions over the propositional variables in ∆ , thus the normalized probability of a formula ∆ Q given evidence expressed as another formula ∆ E is computed as:

Original: [Equation]
Revised: [Equation]

Original: Algorithmic advances in both exact and approximate WMC motivated its generalization to hybrid continuous/discrete settings [Belle et al., 2015].
Revised: Algorithmic advances in both exact and approximate WMC motivated its generalization to hybrid continuous/discrete settings [Belle et al., 2015].

Original: Given a set of continuous random variables X and a set of
Revised: Given a set of continuous random variables X and a set of

Original: Boolean variables A , the support of the joint probability
Revised: Boolean variables A , the support of the joint probability

Original: Pr ( X , A ) is encoded by means of a satisﬁability modulo theories (SMT)
Revised: Pr ( X , A ) is encoded by means of a satisﬁability modulo theories (SMT)

Original: [Barrett et al., 2010] formula, i.e. a (typically quantiﬁer-free) expression containing both propositional and theory atoms connected with the usual logical connectives.
Revised: [Barrett et al., 2010] formula, i.e. a (typically quantiﬁer-free) expression containing both propositional and theory atoms connected with the usual logical connectives.

Original: Speciﬁcally, the theory atoms encode algebraic constraints over X , often restricted to the theory of linear algebra over reals ( LRA ), where atoms have form ( c T X ≤ b ) .
Revised: Speciﬁcally, the theory atoms encode algebraic constraints over X , often restricted to the theory of linear algebra over reals ( LRA ), where atoms have form ( c T X ≤ b ) .

Original: Example 

Revised: Example

Original: The following SMT- LRA formula: ∆ = (0 ≤ X 1 )
Revised: The following SMT- LRA formula: ∆ = (0 ≤ X 1 )

Original: [Equation]
Revised: [Equation]

Original: X 1 ≤ 1) ∧
Revised: X 1 ≤ 1) ∧

Original: [Equation]
Revised: [Equation]

Original: 0 <
Revised: 0 <

Original: X
Revised: X

Original: [Equation]
Revised: [Equation]

Original: ) ∧ ( X
Revised: ) ∧ ( X

Original: [Equation]
Revised: [Equation]

Original: ≤ 1) ∧ ( A → ( X 1 + X 2 ≤ 1)) has 3 satisfying truth assignments ( X 1 , X 2 ∈ [0 , 1] are always true):
Revised: ≤ 1) ∧ ( A → ( X 1 + X 2 ≤ 1)) has 3 satisfying truth assignments ( X 1 , X 2 ∈ [0 , 1] are always true):

Original: [Equation]
Revised: [Equation]

Original: ¬ A ∧ ¬ ( X
Revised: ¬ A ∧ ¬ ( X

Original: [Equation]
Revised: [Equation]

Original: X
Revised: X

Original: [Equation]
Revised: [Equation]

Original: ∧
Revised: ∧

Original: [Equation]
Revised: [Equation]

Original: . } for a total (unweighted) volume of 32 .
Revised: . } for a total (unweighted) volume of 32 .

Original: In addition to the usual constant weights associated with propositional literals, algebraic literals (cid:96) on variables
Revised: In addition to the usual constant weights associated with propositional literals, algebraic literals (cid:96) on variables

Original: X (cid:96) ⊆
Revised: X (cid:96) ⊆

Original: X can be mapped to functions over X (cid:96) .
Revised: X can be mapped to functions over X (cid:96) .

Original: Thus, the weight function W ( µ, x ) =
Revised: Thus, the weight function W ( µ, x ) =

Original: [Equation]
Revised: [Equation]

Original: is a piecewise function, associating an unnormalized density to each solution µ | = ∆ .
Revised: is a piecewise function, associating an unnormalized density to each solution µ | = ∆ .

Original: In this context L denotes the set of weighted literals, which doesn’t necessarily have to appear in ∆ .
Revised: In this context L denotes the set of weighted literals, which doesn’t necessarily have to appear in ∆ .

Original: Intuitively, a truth assignment to the literals L univocally deﬁnes a region of the piecewise distribution.
Revised: Intuitively, a truth assignment to the literals L univocally deﬁnes a region of the piecewise distribution.

Original: Similarly to WMC, the weighted model integral is computed by summing over the solutions of the SMT formula and, additionally, by integrating the density function in the continuous domain:
Revised: Similarly to WMC, the weighted model integral is computed by summing over the solutions of the SMT formula and, additionally, by integrating the density function in the continuous domain:

Original: [Equation]
Revised: [Equation]

Original: Piecewise polynomials, which admit closed-form solutions when integrated over arbitrary polytopes, are the most investigated class of joint density in the WMI literature.
Revised: Piecewise polynomials, which admit closed-form solutions when integrated over arbitrary polytopes, are the most investigated class of joint density in the WMI literature.

Original: Example 3 Consider the formula in Ex.2 and a single weighted literal (cid:96) =
Revised: Example 3 Consider the formula in Ex.2 and a single weighted literal (cid:96) =

Original: ( X 1 + X 2 ≤ 1) with w (cid:96) ( X 1 , X 2 ) =
Revised: ( X 1 + X 2 ≤ 1) with w (cid:96) ( X 1 , X 2 ) =

Original: X 1 + X 2 , i.e. W ( X 1 , X 2 ) =
Revised: X 1 + X 2 , i.e. W ( X 1 , X 2 ) =

Original: ( X 1 + X 2 ) (cid:74)
Revised: ( X 1 + X 2 ) (cid:74)

Original: X 1 + X 2 ≤ 1 (cid:75) .
Revised: X 1 + X 2 ≤ 1 (cid:75) .

Original: Then, the weighted model integral is:
Revised: Then, the weighted model integral is:

Original: [Equation]
Revised: [Equation]

Original: W.l.o.g., for notational convenience from here on we will focus on WMI problems on continuous variables only.
Revised: W.l.o.g., for notational convenience from here on we will focus on WMI problems on continuous variables only.

Original: This is possible since any WMI problem on continuous and
Revised: This is possible since any WMI problem on continuous and

Original: Boolean variables can be reduced in polytime to a new
Revised: Boolean variables can be reduced in polytime to a new

Original: WMI problem on continuous variables only, without changing its inference complexity class, by properly introducing auxiliary variables to account for Boolean variables [Zeng and Van den Broeck, 2019].
Revised: WMI problem on continuous variables only, without changing its inference complexity class, by properly introducing auxiliary variables to account for Boolean variables [Zeng and Van den Broeck, 2019].

Original: We remark that the results on parameter learning reported in the following sections hold for hybrid distributions too.
Revised: We remark that the results on parameter learning reported in the following sections hold for hybrid distributions too.

Original: In fact, weighted propositional variables would contribute with piecewise constant factors only, a subcase of our generalized theory that was previously investigated by Belle et al.
Revised: In fact, weighted propositional variables would contribute with piecewise constant factors only, a subcase of our generalized theory that was previously investigated by Belle et al.

Original: We deﬁne the normalized density of any data point x as:
Revised: We deﬁne the normalized density of any data point x as:

Original: [Equation]
Revised: [Equation]

Original: Characterizing the dependency structure among the variables in a model is crucial for characterizing the tractability of probabilistic inference.
Revised: Characterizing the dependency structure among the variables in a model is crucial for characterizing the tractability of probabilistic inference.

Original: This structure can be captured with the notion of primal graph .
Revised: This structure can be captured with the notion of primal graph .

Original: Deﬁnition 2.1.
Revised: Deﬁnition 2.1.

Original: (Primal Graph) Given a model (cid:104) ∆ , W(cid:105) , its primal graph G (cid:104) ∆ , W(cid:105) =
Revised: (Primal Graph) Given a model (cid:104) ∆ , W(cid:105) , its primal graph G (cid:104) ∆ , W(cid:105) =

Original: ( V , E ) is the undirected graph whose vertex set V is the index set of variables in formula ∆ and L , and whose edge set E has edge i − j iff variable
Revised: ( V , E ) is the undirected graph whose vertex set V is the index set of variables in formula ∆ and L , and whose edge set E has edge i − j iff variable

Original: X i and variable X j appear together in one clause Γ ∈ ∆ or in one weighted literal (cid:96) ∈ L .
Revised: X i and variable X j appear together in one clause Γ ∈ ∆ or in one weighted literal (cid:96) ∈ L .

Original:  MAXIMUM LIKELIHOOD ESTIMATION OF WEIGHTED MODEL INTEGRATION PARAMETERS
Revised:  MAXIMUM LIKELIHOOD ESTIMATION OF WEIGHTED MODEL INTEGRATION PARAMETERS

Original: We now consider the problem of estimating the parameters of a structured, piecewise distribution from data.
Revised: We now consider the problem of estimating the parameters of a structured, piecewise distribution from data.

Original: Speciﬁcally, we are concerned with learning the parameters in the literal weights w (cid:96) for (cid:96)
Revised: Specifically, we are concerned with learning the parameters in the literal weights w (cid:96) for (cid:96)

Original: ∈
Revised: ∈

Original: L (Fig. 1), assuming that the SMT formula ∆ and the  set L is ﬁxed and that a dataset consisting of  fully observed samples is provided.
Revised: L as illustrated in Figure 1, assuming that the SMT formula ∆ and the literal set L is ﬁxed and that a dataset consisting of i.i.d. fully observed samples is provided.

Original: We adopt the canonical parameter estimation approach, maximum likelihood estimation (MLE), that is,
Revised: We adopt the canonical parameter estimation approach, maximum likelihood estimation (MLE), which gives estimation for parameters by solving the optimization problem below,

Original: [Equation]
Revised: [Equation]

Original: where L ( Θ ) is the log-likelihood of the dataset, i.e., 
Revised: where L ( Θ ) is the log-likelihood of the dataset, i.e., L

Original: L ( Θ ) = log (cid:89) x
Revised: [Equation] Θ ) = log [Equation]

Original: ∈D p ( x ; Θ ) .
Revised: p [Equation] [Equation]

Original: Plugging in the point-wise density p in Eq.
Revised: Plugging in the point-wise density p in Eq.

Original: 4 we get:
Revised: 4 we get:

Original: L ( Θ ) =
Revised: [Equation]

Original: (cid:88) x ∈D (cid:88) (cid:96) ∈L log w (cid:96) ( x ) (cid:74) x | = (cid:96) (cid:75) (6) − |D| · log WMI (∆ , W ; Θ )) .
Revised: 3.1 CONVEXITY OF MLE

Original: In general, the optimization problem in Equation 5 does not have a closed form solution.
Revised: In general, the optimization problem in Equation 5 does not have a closed form solution.

Original: For this reason, we consider optimizing our objective via iterative methods, such as gradient ascent.
Revised: For this reason, we consider optimizing our objective via iterative methods.

Original: We then need to analyze the mathematical properties of the log-likelihood ∂ L ( Θ ) ∂ Θ for characterizing convergenceand tractability of the optimization problem.
Revised: Before that, we are interested in analyzing the convexity property of the log-likelihood ∂ L ( Θ ) ∂ Θ for characterizing convergence of the optimization problem.

Original: Given the SMT formula ∆ and the set of weighted literals L , we explore whether the log-likelihood objective is concave, which guarantees convergence to the global optimum when iterative methods such as gradient ascent are used [Nesterov and Nemirovskii, 1994].
Revised: Given the SMT formula ∆ and the set of weighted literals L , we explore under what conditions the log-likelihood objective is concave, which guarantees convergence to the global optimum when iterative methods such as gradient ascent are used [Nesterov and Nemirovskii, 1994].

Original: As reported in the original WMI paper [Belle et al., 2015],
Revised: As reported in the original WMI paper [Belle et al., 2015],

Original: MLE of the parameters in weight functions can be solved optimally using standard convex optimization tools for constant weight functions, that is, when the function w (cid:96) ( x ) is constant for any (cid:96) ∈ L .
Revised: MLE of the parameters in weight functions can be solved optimally using standard convex optimization tools for constant weight functions, that is, when the function w (cid:96) ( x ) is constant for any (cid:96) ∈ L .

Original: We generalize this result to weight functions that are log-linear with respect to their parameters .
Revised: We generalize this result to weight functions that are log-linear with respect to their parameters .

Original: Speciﬁcally, the weight functions take their form as
Revised: Speciﬁcally, the weight functions take their form as

Original: [Equation]
Revised: [Equation]

Original: where f (cid:96) ( · ) = (f
Revised: where f (cid:96) [Equation] ) = (

Original: [Equation]
Revised: [Equation]

Original: ( · ) , · · · , f K(cid:96) ( · )) (cid:62) is a vector of features deﬁned over variable subset X (cid:96) .
Revised: ( · ) , · · · , f K(cid:96) ( · )) (cid:62) is a vector of features deﬁned over variable subset X (cid:96) .

Original: Log-linear functions are an expressive weight family that generalizes many functions adopted in previous works.
Revised: Log-linear functions are an expressive weight family that generalizes many functions adopted in previous works.

Original: Some example choices for feature functions f ( · ) could be 1) constant functions, in which case the WMI problem has constant weights, 2) monomials, in which case the WMI problem has exponentiated polynomial weights, 3) log-polynomials, in which case the WMI problem has polynomial weights.
Revised: Some example choices for feature functions f ( · ) could be 1) constant functions, in which case the WMI problem has constant weights, 2) monomials, in which case the WMI problem has exponentiated polynomial weights, 3) log-polynomials, in which case the WMI problem has polynomial weights.

Original: Notice that  the ﬁrst term in the log-likelihood in Equationis a linear combination of parameters, i.e.,
Revised: Notice that when the weight functions are log-linear, the ﬁrst term in the log-likelihood in Equation 6 is a linear combination of parameters, i.e.,

Original: [Equation]
Revised: [Equation]

Original: We thus investigate the convexity of the log-partition function term Z ( Θ ) =
Revised: We thus investigate the convexity of the log-partition function term Z ( Θ ) =

Original: WMI (∆ , W ; Θ ) .
Revised: WMI (∆ , W ; Θ ) .

Original: Proposition 3.1.
Revised: Proposition 3.1.

Original: The log-partition function log Z ( Θ ) is convex if the weight functions are log-linear in their parameters.
Revised: The log-partition function log Z ( Θ ) is convex if the weight functions are log-linear in their parameters.

Original: Sketch of Proof
Revised: Sketch of Proof

Original: Denote the i -th parameter in weight function w (cid:96) as Θ (cid:96)i .
Revised: Denote the i -th parameter in weight function w (cid:96) as Θ (cid:96)i .

Original: The ﬁrst-order derivative of the logpartition function log Z ( Θ ) with respect to a parameter Θ (cid:96)i is as follows.
Revised: The ﬁrst-order derivative of the logpartition function log Z ( Θ ) with respect to a parameter Θ (cid:96)i is as follows.

Original: [Equation]
Revised: [Equation]

Original: For brevity, denote ∂∂ Θ (cid:96)i log w (cid:96) ( x ) (cid:74) x | = (cid:96) (cid:75) by notation a (cid:96)i .
Revised: For brevity, denote ∂∂ Θ (cid:96)i log w (cid:96) ( x ) (cid:74) x | = (cid:96) (cid:75) by notation a (cid:96)i .

Original: Further, the second-order derivative of the log-partition function with respect to parameters Θ (cid:96)i and Θ (cid:96) (cid:48)
Revised: Further, the second-order derivative of the log-partition function with respect to parameters Θ (cid:96)i and Θ (cid:96) (cid:48)

Original: j is as follows.
Revised: j is as follows.

Original: [Equation]
Revised: [Equation]

Original: Consider a (cid:96)i as random variables distributed according to distributions deﬁned by parameter Θ .
Revised: Consider a (cid:96)i as random variables distributed according to distributions deﬁned by parameter Θ .

Original: Then the Hessian matrix of log Z ( Θ ) is the co-variance matrix of random variables a (cid:96)i which is positive deﬁnite.
Revised: Then the Hessian matrix of log Z ( Θ ) is the co-variance matrix of random variables a (cid:96) i which is positive deﬁnite.

Original: Therefore the logpartition function log Z ( Θ ) is a convex function in parameters Θ .
Revised: Therefore the logpartition function log Z ( Θ ) is a convex function in parameters Θ .

Original: Proposition 3.2.
Revised: Proposition 3.2.

Original: The log-likelihood function L ( Θ ; D ) is concave if the weight functions are log-linear in their parameters.
Revised: The log-likelihood function L ( Θ ; D ) is concave if the weight functions are log-linear in their parameters.

Original: Proof.
Revised: Proof.

Original: This result directly follows from the linearity of the ﬁrst term and the convexity of log Z ( Θ ) (Prop. 3.1).
Revised: This result directly follows from the linearity of the ﬁrst term and the convexity of log Z ( Θ ) (Prop. 3.1).

Original: The concavity of the log-likelihood function allows the problem of computing the maximum likelihood to be formulated as a convex minimization problem and optimally solved with gradient descent methods.
Revised: The concavity of the log-likelihood function allows the problem of computing the maximum likelihood to be formulated as a convex minimization problem and optimally solved with gradient descent methods.

Revised: 3.2 TRACTABILITY OF GRADIENTS

Revised: The next question that naturally follows is how is the tractability of gradient computation.

Original: The partial derivative of the log-likelihood with respect to a parameter Θ k(cid:96) is:
Revised: The partial derivative of the log-likelihood with respect to a parameter Θ k (cid:96) is:

Original: [Equation]
Revised: [Equation]

Original: Notice that the ﬁrst expectation is a weighted count of the dataset D and thus can be computed in  Θ( |D| ) .
Revised: Notice that the ﬁrst expectation is a weighted count of the dataset D and thus can be computed in time complexity Θ( |D| ) .

Original: The second expectation requires the computation of the partition function, i.e. a WMI problem, which is intractable in general, and therefore, approximation algorithms are needed to compute the gradient updates.
Revised: The second expectation requires the computation of the partition function, i.e., a WMI problem, which is intractable in general, and therefore, approximation algorithms are needed to compute the gradient updates.

Original: Recently, Zeng et al.
Revised: Recently, Zeng et al.

Original: [2020a] characterized the tractable class of WMI problems in terms conditions on both their structure and in the form of the weight functions [Zeng et al., 2020b].
Revised: [2020a] characterized the tractable class of WMI problems in terms conditions on both their structure and in the form of the weight functions [Zeng et al., 2020b].

Original: A family of weight functions satisﬁes tractable weight conditions(TWC) iff:
Revised: A family of weight functions satisﬁes tractable weight conditions

Original:  i) it is closed under product; ii) it admits efﬁcient computation of antiderivatives; iii) it is closed under deﬁnite integration over each variables.
Revised: (TWC) iff: i) it is closed under product; ii) it admits efﬁcient computation of antiderivatives; iii) it is closed under deﬁnite integration over each variables.

Original: Some examples when the weight function families satisfy TWCs include the cases where the features functions are constants, linear functions or log-polynomial functions.
Revised: Some examples when the weight function families satisfy TWCs include the cases where the features functions are constants, linear functions or log-polynomial functions.

Original: Next we present the previous result on the tractability of
Revised: Next we present the previous result on the tractability of

Original: WMI problems which is necessary to the tractability of the partial derivatives in MLE.
Revised: WMI problems which is necessary to the tractability of the partial derivatives in MLE.

Original: Proposition 3.3.
Revised: Proposition 3.3.

Original: [Zeng et al., 2020a]
Revised: [Zeng et al., 2020a]

Original: Let
Revised: Let

Original: WMI ( Ω , log( n ) , tr ) be the class of WMI problems with primal graph G with diameter of size Θ(log( n )) and treewidth tr .
Revised: WMI ( Ω , log( n ) , tr ) be the class of WMI problems with primal graph G with diameter of size Θ(log( n )) and treewidth tr .

Original: When WMI ( Ω , log( n ) , tr ) has parametric weight function family Ω satisﬁes the TWCs,
Revised: When WMI ( Ω , log( n ) , tr ) has parametric weight function family Ω satisﬁes the TWCs,

Original: WMI ( Ω , log( n ) , tr ) is a tractable WMI class for inference if-and-only-if treewidth tr = 1 .
Revised: WMI ( Ω , log( n ) , tr ) is a tractable WMI class for inference if-and-only-if treewidth tr = 1 .

Original: Theorem 3.4.
Revised: Theorem 3.4.

Original: If the WMI problem WMI (∆ , W ) is in the tractable WMI problem class WMI ( Ω , log( n ) , 1) and the feature functions f k(cid:96) ( x ) are in function family that satisﬁes
Revised: If the WMI problem WMI (∆ , W ) is in the tractable WMI problem class WMI ( Ω , log( n ) , 1) and the feature functions f k(cid:96) ( x ) are in function family that satisﬁes

Original: TWCs, then the partial derivative in Equation 7 can be tractably computed.
Revised: TWCs, then the partial derivative in Equation 7 can be tractably computed.

Original: Proof.
Revised: Proof.

Original: Given that the ﬁrst term in Equation 7 can be computed linearly in |D| , it sufﬁces to show that the second term is a ratio of two tractable WMI problems:
Revised: Given that the ﬁrst term in Equation 7 can be computed linearly in |D| , it sufﬁces to show that the second term is a ratio of two tractable WMI problems:

Original: [Equation]
Revised: [Equation]

Original: where for all (cid:96) ∗ , w (cid:48) (cid:96) ∗ ∈ W (cid:48) , w (cid:96) ∗ ∈ W , if (cid:96) ∗ (cid:54) = (cid:96) , weight function w (cid:48) (cid:96) ∗ = w (cid:96) ∗ ; otherwise, the weight function is deﬁned as w (cid:48) (cid:96) ∗ ( x ) =
Revised: where for all (cid:96) ∗ , w (cid:48) (cid:96) ∗ ∈ W (cid:48) , w (cid:96) ∗ ∈ W , if (cid:96) ∗ (cid:54) = (cid:96) , weight function w (cid:48) (cid:96) ∗ = w (cid:96) ∗ ; otherwise, the weight function is deﬁned as w (cid:48) (cid:96) ∗ ( x ) =

Original: w (cid:96) ∗ ( x ) f k(cid:96) ( x ) .
Revised: w (cid:96) ∗ ( x ) f k(cid:96) ( x ) .

Original: The tractability of WMI (∆ ∧ (cid:96), W (cid:48) ) follows from the tractability of
Revised: The tractability of WMI (∆ ∧ (cid:96), W (cid:48) ) follows from the tractability of

Original: WMI (∆ , W ) , given that they have the same primal graph and that w (cid:48) (cid:96) ∗ ( x ) is the product of two functions that satisﬁes the TWC.
Revised: WMI (∆ , W ) , given that they have the same primal graph and that w (cid:48) (cid:96) ∗ ( x ) is the product of two functions that satisﬁes the TWC.

Original: Therefore, the partial derivative in Equation 7 can be efﬁciently computed.
Revised: Therefore, the partial derivative in Equation 7 can be efﬁciently computed.

Original: With the results above, we characterized which families of distributions that are amenable to WMI-based inference admit both tractable and exact MLE of their parameters.
Revised: With the results above, we characterized which families of distributions that are amenable to WMI-based inference admit both tractable and exact MLE of their parameters.

Original: In the following, we present a novel reduction of marginal inference in HL-MRFs to WMI and generalize these results to this popular class of models.
Revised: In the following, we present a novel reduction of marginal inference in HL-MRFs to WMI and generalize these results to this popular class of models.

Original:  MARGINAL INFERENCE FOR HL-MRFS VIA WMI
Revised:  MARGINAL INFERENCE FOR HL-MRFS VIA WMI

Original: Hinge-loss Markov Random ﬁelds (HL-MRFs)
Revised: Hinge-loss Markov Random ﬁelds (HL-MRFs)

Original: [Bach et al., 2017] are a recently proposed statistical relational learning framework used to model highly structured data.
Revised: [Bach et al., 2017] are a recently proposed statistical relational learning framework used to model highly structured data.

Original: This family of models allows tractable and exact MAP inference when weighted constraints are deﬁned using Łukasiewicz logic, a fuzzy relaxation of Boolean logic.
Revised: This family of models allows tractable and exact MAP inference when weighted constraints are deﬁned using Łukasiewicz logic, a fuzzy relaxation of Boolean logic.

Original: However, exact marginal inference for HL-MRFs is intractable in general [Embar et al., 2019].
Revised: However, exact marginal inference for HL-MRFs is intractable in general [Embar et al., 2019].

Original: Therefore, the weight learning via MLE for
Revised: Therefore, the weight learning via MLE for

Original: HL-MRFs approximates expectations with MAP states.
Revised: HL-MRFs approximates expectations with MAP states.

Original: We investigate the connection between HL-MRFs and WMI problems and propose a reduction from HL-MRFs to WMI models.
Revised: We investigate the connection between HL-MRFs and WMI problems and propose a reduction from HL-MRFs to WMI models.

Original: This reduction is profound in two senses.
Revised: This reduction is profound in two senses.

Original: Firstly, it makes the HL-MRFs amenable to the MLE-based parameter learning approach as proposed in Section 3.
Revised: Firstly, it makes the HL-MRFs amenable to the MLE-based parameter learning approach as proposed in Section 3.

Original: Secondly, it allows the characterization of tractability of marginal inference for HL-MRFs with the conditions reported in
Revised: Secondly, it allows the characterization of tractability of marginal inference for HL-MRFs with the conditions reported in

Original: Prop. 3.3.
Revised: Prop. 3.3.

Original: To the best of our knowledge, this is the ﬁrst class of tractable HL-MRFs for exact marginal inference.
Revised: To the best of our knowledge, this is the ﬁrst class of tractable HL-MRFs for exact marginal inference.

Original: 4.1 HINGE-LOSS MARKOV RANDOM FIELDS
Revised: 4.1 HINGE-LOSS MARKOV RANDOM FIELDS

Original: Before describing the reduction to WMI, we provide the main deﬁnitions in HL-MRFs.
Revised: Before describing the reduction to WMI, we provide the main deﬁnitions in HL-MRFs.

Original: W.l.o.g, in the following we assume that all the random variables are unobserved.
Revised: W.l.o.g, in the following we assume that all the random variables are unobserved.

Original: Deﬁnition 4.1.
Revised: Deﬁnition 4.1.

Original: (potential)
Revised: (potential)

Original: Let X =
Revised: Let X =

Original: ( X 1 , · · · , X n ) be a vector of n variables with joint domain D
Revised: ( X 1 , · · · , X n ) be a vector of n variables with joint domain D

Original: = [0 , 1] n .
Revised: = [0 , 1] n .

Original: Let φ = ( φ 1 , · · · , φ m ) be a vector of m continuous potentials of the form
Revised: Let φ = ( φ 1 , · · · , φ m ) be a vector of m continuous potentials of the form

Original: [Equation]
Revised: [Equation]

Original: where (cid:96) j is a linear function of X and p j ∈ { 1 , 2 } .
Revised: where (cid:96) j is a linear function of X and p j ∈ { 1 , 2 } .

Original: Typically, (cid:96) j are interpreted as clauses in Łukasiewicz logic, with φ j ( x ) representing the (possibly squared) distance to the satisfaction of the linear constraint (cid:96) j ≤ 0 .
Revised: Typically, (cid:96) j are interpreted as clauses in Łukasiewicz logic, with φ j ( x ) representing the (possibly squared) distance to the satisfaction of the linear constraint (cid:96) j ≤ 0 .

Original: Deﬁnition 4.2.
Revised: Deﬁnition 4.2.

Original: (constrained hinge-loss energy function)
Revised: (constrained hinge-loss energy function)

Original: For X ∈ D , given a vector of m non-negative free parameters, i.e., weights, α = ( α 1 , · · · , α m ) ∈ R m , a constrained hinge-loss energy function f
Revised: For X ∈ D , given a vector of m non-negative free parameters, i.e., weights, α = ( α 1 , · · · , α m ) ∈ R m , a constrained hinge-loss energy function f

Original: α is deﬁned as follows.
Revised: α is deﬁned as follows.

Original: [Equation]
Revised: [Equation]

Original: This energy function quantiﬁes the (weighted) satisfaction of the linear constraints above.
Revised: This energy function quantiﬁes the (weighted) satisfaction of the linear constraints above.

Original: These soft constraints are complemented with a set of hard constraints (i.e. with inﬁnite weights) that are deﬁned separately for convenience.
Revised: These soft constraints are complemented with a set of hard constraints (i.e. with inﬁnite weights) that are deﬁned separately for convenience.

Original: Deﬁnition 4.3.
Revised: Deﬁnition 4.3.

Original: (feasible set) Let c =
Revised: (feasible set) Let c =

Original: ( c 1 , · · · , c r ) be a vector of r linear constraint functions associated with index sets denoting equality constraints E and inequality constraints
Revised: ( c 1 , · · · , c r ) be a vector of r linear constraint functions associated with index sets denoting equality constraints E and inequality constraints

Original: I , which deﬁne the feasible set
Revised: I , which deﬁne the feasible set

Original: [Equation]

Original: [Equation]
Revised: [Equation]

Original: Then, the probability density function is deﬁned over the feasible set and is inversely proportional to the constrained hinge-loss energy function.
Revised: Then, the probability density function is deﬁned over the feasible set and is inversely proportional to the constrained hinge-loss energy function.

Original: Deﬁnition 4.4.
Revised: Deﬁnition 4.4.

Original: (HL-MRF)
Revised: (HL-MRF)

Original: A hinge-loss Markov random ﬁeld p over random variables
Revised: A hinge-loss Markov random ﬁeld p over random variables

Original: X is a probability density deﬁned as follows: if x / ∈ ˜ D , then p ( x ) = 0 ; if x ∈ ˜ D , then p ( x
Revised: X is a probability density deﬁned as follows: if x / ∈ ˜ D , then p ( x ) = 0 ; if x ∈ ˜ D , then [Equation]

Original: [Equation]
Revised: [Equation]

Original: where Z ( α ) is the partition function, i.e.,
Revised: where Z ( α ) is the partition function, i.e.,

Original: [Equation]
Revised: [Equation]

Original: The templated HL-MRFs can be similarly deﬁned, where the potentials are deﬁned by the templates denoted by T
Revised: The templated HL-MRFs can be similarly deﬁned, where the potentials are deﬁned by the templates denoted by T

Original: = ( t 1 , · · · , t S ) where each t s is the set of indices of the potentials deﬁned by the template.
Revised: = ( t 1 , · · · , t S ) where each t s is the set of indices of the potentials deﬁned by the template.

Original: The templates are associated with weights W =
Revised: The templates are associated with weights W =

Original: ( W 1 , · · · , W S ) .
Revised: ( W 1 , · · · , W S ) .

Original: Then the sum of potentials deﬁned by a template t s is Φ s ( x ) =
Revised: Then the sum of potentials deﬁned by a template t s is Φ s ( x ) =

Original: (cid:80) i ∈
Revised: (cid:80) i ∈

Original: t s φ i ( x ) .
Revised: t s φ i ( x ) .

Original: For each potential φ i ( x ) with its index i in t s , they are assigned weights to be the weight of the template, that is, α i =
Revised: For each potential φ i ( x ) with its index i in t s , they are assigned weights to be the weight of the template, that is, α i =

Original: W s .
Revised: W s .

Original: Together, the constrained hinge-loss energy function of a templated HL-MRF is as follows.
Revised: Together, the constrained hinge-loss energy function of a templated HL-MRF is as follows.

Original: [Equation]
Revised: [Equation]

Original: where Φ ( x ) =
Revised: where Φ ( x ) =

Original: ( Φ 1 ( x ) , · · · , Φ S ( x )) .
Revised: ( Φ 1 ( x ) , · · · , Φ S ( x )) .

Original: The templated HLMRFs are often used in the parameter learning when the weights are considered to be shared among potentials [Bach et al., 2017].
Revised: The templated HLMRFs are often used in the parameter learning when the weights are considered to be shared among potentials [Bach et al., 2017].

Original: 4.2 FROM HL-MRFS TO WMI
Revised: 4.2 FROM HL-MRFS TO WMI

Original: This section presents the reduction from HL-MRFs to WMI models that bridge the two frameworks.
Revised: This section presents the reduction from HL-MRFs to WMI models that bridge the two frameworks.

Original: It allows the inference on HL-MRFs to be amenable to the tractability results on WMI problems as well as WMI solvers.
Revised: It allows the inference on HL-MRFs to be amenable to the tractability results on WMI problems as well as WMI solvers.

Original: Theorem 4.5.
Revised: Theorem 4.5.

Original: For any HL-MRF p over random variables
Revised: For any HL-MRF p over random variables

Original: X , there exists a WMI problem WMI (∆ , W ) with perliteral weights whose WMI density denoted by p ∆ equals to the HL-MRF p .
Revised: X , there exists a WMI problem WMI (∆ , W ) with perliteral weights whose WMI density denoted by p ∆ equals to the HL-MRF p .

Original: Proof.
Revised: Proof.

Original: Given an HL-MRF p , construct an SMT( LRA ) formula ∆ in CNF form as follows.
Revised: Given an HL-MRF p , construct an SMT( LRA ) formula ∆ in CNF form as follows.

Original: [Equation]
Revised: [Equation]

Original: Then construct a set of per-literal weights W with the set of literals L = { (cid:96) j ( x ) ≥ 0 } j ∈ [ m ] as follows.
Revised: Then construct a set of per-literal weights W with the set of literals L = { (cid:96) j ( x ) ≥ 0 } j ∈ [ m ] as follows.

Original: For brevity, here the per-literal weight is denoted by Wj with subscript being the index of the LRA atom (cid:96) j in its associated literal (cid:96) j ( x ) ≥ 0 . 
Revised: For brevity, here the per-literal weight is denoted by W being the index of the LRA atom (cid:96) j in its associated literal (cid:96) j ( x ) ≥ 0 . [Equation]

Original: [Equation]
Revised: [Equation]

Original: With the above notations, the WMI density deﬁned by Equation 4 is as follows.
Revised: With the above notations, the WMI density deﬁned by Equation 4 is as follows.

Original: [Equation]
Revised: [Equation]

Original: with
Revised: with

Original: [Equation]

Original: [Equation]
Revised: [Equation]

Original: Moreover, the HL-MRF P in Deﬁnition 4.4 has an equivalent formulation by using indicator function.
Revised: Moreover, the HL-MRF P in Deﬁnition 4.4 has an equivalent formulation by using indicator function.

Original: [Equation]
Revised: [Equation]

Original: Next we show that the un-normalized HL-MRF p is proportional to the WMI density p ∆ .
Revised: Next we show that the un-normalized HL-MRF p is proportional to the WMI density p ∆ .

Original: Notice that (cid:74) x ∈ D (cid:75) =
Revised: Notice that (cid:74) x ∈ D (cid:75) =

Original: (cid:74) x | = ∆ D (cid:75) and (cid:74) x ∈ ˜ D (cid:75) =
Revised: (cid:74) x | = ∆ D (cid:75) and (cid:74) x ∈ ˜ D (cid:75) =

Original: (cid:74) x | = ∆ ˜ D (cid:75) hold.
Revised: (cid:74) x | = ∆ ˜ D (cid:75) hold.

Original: Moreover, since sub-formula ∆
Revised: Moreover, since sub-formula ∆

Original: S is always SAT, it holds that
Revised: S is always SAT, it holds that

Original: [Equation]
Revised: [Equation]

Original: Further since it holds that max {(cid:96) j ( x ) , 0 } =
Revised: Further since it holds that max {

Original: [Equation]
Revised: [Equation]

Original: (cid:96) j ( x ) , we could rewrite the potentials in HL-MRF using indicator functions.
Revised: (cid:96) j ( x ) , we could rewrite the potentials in HL-MRF using indicator functions.

Original: [Equation]
Revised: [Equation]

Original: By Equations 19 and Equation 20, the following equality on un-normalized HL-MRF p holds for any x | = ∆ .
Revised: By Equations 19 and Equation 20, the following equality on un-normalized HL-MRF p holds for any x | = ∆ .

Original: [Equation]
Revised: [Equation]

Original: Thus it holds that p ( x ) ∝ p ∆ ( x ) .
Revised: Thus it holds that p ( x ) ∝ p ∆ ( x ) .

Original: By the same arguments, it can be shown that HL-MRF p and WMI density p ∆ have the same partition functions, which ﬁnishes the proof for p = p ∆ .
Revised: By the same arguments, it can be shown that HL-MRF p and WMI density p ∆ have the same partition functions, which ﬁnishes the proof for p = p ∆ .

Original: What immediately follows the reduction is the tractability of marginal inference on HL-MRFs.
Revised: What immediately follows the reduction is the tractability of marginal inference on HL-MRFs.

Original: When the potentials in the
Revised: When the potentials in the

Original: HL-MRF model is linear, the resulting WMI problem has its weight function to be in the exponetiated linear function family that satisﬁes the TWCs [Zeng et al., 2020a].
Revised: HL-MRF model is linear, the resulting WMI problem has its weight function to be in the exponetiated linear function family that satisﬁes the TWCs [Zeng et al., 2020a].

Original: This gives the ﬁrst non-trivial class of tractable HL-MRFs for exact marginal inference so far.
Revised: This gives the ﬁrst non-trivial class of tractable HL-MRFs for exact marginal inference so far.

Revised: Speciﬁcally, the tractability of the HL-MRF model is characterized by model structures in the form of primal graphs.

Original: Corollary 4.6.
Revised: Deﬁnition 4.6.

Revised: (Primal Graph of HL-MRFs)

Revised: Given an HLMRF model p , its primal graph G =

Revised: ( V , E ) is the undirected graph, whose vertext set V is the index set of variables over which p is deﬁned, and whose edge set E has edge i − j iff variables X i and variable X j appear together either in a potential or in a constraint in the feasible set ˜ D .

Original:  Given a HL-MRF p whose potentials are as deﬁned in Deﬁnition 4.1 with p i = 1 , if the WMI problem reduced from p has its primal graph to have tree-width one and  diameter of Θ(log( n ))  , then the marginal inference ofthe HL-MRF p is tractable.
Revised: Corollary 4.7. Given a HL-MRF p whose potentials are as deﬁned in Deﬁnition 4.1 with p i = 1 , if it has its primal graph with tree-width one and with diameter of Θ(log( n )) with n = | X | , then the marginal inference of p is tractable.

Original: 4.3 MLE FOR HL-MRFS
Revised: 4.3 MLE FOR HL-MRFS

Original: Besides the tractable marginal inference for HL-MRFs, what follows the reduction is that the that the parameter learning of WMI problems can be leveraged for the parameter learning of the HL-MRFs, and our analysis on the optimality and the tractability of MLE approach naturally generalize from WMI to HL-MRFs.
Revised: Besides the tractable marginal inference for HL-MRFs, what follows the reduction is that the that the parameter learning of WMI problems can be leveraged for the parameter learning of the HL-MRFs, and our analysis on the optimality and the tractability of MLE approach naturally generalize from WMI to HL-MRFs.

Original: To derive MLE-based parameter learning, we ﬁrst compute the partial derivative of the loglikelihood for the templated HL-MRFs in Equation 13 as follows.
Revised: To derive MLE-based parameter learning, we ﬁrst compute the partial derivative of the loglikelihood for the templated HL-MRFs in Equation 13 as follows.

Original: [Equation]
Revised: [Equation]

Original: In previous work, since the expectation over the templated
Revised: In previous work, since the expectation over the templated

Original: HL-MRFs is intractable in general, the MAP state is used to approximate the expectation [Bach et al., 2017].
Revised: HL-MRFs is intractable in general, the MAP state is used to approximate the expectation [Bach et al., 2017].

Original: However, our HL-MRFs-to-WMI reduction provides an alternative way to compute the expectation by using WMI solvers on the reduced WMI problem.
Revised: However, our HL-MRFs-to-WMI reduction provides an alternative way to compute the expectation by using WMI solvers on the reduced WMI problem.

Original: Speciﬁcally, the expectation can be computed exactly and tractably when an exact WMI solver is applicable [Morettin et al., 2021].
Revised: Speciﬁcally, the expectation can be computed exactly and tractably when an exact WMI solver is applicable [Morettin et al., 2021].

Original: Moreover, if the reduced WMI problem satisﬁes the assumptions in Theorem 3.4, the partial derivative for the templated HL-MRFs above can be computed exactly in tractable time.
Revised: Moreover, if the reduced WMI problem satisﬁes the assumptions in Theorem 3.4, the partial derivative for the templated HL-MRFs above can be computed exactly in tractable time.

Original: Below we show one of such cases.
Revised: Below we show one of such cases.

Original: Proposition 4.7.
Revised: Proposition 4.8.

Original: Given a HL-MRF p with the same assumptions as in Corollary 4.6, then the partial derivative in
Revised: Given a HL-MRF p with the same assumptions as in Corollary 4.7, then the partial derivative in

Original: Equation 21 can be tractably computed.
Revised: Equation 21 can be tractably computed.

Original:  RELATED WORK
Revised:  RELATED WORK

Original: Although most of the research output has focused on purely continuous or purely discrete distributions, in recent years probabilistic modelling for hybrid domains has received increasing attention.
Revised: Although most of the research output has focused on purely continuous or purely discrete distributions, in recent years probabilistic modelling for hybrid domains has received increasing attention.

Original: Undirected hybrid models with potentials in the exponential family have been investigated for pairwise distributions [Lee and Hastie, 2015] and more general cases [Yang et al., 2014].
Revised: Undirected hybrid models with potentials in the exponential family have been investigated for pairwise distributions [Lee and Hastie, 2015] and more general cases [Yang et al., 2014].

Original: Density Estimation Trees (DETs)
Revised: Density Estimation Trees (DETs)

Original: [Ram and Gray, 2011] address the problem of learning a distribution with axis-aligned piecewise constant components.
Revised: [Ram and Gray, 2011] address the problem of learning a distribution with axis-aligned piecewise constant components.

Original: Mixed SumProduct Networks (MSPNs)
Revised: Mixed SumProduct Networks (MSPNs)

Original: [Molina et al., 2018, Vergari et al., 2019] learn mixtures of categorical and univariate piecewise polynomial distributions.
Revised: [Molina et al., 2018, Vergari et al., 2019] learn mixtures of categorical and univariate piecewise polynomial distributions.

Original: In contrast with our setting, this line of research focuses on learning probabilistic relationships and the proposed learning and inference techniques disregard the algebraic and logical structures in the distributions.
Revised: In contrast with our setting, this line of research focuses on learning probabilistic relationships and the proposed learning and inference techniques disregard the algebraic and logical structures in the distributions.

Original: The maximum-likelihood estimation of the parameters of piecewise distributions with logical and algebraic constraints, here investigated in the log-linear case, was initially addressed for piecewise constants by Belle et al.
Revised: The maximum-likelihood estimation of the parameters of piecewise distributions with logical and algebraic constraints, here investigated in the log-linear case, was initially addressed for piecewise constants by Belle et al.

Original: Constraint learning in SMT, which is closely related to the problem of estimating the support of a structured hybrid distribution from data, was addressed in both supervised [Kolb et al., 2018] and unsupervised Morettin et al.
Revised: Constraint learning in SMT, which is closely related to the problem of estimating the support of a structured hybrid distribution from data, was addressed in both supervised [Kolb et al., 2018] and unsupervised Morettin et al.

Original: [2020] settings.
Revised: [2020] settings.

Original: The latter work additionally propose LARIAT, a full pipeline for learning hybrid structured distributions from data by renormalizing DETs or MSPNs with the learned constraints.
Revised: The latter work additionally propose LARIAT, a full pipeline for learning hybrid structured distributions from data by renormalizing DETs or MSPNs with the learned constraints.

Original: This approach heavily relies on greedy procedures for learning both the structure and the parameters of the model, while we focus on a principled way of estimating the parameters of these distributions via MLE.
Revised: This approach heavily relies on greedy procedures for learning both the structure and the parameters of the model, while we focus on a principled way of estimating the parameters of these distributions via MLE.

Original: While HL-MRFs were initially developed to efﬁciently answer MAP queries, approximate marginal inference has been investigated by Embar et al.
Revised: While HL-MRFs were initially developed to efﬁciently answer MAP queries, approximate marginal inference has been investigated by Embar et al.

Original: Besides approximating MLE with MAP states, parameter learning in these models has been addressed using maximum pseudolikelihood, large-margin estimation [Bach et al., 2017] and, more recently, with Bayesian optimization techniques [Srinivasan et al., 2020].
Revised: Besides approximating MLE with MAP states, parameter learning in these models has been addressed using maximum pseudolikelihood, large-margin estimation [Bach et al., 2017] and, more recently, with Bayesian optimization techniques [Srinivasan et al., 2020].

Original:  CONCLUSION
Revised:  CONCLUSION

Original: In this work we investigated in a rigorous and principled manner the problem of estimating the parameters of hybrid models that account for logical and algebraic relationships among variables.
Revised: In this work we investigated in a rigorous and principled manner the problem of estimating the parameters of hybrid models that account for logical and algebraic relationships among variables.

Original: We showed that MLE can be solved optimally for piecewise distributions that are log-linear in their parameters and, leveraging recent theoretical insights on inference in this setting, is also tractable when the structure of the model satisfy certain conditions.
Revised: We showed that MLE can be solved optimally for piecewise distributions that are log-linear in their parameters and, leveraging recent theoretical insights on inference in this setting, is also tractable when the structure of the model satisfy certain conditions.

Original: We extended the above results to HL-MRFs by presenting a novel reduction of marginal inference in HL-MRFs to WMI, thus identifying a subclass of models that admit tractable and exact marginal inference and MLE-based parameter learning.
Revised: We extended the above results to HL-MRFs by presenting a novel reduction of marginal inference in HL-MRFs to WMI, thus identifying a subclass of models that admit tractable and exact marginal inference and MLE-based parameter learning.

Original: For future work, we aim at developing and evaluating practical algorithms for HL-MRFs based on the presented reduction.
Revised: For future work, we aim at developing and evaluating practical algorithms for HL-MRFs based on the presented reduction.

Original: While we showed that log-linear weight functions admit optimal MLE, whether it is a necessary condition is still an open problem.
Revised: While we showed that log-linear weight functions admit optimal MLE, whether it is a necessary condition is still an open problem.

Original: In this work we focused on estimating the parameters in the weight function, but we plan to investigate the problem of estimating the coefﬁcients in the weighted literals, i.e. ﬁnding the optimal piecewise decomposition of the joint probability. 
Revised: In this work we focused on estimating the parameters in the weight function, but we plan to investigate the problem of estimating the coefﬁcients in the weighted literals, i.e. ﬁnding the optimal piecewise decomposition of the joint probability. Acknowledgements

Revised: This work is supported in part by NSF grants #CCF1837129, #IIS-1956441, #IIS-1943641, DARPA grant #N66001-17-2-4032, a Sloan Fellowship, and gifts from

Revised: Intel and Facebook Research.

Revised: ZZ is supported by a NEC

Revised: Student Research Fellowship.

Original: A PROOFS
Revised: A PROOFS

Original: Proof of Proposition 3.1 .
Revised: Proof of Proposition 3.1 .

Original: Denote the i -th parameter in weight function w (cid:96) (cid:48) as Θ (cid:96) (cid:48)
Revised: Denote the i -th parameter in weight function w (cid:96) (cid:48) as Θ (cid:96) (cid:48)

Original: i .
Revised: i .

Original: The ﬁrst-order derivative of the log-partition function log Z ( Θ ) with respect to a parameter
Revised: The ﬁrst-order derivative of the log-partition function log Z ( Θ ) with respect to a parameter

Original: [Equation]
Revised: [Equation]

Original: i can be computed as
Revised: i can be computed as

Original: [Equation]
Revised: [Equation]

Original: Notice that the last equation follows from the fact that
Revised: Notice that the last equation follows from the fact that

Original: [Equation]
Revised: [Equation]

Original: Given the WMI density of x in Equation 4, we have that
Revised: Given the WMI density of x in Equation 4, we have that

Original: [Equation]
Revised: [Equation]

Original: For brevity, denote ∂∂ Θ (cid:96)i log w (cid:96) ( x ) (cid:74) x | = (cid:96) (cid:75) by notation a (cid:96)i .
Revised: For brevity, denote ∂∂ Θ (cid:96)i log w (cid:96) ( x ) (cid:74) x | = (cid:96) (cid:75) by notation a (cid:96)i .

Original: Further, the second-order derivative of the log-partition function with respect to parameters Θ (cid:96)i and Θ (cid:96) (cid:48)
Revised: Further, the second-order derivative of the log-partition function with respect to parameters Θ (cid:96)i and Θ (cid:96) (cid:48)

Original: j is as follows.
Revised: j is as follows.

Original: [Equation]
Revised: [Equation]

Original: where the ﬁrst term can be rewritten as
Revised: where the ﬁrst term can be rewritten as

Original: [Equation]
Revised: [Equation]

Original: and the second term, given that the weight functions are log-linear in the parameters, can be rewritten as
Revised: and the second term [Equation] given that the weight functions are log-linear in the parameters, can be rewritten as

Original: [Equation]
Revised: [Equation]

Original: We can view a (cid:96)i as random variables distributed according to distribution deﬁned by parameters Θ .
Revised: We can view a (cid:96)i as random variables distributed according to distribution deﬁned by parameters Θ .

Original: Then the Hessian matrix of log Z ( Θ ) is the covariance matrix of random variables a (cid:96)i which is positive semideﬁnite.
Revised: Then the Hessian matrix of log Z ( Θ ) is the covariance matrix of random variables a (cid:96)i which is positive semideﬁnite.

Original: Therefore, the log-partition function log Z ( Θ ) is a convex function in Θ , which ﬁnishes our proof.
Revised: Therefore, the log-partition function log Z ( Θ ) is a convex function in Θ , which ﬁnishes our proof.