Overview of our algorithm. (A) A typical setting in mediation analysis. (B) The setup of the new method. Yellow nodes form mediator networks.