Fast structure learning with modular regularization