Replace the directed graph with an undirected model that incorporates moralization. This will allow the model to capture complex loops and cycles that cannot be represented by a directed graph. However, be aware of potential drawbacks such as increased computational complexity and reduced interpretability.