# Hard and Soft EM in Bayesian Network Learning from Incomplete Data
## 5 Discussion and Conclusions  
BN parameter learning from incomplete data is typically performed using the EM algorithm. Likewise, structure learning with the Structural EM algorithm embeds the search for the optimal network structure within EM. Practical applications of BN learning often choose to implement learning using the hard EM approach (which is based on single imputation) instead of the soft EM approach (which is based on belief propagation) for computational reasons despite the known limitations of the former. To the best of the authors' knowledge, no previous work has systematically compared hard EM to soft EM when applied to BN learning, despite their popularity in several application fields. Hence, we investigated the following question: what is the impact of using hard EM instead of soft EM on the quality of the BNs learned from incomplete data? In addition, we also considered an early-stopping variant of soft EM, which we called _soft-forced EM_. However, we find that it does not outperform hard EM or soft EM in any simulation scenario.  
Based on a comprehensive simulation study, we find that in the case of parameter learning:  
* Hard EM performs well across BNs of different sizes when the missing pattern is fair; that is, missing data occur independently on the structure of the BN.
* Soft EM should be preferred to hard EM, across BNs of different sizes, when the missing pattern is not fair; that is, missing data occur at nodes of the BN with specific graphical characteristics (root, leaf, high-degree nodes); and when the missingness distribution of nodes is balanced.
* Hard and soft EM perform similarly for medium-size BNs when missing data are unbalanced.  
In the case of structure learning, which we explore by investigating a set of candidate networks with high posterior probability, we find that:  
* Hard EM achieves the lowest value of \(\Delta\) KLD in most simulation scenarios, reliably outperforming other EM algorithms.
* In terms of robustness, we find no marked difference between soft EM and hard EM for small to medium BNs. On the other hand, hard EM consistently outperforms soft EM for large BNs. In fact, for large BNs hard EM achieves the lowest value of \(\Delta\) KLD in all simulations, and it never achieves the highest value of \(\Delta\) KLD.
* Sometimes all EM algorithms fail to converge and to provide good parameter estimates for the network structure of the true BN, but not for the corresponding perturbed networks.  
However, it is important to note that this study presents two limitations. Firstly, a wider variety of numerical experiments should be performed to further validate conclusions. The complexity of capturing the key characteristics of both BNs and missing data mechanisms make it extremely difficult to provide comprehensive answers while limiting ourselves to a feasible set of experimental factors. Secondly, we limited the scope of this paper to discrete BN: but Gaussian BNs have seen wide applications in life sciences applications, and it would worthwhile to investigate to what extent our conclusions apply to them. Nevertheless, we believe the recommendations we have collected in Section 4 and discussed here can be of use to practitioners using BNs with incomplete data.  
**Author Contributions:** Investigation, A.R., F.S. ([PERSON]) and M.S.; Methodology, M.S.; Supervision, F.S. ([PERSON]); Writing--original draft, A.R. and F.S. ([PERSON]); Writing--review & editing, F.S. ([PERSON]) and M.S. All authors have read and agreed to the published version of the manuscript.  
**Funding:** This research received no external funding.  
**Conflicts of Interest:** The authors declare no conflict of interest.