  Traditional regression and prediction tasks often only provide deterministic
point estimates. To estimate the uncertainty or distribution information of the
response variable, methods such as Bayesian inference, model ensembling, or MC
Dropout are typically used. These methods either assume that the posterior
distribution of samples follows a Gaussian process or require thousands of
forward passes for sample generation. We propose a novel approach called
DistPred for regression and forecasting tasks, which overcomes the limitations
of existing methods while remaining simple and powerful. Specifically, we
transform proper scoring rules that measure the discrepancy between the
predicted distribution and the target distribution into a differentiable
discrete form and use it as a loss function to train the model end-to-end. This
allows the model to sample numerous samples in a single forward pass to
estimate the potential distribution of the response variable. We have compared
our method with several existing approaches on multiple datasets and achieved
state-of-the-art performance. Additionally, our method significantly improves
computational efficiency. For example, compared to state-of-the-art models,
DistPred has a 90x faster inference speed. Experimental results can be
reproduced through https://github.com/Anoise/DistPred.
