Forward approximation as a mean-field approximation for the Anderson and many-body localization transitions | Synapse