Small angle scattering techniques have now been routinely used to quantitatively determine the potential of mean force in colloidal suspensions. However the numerical accuracy of data interpretation is often compounded by the approximations adopted by liquid state analytical theories. To circumvent this long standing issue, here we outline a machine learning strategy for determining the effective interaction in the condensed phases of matter using scattering. Via a case study of colloidal suspensions, we show that the effective potential can be probabilistically inferred from the scattering spectra without any restriction imposed by model assumptions. Comparisons to existing parametric approaches demonstrate the superior performance of this method in accuracy, efficiency, and applicability. This method can effectively enable quantification of interaction in highly correlated systems using scattering and diffraction experiments.