Malliavin Calculus with Weak Derivatives for Counterfactual Stochastic Optimization | Synapse