SMS: Tractable uncertainty for structure learning