Robust Learning of Fixed-Structure Bayesian Networks
Yu Cheng, Ilias Diakonikolas, Daniel Kane, Alistair Stewart
Introduction
Probabilistic graphical models [KF09] provide an appealing and unifying formalism to succinctly represent structured high-dimensional distributions. The general problem of inference in graphical models is of fundamental importance and arises in many applications across several scientific disciplines, see [WJ08] and references therein. In this work, we study the problem of learning graphical models from data [Nea03, DSA11]. There are several variants of this general learning problem depending on: (i) the precise family of graphical models considered (e.g., directed, undirected), (ii) whether the data is fully or partially observable, and (iii) whether the structure of the underlying graph is known a priori or not (parameter estimation versus structure learning). This learning problem has been studied extensively along these axes during the past five decades, (see, e.g., [CL68, Das97, AKN06, WRL06, AHHK12, SW12, LW12, BMS13, BGS14, Bre15]) resulting in a beautiful theory and a collection of algorithms in various settings.
The main vulnerability of all these algorithmic techniques is that they crucially rely on the assumption that the samples are precisely generated by a graphical model in the given family. This simplifying assumption is inherent for known guarantees in the following sense: if there exists even a very small fraction of arbitrary outliers in the dataset, the performance of known algorithms can be totally compromised. It is important to explore the natural setting when the aforementioned assumption holds only in an approximate sense. Specifically, we study the following broad question:
Can we efficiently learn graphical models when a constant fraction of the samples are corrupted, or equivalently, when the model is slightly misspecified?
In this paper, we focus on the model of corruptions considered in [DKK+16] (Definition 1) which generalizes many other existing models, including Huber’s contamination model [Hub64]. Intuitively, given a set of good samples (from the true model), an adversary is allowed to inspect the samples before corrupting them, both by adding corrupted points and deleting good samples. In contrast, in Huber’s model, the adversary is oblivious to the samples and is only allowed to add bad points.
We would like to design robust learning algorithms for Question 1 whose sample complexity, , is close to the information-theoretic minimum, and whose computational complexity is polynomial in . We emphasize that the crucial requirement is that the error guarantee of the algorithm is independent of the dimensionality of the problem.
In this work, we study Question 1 in the context of Bayesian networks [JN07]. We focus on the fully observable case when the underlying network is given. In the non-robust setting, this learning problem is straightforward: the “empirical estimator” (which coincides with the maximum likelihood estimator) is known to be sample and computationally efficient [Das97]. In sharp contrast, even this most basic regime is surprisingly challenging in the robust setting. For example, the very special case of robustly learning a Bernoulli product distribution (corresponding to an empty network with no edges) was analyzed only recently in [DKK+16].
To formally state our results, we first give a detailed description of the corruption model we study.
Given and a distribution family , the algorithm specifies some number of samples , and samples are drawn from some (unknown) ground-truth . The adversary is allowed to inspect and the samples, and replaces of them with arbitrary points. The set of points is then given to the algorithm. We say that a set of samples is -corrupted if it is generated by this process.
Note that is determined by and . We will frequently index as a vector. We use the notation and the associated events , where each stands for an lexicographically ordered.
Our Results.
We give the first efficient robust learning algorithm for Bayesian networks with a known graph . Our algorithm has information-theoretically near-optimal sample complexity, runs in time polynomial in the size of the input (the samples), and provides an error guarantee that scales near-linearly with the fraction of adversarially corrupted samples, under the following restrictions: First, we assume that each parental configuration is reasonably likely. Intuitively, this assumption seems necessary because we need to observe each configuration many times in order to learn the associated conditional probability to good accuracy. Second, we assume that each of the conditional probabilities is balanced, i.e., bounded away from and . This assumption is needed for technical reasons. In particular, we need this to show that a good approximation to the conditional probability table implies that the corresponding Bayesian network is close in total variation distance.
Our algorithm is given in Section 3. We first note that the sample complexity of our algorithm is near-optimal for learning Bayesian networks with known structure. The following sample complexity lower bound holds even without corrupted samples:
Let denote the family of Bernoulli Bayesian networks on variables such that every node has at most parents. The worst-case sample complexity of learning , within total variation distance and with probability , is for all when the graph structure is known.
Consider Bayes nets whose average in-degree is close to the maximum in-degree, that is, when , the sample complexity lower bound in Fact 4 becomes , so our sample complexity is optimal up to polylogarithmic factors.
We remark that Theorem 3 is most useful when is a constant and the Bayesian network has bounded fan-in . In this case, the condition on follows from the -balanced assumption: When both and are constants, is also a constant, so the condition automatically hold when is smaller than some constant. On the other hand, the problem of learning Bayesian networks is less interesting when the fan-in is too large. For example, if some node has parents, then the size of the conditional probability table is at least , which is super-polynomial in the dimension .
Experiments.
We performed an experimental evaluation of our algorithm on both synthetic and real data. Our evaluation allowed us to verify the accuracy and the sample complexity rates of our theoretical results. In all cases, the experiments validate the usefulness of our algorithm, which significantly outperforms previous approaches, almost exactly matching the best rate without noise.
Related Work.
Question 1 fits in the framework of robust statistics [HR09, HRRS86]. Classical estimators from this field can be classified into two categories: either (i) they are computationally efficient but incur an error that scales polynomially with the dimension , or (ii) they are provably robust (in the aforementioned sense) but are hard to compute. In particular, essentially all known estimators in robust statistics (e.g., the Tukey median [Tuk75]) have been shown [JP78, Ber06, HM13] to be intractable in the high-dimensional setting. We note that the robustness requirement does not typically pose information-theoretic impediments for the learning problem. In most cases of interest (see, e.g., [CGR15, CGR16, DKK+16]), the sample complexity of robust learning is comparable to its (easier) non-robust variant. The challenge is to design computationally efficient algorithms.
Efficient robust estimators are known for various low-dimensional structured distributions (see, e.g., [DDS14, CDSS13, CDSS14a, CDSS14b, ADLS16, ADLS17, DLS18]). However, the robust learning problem becomes surprisingly challenging in high dimensions. Recently, there has been algorithmic progress on this front: [DKK+16, LRV16] give polynomial-time algorithms with improved error guarantees for certain “simple” high-dimensional structured distributions. The results of [DKK+16] apply to simple distributions, including Bernoulli product distributions, Gaussians, and mixtures thereof (under some natural restrictions). Since the works of [DKK+16, LRV16], computationally efficient robust estimation in high dimensions has received considerable attention (see, e.g., [DKS17, DKK+17, BDLS17, DKK+18a, DKS18b, DKS18a, HL18, KSS18, PSBR18, DKK+18b, KKM18, DKS18c, LSLC18]).
2 Overview of Algorithmic Techniques
Our algorithmic approach builds on the framework of [DKK+16] with new technical and conceptual ideas. At a high level, our algorithm works as follows: We draw an -corrupted set of samples from a Bayesian network with known structure, and then iteratively remove samples until we can return the empirical conditional probability table.
First, we associate a vector to each sample so that learning the mean of to good accuracy is sufficient to recover the distribution. In the case of binary products, is simply , while in our case we need to take into account additional information about conditional means.
From this point, our algorithm will try to do one of two things: Either we show that the sample mean of is close to the conditional mean of the true distribution (in which case we can already learn the ground-truth Bayes net ), or we are able to produce a filter, i.e., we can remove some of our samples, and it is guaranteed that we throw away more bad samples than good ones. If we produce a filter, we then iterate on those samples that pass the filter. To produce a filter, we compute a matrix which is roughly the empirical covariance matrix of . We show that if the corruptions are sufficient to notably disrupt the sample mean of , there must be many erroneous samples that are all far from the mean in roughly the same direction, and we can detect this direction by looking at the largest eigenvector of . If we project all samples onto this direction, concentration bounds of will imply that almost all samples far from the mean are erroneous, and thus filtering them out will provide a cleaner set of samples.
Section 2 contains some technical results specific to Bayesian networks that we need. Section 3 gives the details of our algorithm and an overview of its analysis. In Section 4, we present the experimental evaluations. In Section 5, we conclude and propose directions for future work.
Technical Preliminaries
The structure of this section is as follows: First, we bound the total variation distance between two Bayes nets in terms of their conditional probability tables. Second, we define a function , which takes a sample and returns an -dimensional vector that contains information about the conditional means. Finally, we derive a concentration bound from Azuma’s inequality. Proofs from this section have been deferred to Appendix A.
Lemma 5 says that to learn a balanced fixed-structure Bayesian network, it is sufficient to learn all the relevant conditional means. However, each sample gives us information about only if . To resolve this, we map each sample to an -dimensional vector , and “fill in” the entries that correspond to conditional means for which the condition failed to happen. We will set these coordinates to their empirical conditional means :
When (the true conditional means), the expectation of the -th coordinate of , for , is the same conditioned on either or . Using the conditional independence properties of Bayesian networks, we will show that the covariance of is diagonal.
Finally, we will need a suitable concentration inequality that works under conditional independence properties. We can use Azuma’s inequality to show that the projections of on any direction is concentrated around the projection of the sample mean .
Robust Learning Algorithm
We first look into the major ingredients required for our filtering algorithm, and compare our proof with that for product distributions in [DKK+16] on a more technical level.
In Section 2, we mapped each sample to which contains information about the conditional means , and we showed that it is sufficient to learn the mean of to learn the ground-truth Bayes net.
Let denote the empirical covariance matrix of . We decompose into three parts: One coming from the ground-truth distribution, one coming from the subtractive error (because the adversary can remove good samples), and one coming from the additive error (because the adversary can add bad samples). We will make use of the following observations:
The noise-free distribution has a diagonal covariance matrix.
The term coming from the subtractive error has no large eigenvalues.
These two observations imply that any large eigenvalues of are due to the additive error. Finally, we will reuse our concentration bounds to show that if the additive errors are frequently far from the mean in a known direction, then they can be reliably distinguished from good samples.
For the case of binary product distributions in [DKK+16], (1) is trivial because the coordinates are independent; but for Bayesian networks we need to expand the dimension of the samples and fill in the missing entries properly. Condition (2) is due to concentration bounds, and for product distributions it follows from standard Chernoff bounds, while for Bayes nets, we must instead rely on martingale arguments and Azuma’s inequality. The main difference between the proof of correctness of our algorithm and those given in [DKK+16] lies in analyzing the mean, covariance and tail bounds of , and showing that its mean and covariance are well-behaved when is close to (see Lemma 24 in Appendix B).
First, we need to show that a large enough set of samples with no noise satisfy properties we expect from a representative set of samples. We need that the mean, covariance, and tail bounds of behave like we would expect them to. This happens with high probability. The details are given in Lemma 24 in Appendix B.1. We call a set of samples that satisfies these properties -good for .
Our algorithm takes as input an -corrupted multiset of samples. We write , where is the set of samples before corruption, contains the good samples that have been removed or (in later iterations) incorrectly rejected by filters, and represents the remaining corrupted samples. We assume that is -good. In the beginning, we have . As we add filters in each iteration, gets smaller and gets larger. However, we will prove that our filter rejects more samples from than , so must get smaller.
We will prove Theorem 3 by iteratively running the following efficient filtering procedure:
Let . Let be a -balanced Bayesian network on with known structure . Assume each parental configuration of occurs with probability at least . Let be a set of samples such that is -good for and . There is an algorithm that, given , , and , runs in time , and either
Returns an such that and .
If this algorithm produces a subset , then we iterate using in place of . We will present the algorithm establishing Proposition 9 in the following section. We first use it to prove Theorem 3.
Next we analyze the running time. Observe that we can filter out at most samples, because we reject more bad samples than good ones. By Proposition 9, every time we produce a filter, we remove at least samples. Therefore, there are at most iterations, and each iteration takes time by Proposition 9, so the overall running time is . ∎
2 Algorithm Filter-Known-Topology
In this section, we present Algorithm 1 that establishes Proposition 9. We use to denote that the point is drawn uniformly from the set of samples .
At a high level, Algorithm 1 computes a matrix , and shows that: either is small, and we can output the empirical conditional probabilities, or is large, and we can use the top eigenvector of to remove bad samples.
Our first step is to analyze the spectrum of , and in particular show that is close in spectral norm to . To do this, we begin by showing that the spectral norm of is relatively small. Since is good, we have bounds on the second moments . We just need to deal with the error from replacing with (see Appendix B.2 for the proof):
.
Next, we wish to bound the contribution to coming from the subtractive error. We show that this is small due to concentration bounds on and hence on . The idea is that for any unit vector , we have tail bounds for the random variable and, since is a subset of , can at worst consist of a small fraction of the tail of this distribution.
.
Finally, combining the above results, since and have small contribution to the spectral norm of when is small, most of it must come from .
.
Lemma 12 follows using the identity and bounding the errors due to the diagonals of and .
The Case of Small Spectral Norm.
.
If , then
The Case of Large Spectral Norm.
Now we consider the case when . We begin by showing that and are not too far apart from each other. The bound given by Lemma 15 is now dominated by the term. Lower bounding the by gives the following claim.
.
Recall that is the largest eigenvector of . We project all the points onto the direction of . Next we show that most of the variance of comes from .
.
Claim 18 follows from the observation that is much smaller than . This is obtained by substituting the bound on (in terms of ) from Claim 17 into the bound on given by Lemma 12.
Claim 18 implies that the tails of are reasonably thick. In particular, we show that there must be a threshold satisfying the desired property in Step 9 of our algorithm.
If Lemma 19 were not true, by integrating this tail bound, we can show that would be small. Therefore, Step 11 of Algorithm 11 is guaranteed to find some valid threshold .
Finally, we show that the set of samples we return after the filter is better than in terms of . This completes the proof of the second case of Proposition 9.
If we write , then and .
Claim 9 follows from the fact that is -good, so we only remove at most samples from . Since we remove more than twice as many samples from , most of the samples we throw away are from . Moreover, we remove at least samples because we can show that the threshold is at most .
Running Time of Our Algorithm 1
Experiments
We test our algorithms using data generated from both synthetic and real-world networks (e.g., the ALARM network [BSCC89]) with synthetic noise. All experiments were run on a laptop with 2.6 GHz CPU and 8 GB of RAM. We found that our algorithm achieves the smallest error consistently in all trials, and that the error of our algorithm almost matches the error of the empirical conditional probabilities of the uncorrupted samples. Moreover, our algorithm can easily scale to thousands of dimensions with millions of samples. The bottleneck of our algorithm is fitting millions of samples of thousands dimension all in the memory.
We draw the parameters of independently from uniformly at random, i.e., in a setting where the “balancedness” assumption does not hold. Our experiments show that our filtering algorithm works very well in this setting, even when the assumptions under which we can prove theoretical guarantees are not satisfied. This complements our theoretical results and illustrates that our algorithm is not limited by these assumptions and can apply to more general settings in practice.
In Figure 1, we compare the performance of (1) our filtering algorithm, (2) the empirical conditional probability table with noise, and (3) a RANSAC-based algorithm (see the end of Section 4 for a detailed description). We use the error of the empirical conditional mean without noise (i.e., MLE estimator with only good samples) as the gold standard, since this is the best one could hope for even if all the corrupted samples are identified. We tried various graph structures for the Bayes net and noise distributions, and similar patterns arise for all of them. In the top figure, the dependency graph of is a randomly generated tree, and the noise distribution is a binary product distribution; In the bottom figure, the dependency graph of is a random graph, and the noise distribution is the tree Bayes net used as the ground truth in the first experiment. The reader is referred to Appendix C.1 for a full description of how we generate the dependency graphs and noise distributions.
2 Semi-Synthetic Experiments
In the semi-synthetic experiments, we apply our algorithm to robustly learn real-world Bayesian networks. The ALARM network [BSCC89] is a classic Bayes net that implements a medical diagnostic system for patient monitoring.
Our experimental setup is as follows: The underlying graph of ALARM has nodes and parameters. Since the variables in ALARM can have up to different values, we first transform it into an equivalent binary-valued Bayes net(see Appendix C.3 for more details). After the transformation, the network has nodes and parameters. We are interested in whether our filtering algorithm can learn a Bayes net that is “close” to ALARM when samples are corrupted; and how many corrupted samples can our algorithm tolerate. For , we draw samples, where a -fraction of the samples come from ALARM, and the other -fraction comes from a noise distribution.
In Figure 2, we compare the performance of (1) our filtering algorithm, (2) the empirical conditional means with noise, and (3) a RANSAC-based algorithm. We use the error of the empirical conditional means without noise as the gold standard. We tried various noise distributions and observed similar patterns. In Figure 2, the noise distribution is a Bayes net with random dependency graphs and conditional probabilities drawn from (same as the ground-truth Bayes net in Figure 1).
The experiments show that our filtering algorithm outperforms MLE and RANSAC, and that the error of our algorithm degrades gracefully as increases. It is worth noting that even the ALARM network does not satisfy our balancedness assumption on the parameters, our algorithm still performs well on it and recovers the conditional probability table of ALARM in the presence of corrupted samples.
RANSAC uses subsampling in the hope of getting an estimator that is not affected too much by the noise. The hope is that a small subsample might not contain any erroneous points. The approach proceeds by computing many such estimators and appropriately selecting the best one.
In our experiments, we let RANSAC select of the samples uniformly at random, and repeat this process times. After a subset of samples are selected, we compute the empirical conditional means and estimate the total variation distance between the corresponding Bayes net and the ground truth. Since we know the ground truth, we can make it easier for RANSAC by selecting the best hypothesis that it ever produced during its execution.
The main conceptual message of our experimental evaluation of RANSAC is that it does not perform well in high dimensions for the following reason: To guarantee that there are very few noisy points for such a subsample, we must take an exponential (in the dimension) number of subsets. We are not the first to observe that RANSAC does not work for robustly learning high-dimensional distributions. Previously, [DKK+17] showed that RANSAC does not work in practice for the problem of robustly learning a spherical Gaussian.
Conclusions and Future Directions
In this paper, we initiated the study of the efficient robust learning for graphical models. We described a computationally efficient algorithm for robustly learning Bayesian networks with a known topology, under some mild assumptions on the conditional probability table. We evaluate our algorithm experimentally, and we view our experiments as a proof of concept demonstration that our techniques can be practical for learning fixed-structure Bayesian networks. A challenging open problem is to generalize our results to the case when the underlying directed graph is unknown.
This work is part of a broader agenda of systematically investigating the robust learnability of high-dimensional structured probability distributions. There is a wealth of natural probabilistic models that merit investigation in the robust setting, including undirected graphical models (e.g., Ising models), and graphical models with hidden variables (i.e., incorporating latent structure).
We are grateful to Daniel Hsu for suggesting the model of Bayes nets, and for pointing us to [Das97]. Yu Cheng is supported in part by NSF CCF-1527084, CCF-1535972, CCF-1637397, CCF-1704656, IIS-1447554, and NSF CAREER Award CCF-1750140. Ilias Diakonikolas is supported by NSF CAREER Award CCF-1652862 and a Sloan Research Fellowship. Daniel Kane is supported by NSF CAREER Award CCF-1553288 and a Sloan Research Fellowship.
References
Appendix A Omitted Proofs from Section 2
In this section, we give proofs for the technical lemmas in Section 2. Lemma 5 bounds the total variation distance between two balanced Bayesian networks in terms of their conditional probability tables. Lemma 5 is a simple corollary of Lemma 21.
Let and be Bayesian networks with the same dependency graph . In terms of the conditional probability tables and of and , we have:
Let and be two distributions on . We have:
Fix . The events form a disjoint partition of . Dividing the sum above into this partition, we obtain
Let and be the distribution over the first coordinates of and respectively. Let and be the distribution of the -th coordinate of and respectively.
The first and the fifth steps use Equation 2, the second step uses that the -th coordinate is independent of the first coordinates conditioned on , and the third and fourth steps use Equation 1.
Now observe that the and are Bernoulli distributions with means and . For , we have:
Lemma 5 gives a simpler expression for total variation distance between two -balanced binary Bayesian networks whose minimum probability of any is at least .
We associate a vector to each sample , so that contains information about the conditional means, and learning the mean of to good accuracy is sufficient to recover the distribution. Recall that is the vector of empirical conditional means, and we define as follows (Definition 6): If , then , otherwise .
We will prove some properties of . First, we note that is invertible in the following sense.
Fix and . Given , we can compute for all with . We can recover from these as well.
By the definition of , to compute we need to know and whether . Note that whether or not depends only on , so is a function of .
We will show by induction that can be recovered from all with . Since has no parents, we have for the empty bitstring . For , we have that for the unique with , and we can decide which based on . ∎
Next, we show that when (the true conditional probabilities), although the coordinates of are not independent, the mean of a coordinate of remains unchanged even if we condition on the values of previous coordinates.
Let . Since we order the ’s lexicographically, includes for all with . By Claim 22, these determine the value of the parents of , i.e., whether or not occurs.
We build on Claim 23 to show that, although the coordinates of are not independent, the first and second moments are the same as that of a product distribution of the marginal of each coordinate.
Finally, we will need a suitable concentration inequality that works under conditional independence. Lemma 8 shows that the projections of on any direction is concentrated around its mean.
Consider an . If , then we have and so
If , then and , hence
An application of the Cauchy-Schwarz inequality gives that, if then . Therefore, the probability of the former holding for must be at most the probability that the latter holds for . ∎
Appendix B Omitted Proofs from Sections 3
This section analyzes Algorithm 1 and gives the proof of Proposition 9.
The basic idea of the analysis is as follows: If the empirical conditional probability table is close to the true conditional probability table of , then outputting is correct. We know that we have enough samples that the empirical conditional probability table with no noise is a good approximation to . Therefore, we will be in good shape so long as the corruption of our samples does not introduce a large error in the conditional probability table.
Thinking more concretely about this error, we may split it into two parts: , the subtractive error, and the additive error. Using concentration results for , it can be shown that the subtractive errors cannot cause significant problems for the conditional probability table. It remains to consider additive errors. The bad samples in can introduce notable errors in the conditional probability table, since any given sample can be far from the mean. If many of the corrupted samples line up in the same direction, this can lead to a notable discrepancy.
However, if many of these errors line up in some direction (which is necessary in order to have a large impact on the mean), the effects will be reflected in the first two moments. More concretely, if for some unit vector , the expectation of is very far from the expectation of , this will force the variance of to be large. This implies two things: First, it tells us that if is small for all (a condition equivalent to being small), we know that is a good approximation to the true conditional probability table. Second, if is large, we can find a unit vector where has large variance. A reasonable fraction of this variance must be coming from samples in that have very far from the mean. On the other hand, using concentration bounds for , we know that very few valid samples are this far from the mean. This discrepancy will allow us to create a filter which rejects more samples from than from .
In Section B.1, we will provide a set of deterministic conditions that we expect from the good samples and show that they happen with high probability. In Section B.2, we will prove some structural lemmas about the spectrum of . In Section B.3, we will show that if is small, then we can output the empirical conditional probabilities. In Section B.4, we will show that if is large, then we can use the top eigenvector of to remove bad samples.
Given a large enough set of good samples drawn from the ground-truth Bayesian network , Lemma 24 states that, for , the mean, covariance, and tail bounds of behave like we would expect them to. We call a set of samples that satisfies these properties -good for .
Let be a set of samples from . Let and denote the conditional probability tables of and of the empirical distribution given by respectively. Then, with probability at least , we have the following:
,
,
For all unit vectors and , we have
For (i), by the Chernoff and union bounds, with probability at least , we have that our empirical estimates for are correct to within as long as we have at least samples.
Note that for a fixed , we have is the empirical expectation of independent samples from a Bernoulli with probability . By Chernoff bounds, when , we have with probability at least , . By a union bound, this holds for all except with probability at most . Then we have .
For (iii) and (iv), we first prove this happens for a fixed and with sufficiently high probability and then take a union bound over a cover of and .
Let be a set of samples from . Let and . For any unit vector and , we have that
,
with probability at least .
By Lemma 8, we have . Hence,
is the sum of i.i.d. Bernoulli random variables, each with mean at most . We use the following two versions of the Chernoff bound:
Let be i.i.d. Bernoullis with mean . Then
for .
for , where is the KL-divergence between Bernoullis with probabilities and .
Here is a Bernoulli random variable where if and only if for the -th sample in we have . Let , , and . We want to prove that
happens with probability at most for any .
We have . Let be such that . For , we use bound (i), and for , we use bound (ii).
Since , by (i), with probability at most . When , , and so with probability at most .
When , we have and so . Thus, we have
Using bound (ii), we get that with probability at most .
In either case, we can take a union bound with the probability that the variance was far above and get that both requirements hold with probability at least . ∎
For (iii), we will use Claim 25 (ii) with . That is, when , for every , , we have
assuming (i) and (ii). This completes the proof of (v).
By a union bound, (i)-(v) all hold simultaneously with probability at least . ∎
B.2 Omitted Proofs from Section 3.2: Setup and Structural Lemmas
In this section, we prove some structural lemmas that we will need to prove Proposition 9.
First, we note that since the probabilities of the parental configurations are probabilities, the noise will not move them much. Abusing notation, we use for the empirical minimum parental configuration.
For all , and .
Proposition 9 requires that . We have
Since is -good, by Lemma 24 (i), . Since we assume that , . ∎
Our next step is to analyze the spectrum of , and in particular show that is close in spectral norm to . To do this, we begin by showing that the spectral norm of is relatively small. Since is good, we have bounds on the second moments . We just need to deal with the error from replacing with .
Lemma 10. .
Let denote the second-moment matrix of under .
First we will show that is close to , and then we will show that their diagonals are close which implies that is close to .
Now if , then and if , then and so . Either way, we have . This holds for all and so
Now we can bound the spectral norm of in terms of its Frobenius norm:
Combining this with the bound on above, we obtain
For the diagonal entries of and , we have
Finally, we can put all this together, obtaining
Lemma 11. .
Since , for any event , we have that . Note that for any , since is either or for any , thus . Since is -good for , by Lemma 24 (iii), we have
Also not that since . By definition, is the maximum over unit vectors of . For any unit vector , we have We write for
The last inequality uses and . ∎
Finally, combining the above results, since and have small contribution to the spectral norm of when is small, most of it must come from .
Lemma 12. .
Note that .
Note that each entry of any of these matrices has absolute value at most one since for all and . Thus we have
By the triangle inequality, Lemmas 10 and 11, and the assumption that ,
Using Lemma 27, we obtain that and . ∎
B.3 Omitted Proofs from Section 3.2: The Case of Small Spectral Norm
In this section, we will prove that if , then we can output the empirical conditional means .
Since both terms are positive semidefinite, we have
Applying this with and for (or ) completes the proof. ∎
When does not occur, . Thus, we can write:
By Lemma 27, , so we have , i.e., , and thus . ∎
Lemma 15. .
Note that . By Lemma 14, . Recall that and . By the triangle inequality,
where we used the assumption that is at least a sufficiently large constant and that . When this last term is smaller than , rearranging the inequality gives that
Otherwise, we have , and so . In either case, we obtain
Corollary 16 (Part (i) of Proposition 9). If , then
Recall that . By Lemma 27, for any . Since is -good, . Combining these, we obtain . By assumption , so we have .
B.4 Omitted Proofs from Section 3.2: The Case of Large Spectral Norm
Now we consider the case when for some sufficiently large constant . We begin by showing that and are not too far apart from each other. The bound given by Lemma 15 is now dominated by the term. Lower bounding the by gives the following claim.
Claim 17. .
For sufficiently large , this last term is smaller than . Then we have . Recall that , so
Recall that is the largest eigenvector of . We project all the points onto the direction of . Next we show that most of the variance of comes from .
Claim 18. .
By assumption for sufficiently large , so we can assume . For large enough , , and hence the third term . Again for large enough , the first term is upper bounded by . Thus, we obtain as required. ∎
Claim 18 implies that the tails of are reasonably thick. In particular, the next lemma shows that is guaranteed to find some valid threshold satisfying the desired property in Step 11 of Algorithm 1, otherwise by integrating the tail bound, we can show that would be small.
Lemma 19. There exists a such that
Suppose for the sake of contradiction that this does not hold. Since , for all events , it holds that . Thus, we have
Note that for any , we have that
since and differ on at most coordinates. We have the following sequence of inequalities:
For sufficiently large and , this gives the desired contradiction. ∎
Finally, we show that the set of samples we return after the filter is better than in terms of . This completes the proof of the second case of Proposition 9.
Claim 20. (Part (ii) of Proposition 9). If we write , then and .
Note that is -sparse and has , so we have . By Lemma 19, when for some sufficiently large constant , Step 11 of Algorithm 1 is guaranteed to find a threshold such that
In particular, we can show that the number of remaining samples reduces by a factor of :
Since is -good, by Lemma 24 (iii),
Using Claim 17, we have that for all , . Therefore,
Since all the filtered samples are in , we have
Thus . Since ,
Because , we conclude that . ∎
Appendix C Omitted Details from Section 4
In this section, we give a detailed description of the graph structures and noise distributions we used in our experimental evaluation.
In our experiments, when there is randomness in the dependency graphs of the ground-truth or in the noisy Bayesian networks, we repeat the experiment ten times and report the average error.
In the first experiment, the ground-truth Bayesian network is generated as follows: We first generate a random dependence tree for . We label the nodes . Node has no parents, and every node has one parent drawn uniformly from . The size of the conditional probability table of is (one parameter for the first node and two parameters for all other nodes). We then draw these conditional probabilities independently and uniformly from .
The noise distribution is a binary product distribution with mean drawn independently and uniformly from $$ for each coordinate.
Synthetic Experiments with General Bayesian Networks.
In the second experiment, we generate the ground-truth network as follows: We start with an empty dependency graph with nodes. We label the nodes and require that parent nodes must have smaller index. We continue to try to increase the in-degree of a random node until the number of parameters exceeds the target . Then for each , we draw the nodes uniformly from the set to be the parents of variable .
The noise distribution is a tree-structured Bayes net generated in the same way as we generate the ground-truth network in the first experiment. The conditional probabilities of both and the noise distribution are drawn independently and uniformly from .
Semi-Synthetic Experiments with ALARM.
In the third experiment, the ground-truth network is a binary-valued Bayes net which is equivalent to the ALARM network. See Section C.3 for a detailed description of the conversion process. Specifically, it has nodes and parameters.
The noise distribution is a Bayes net generated using the same process as we create the ground-truth Bayes net in the second experiment. We start with an empty graph with nodes and add edges until the number of parameters is roughly . The conditional probabilities of the noise distribution are again drawn from .
C.2 Estimating the Total Variation Distances between Two Bayesian Networks
C.3 Reduction to Binary-Valued Bayesian Networks
The results in this paper can be easily extended to multi-valued Bayesian networks. We can represent a -dimensional degree- Bayesian network over alphabet by an equivalent binary (i.e., alphabet of size ) Bayesian network of dimension and degree . Such a reduction can be found in [CDKS17] and we give a high-level description here. Without loss of generality we can assume . We will split each variable into bits, with each of the possibilities denoting a single letter in . Each new bit will potentially depend on other bits of the same variable, as well as bits of the parent variables. This operation preserves balancedness when , and if is not a power of we need to first carefully pad the alphabet by splitting some letters in into two letters.
Our experiments for the ALARM network use this reduction. ALARM has an alphabet of size . The original dependency graph of ALARM has nodes, maximum in-degree , and parameters; and after the transformation, we get a binary-valued the network with nodes, maximum in-degree , and parameters.