Ensemble framework for causality learning with heterogeneous Directed Acyclic Graphs through the lens of optimization