Neural triangular map for density estimation and sampling with application to Bayesian inference - Wu, Dawen; Chamoin, Ludovic; Bressan, Stéphane (Journal of computational physics, 2025)
•The neural triangular map (NTM) is proposed for density estimation and sampling.•NTM uses independent neural networks for multidimensional transformations.•We define a constrained optimization problem as the objective of the NTM.•We develop a specific algorithm to train the NTM.•Experiments demonstrate NTM’s superior performance in various scenarios. In this paper, we address two fundamental problems in computational probability: density estimation and sampling. Specifically, we consider the problem setup where an unnormalized target distribution is known, and the goal is to find a deterministic coupling that transports a specified reference distribution to the target distribution. To achieve this, we introduce the Neural Triangular Map (NTM), which utilizes a triangular function structure with neural networks as the underlying basis functions. The NTM is trained by minimizing the Kullback–Leibler divergence between the density induced by the map and the target density, subject to a constraint ensuring the map’s invertibility; both the objective and constraint functions are defined using the unnormalized target probability density. The NTM combines the computational convenience of the triangular function structure for computing the Jacobian determinant with the powerful approximation capabilities of neural networks. In addition, we integrate the proposed method into the Bayesian inference framework to infer the posterior distribution of model parameters based on noisy observations. Our experiments demonstrate that the NTM outperforms the polynomial-based triangular map and the Markov Chain Monte Carlo method in estimating certain density functions.