  Results obtained with stochastic methods have an inherent uncertainty due to
the finite number of samples that can be achieved in practice. In lattice QCD
this problem is particularly salient in some observables like, for instance,
observables involving one or more baryons and it is the main problem preventing
the calculation of nuclear forces from first principles. The method of control
variables has been used extensively in statistics and it amounts to computing
the expectation value of the difference between the observable of interest and
another observable whose average is known to be zero but is correlated with the
observable of interest. Recently, control variates methods emerged as a
promising solution in the context of lattice field theories. In our current
study, instead of relying on an educated guess to determine the control
variate, we utilize a neural network to parametrize this function. Using 1+1
dimensional scalar field theory as a testbed, we demonstrate that this neural
network approach yields substantial improvements. Notably, our findings
indicate that the neural network ansatz is particularly effective in the strong
coupling regime.
