Searcharxiv⌕ Search

arXiv subjects

Víctor Elvira

Publications and source records attributed to Víctor Elvira.

At least 19 recordsLinked to original sources

PyDPF: A Python Package for Differentiable Particle Filtering

State-space models (SSMs) are a widely used tool in time series analysis. In the complex systems that arise from real-world data, it is common to employ particle filtering (PF), an efficient Monte Carlo method for estimating the hidden state corresponding to a sequence of observations. Applying particle filtering requires specifying both the parametric form and the parameters of the system, which are often unknown and must be estimated. Gradient-based optimisation techniques cannot be applied directly to standard particle filters, as the filters themselves are not differentiable. However, several recently proposed methods modify the resampling step to make particle filtering differentiable. In this paper, we present an implementation of several such differentiable particle filters (DPFs) with a unified API built on the popular PyTorch framework. Our implementation makes these algorithms easily accessible to a broader research community and facilitates straightforward comparison between them. We validate our framework by reproducing experiments from several existing studies and demonstrate how DPFs can be applied to address several common challenges with state space modelling.

eess.SP↗

Multi-Marginal Flow Matching with Adversarially Learnt Interpolants

Learning the dynamics of a process given sampled observations at several time points is an important but difficult task in many scientific applications. When no ground-truth trajectories are available, but one has only snapshots of data taken at discrete time steps, the problem of modelling the dynamics, and thus inferring the underlying trajectories, can be solved by multi-marginal generalisations of flow matching algorithms. This paper proposes a novel flow matching method that overcomes the limitations of existing multi-marginal trajectory inference algorithms. Our proposed method, ALI-CFM, uses a GAN-inspired adversarial loss to fit neurally parametrised interpolant curves between source and target points such that the marginal distributions at intermediate time points are close to the observed distributions. The resulting interpolants are smooth trajectories that, as we show, are unique under mild assumptions. These interpolants are subsequently marginalised by a flow matching algorithm, yielding a trained vector field for the underlying dynamics. We showcase the versatility and scalability of our method by outperforming the existing baselines on spatial transcriptomics and cell tracking datasets, while performing on par with them on single-cell trajectory prediction. Code: https://github.com/mmacosha/adversarially-learned-interpolants.

cs.LG↗

Reinforced sequential Monte Carlo for amortised sampling

This paper proposes a synergy of amortised and particle-based methods for sampling from distributions defined by unnormalised density functions. We state a connection between sequential Monte Carlo (SMC) and neural sequential samplers trained by maximum-entropy reinforcement learning (MaxEnt RL), wherein learnt sampling policies and value functions define proposal kernels and twist functions. Exploiting this connection, we introduce an off-policy RL training procedure for the sampler that uses samples from SMC -- using the learnt sampler as a proposal -- as a behaviour policy that better explores the target distribution. We describe techniques for stable joint training of proposals and twist functions and an adaptive weight tempering scheme to reduce training signal variance. Furthermore, building upon past attempts to use experience replay to guide the training of neural samplers, we derive a way to combine historical samples with annealed importance sampling weights within a replay buffer. On synthetic multi-modal targets (in both continuous and discrete spaces) and the Boltzmann distribution of alanine dipeptide conformations, we demonstrate improvements in approximating the true distribution as well as training stability compared to both amortised and Monte Carlo methods.

cs.LG↗

Discrete diffusion samplers and bridges: Off-policy algorithms and applications in latent spaces

Sampling from a distribution $p(x) \propto e^{-\mathcal{E}(x)}$ known up to a normalising constant is an important and challenging problem in statistics. Recent years have seen the rise of a new family of amortised sampling algorithms, commonly referred to as diffusion samplers, that enable fast and efficient sampling from an unnormalised density. Such algorithms have been widely studied for continuous-space sampling tasks; however, their application to problems in discrete space remains largely unexplored. Although some progress has been made in this area, discrete diffusion samplers do not take full advantage of ideas commonly used for continuous-space sampling. In this paper, we propose to bridge this gap by introducing off-policy training techniques for discrete diffusion samplers. We show that these techniques improve the performance of discrete samplers on both established and new synthetic benchmarks. Next, we generalise discrete diffusion samplers to the task of bridging between two arbitrary distributions, introducing data-to-energy Schrödinger bridge training for the discrete domain for the first time. Lastly, we showcase the application of the proposed diffusion samplers to data-free posterior sampling in the discrete latent spaces of image generative models.

cs.LG↗

Importance sampling for Bayesian inference: polynomial-dimension dependent error bounds

Many Bayesian inference problems involve high-dimensional models where the performance of standard importance sampling (IS) methods often degrades rapidly as the dimensionality increases. Classical analyses of IS typically rely on the assumption that observations are arbitrary but fixed (i.e., deterministic), thereby neglecting the probabilistic structure that the Bayesian model induces on the data. In this paper, we adopt the perspective that observations are themselves random variables whose distribution is governed by the underlying model. Within this probabilistic framework, we identify a model-dependent function, referred to as the link function, which connects the fixed- and random-observation formulations. We provide a characterization of the $L^2$ Monte Carlo estimation error: specifically, we show that the $L^2$ error bounds are finite and converge at the standard Monte Carlo rate $O(N^{-1/2})$, for arbitrarily large dimension, if and only if the link function is Bochner integrable. This result reveals the fundamental quantity controlling the approximation error and establishes a mechanism to manage the dependence on the model state dimension. Consequently, our approach provides a principled way to alleviate the challenges of high dimensionality, offering insights that transcend worst-case analyses dominant in the existing literature. Finally, we derive explicit analytical examples of the dimensional scaling of the associated errors for several model classes, including linear-Gaussian systems and models with bounded observation functions.

math.ST↗

A Gaussian Sum Filter for Unifying Gaussian and Particle Filters

State-space models (SSMs) are a broad class of probabilistic models for dynamical systems with many applications in engineering and science. Bayesian filtering is analytically tractable only in the linear-Gaussian setting, where the Kalman filter yields exact posterior distributions. For nonlinear or non-Gaussian SSMs, approximations are required. Two prominent families of approximate methods are Gaussian sum filters (GSFs), which rely on local Gaussian approximations and numerical integration schemes, and particle filters (PFs), which use sequential Monte Carlo sampling. Despite their success, GSFs can suffer from numerical instabilities and severe failures in strongly nonlinear regimes, while PFs are flexible and robust but often demand substantial computational resources to achieve accurate estimates. In this work, we propose the Augmented Gaussian Sum Filter (AGSF), a novel filtering framework that unifies GSFs and PFs through an augmented Gaussian approximation parameterized by latent variables and tunable covariance parameters. By adjusting these covariances, the AGSF interpolates continuously between GSF-like and PF-like behavior, recovering both as special cases. Building on this view, we develop an adaptive AGSF that automatically shifts its behavior according to the local nature of the nonlinearities, acting more like a GSF when Gaussian approximations are reliable and more like a PF when they are not. In a target-tracking application, we demonstrate that AGSF is efficient and robust to common failure modes of both GSFs and PFs. We empirically validate the switching behavior of the adaptive mechanism in a toy example.

stat.CO↗

Truncated Neural Likelihood Estimation for Simulation-Based Inference in State-Space Models

State-space models (SSMs) are powerful probabilistic tools for modeling time-varying systems with latent dynamics. Inference in SSMs involves the estimation of latent states and parameters. In this work, we focus on parameter inference, which for SSMs is in general a very challenging problem due to the intractability of the likelihood. Recently, neural estimation methods, such as sequential neural likelihood (SNL), have shown promising results in Bayesian inference problems. In this paper, we show that SNL, when applied to the SSM setting, suffers important limitations, such as requiring a large amount of simulated samples to achieve a moderate performance, scaling poorly with sequence length, while not being amortized. We then introduce a novel inference algorithm called truncated-SNL (T-SNL), which addresses the limitations of SNL. Our algorithm is more accurate, more stable and robust during training, more scalable to longer temporal sequences, and can be amortized when new observations become available. Our experiments show that T-SNL is sample-efficient, robust, and flexible algorithm which outperforms other approaches.

stat.CO↗

How to Approximate Inference with Subtractive Mixture Models

Classical mixture models (MMs) are widely used tractable proposals for approximate inference settings such as variational inference (VI) and importance sampling (IS). Recently, mixture models with negative coefficients, called subtractive mixture models (SMMs), have been proposed as a potentially more expressive alternative. However, how to effectively use SMMs for VI and IS is still an open question as they do not provide latent variable semantics and therefore cannot use sampling schemes for classical MMs. In this work, we study how to circumvent this issue by designing several expectation estimators for IS and learning schemes for VI with SMMs, and we empirically evaluate them for distribution approximation. Finally, we discuss the additional challenges in estimation stability and learning efficiency that they carry and propose ways to overcome them. Code is available at: https://github.com/april-tools/delta-vi.

cs.LG↗

Signature-Kernel Based Evaluation Metrics for Robust Probabilistic and Tail-Event Forecasting

Probabilistic forecasting is increasingly critical across high-stakes domains, from finance and epidemiology to climate science. However, current evaluation frameworks lack a consensus metric and suffer from two critical flaws: they often assume independence across time steps or variables, and they demonstrably lack sensitivity to tail events, the very occurrences that are most pivotal in real-world decision-making. To address these limitations, we propose two kernel-based metrics: the signature maximum mean discrepancy (Sig-MMD) and our novel censored Sig-MMD (CSig-MMD). By leveraging the signature kernel, these metrics capture complex inter-variate and inter-temporal dependencies and remain robust to missing data. Furthermore, CSig-MMD introduces a censoring scheme that prioritizes a forecaster's capability to predict tail events while strictly maintaining properness, a vital property for a good scoring rule. These metrics enable a more reliable evaluation of direct multi-step forecasting, facilitating the development of more robust probabilistic algorithms.

cs.LG↗

Nested importance sampling for Bayesian inference: error bounds and the role of dimension

Many Bayesian inference problems involve high dimensional models for which only a subset of the model variables are of actual interest. All other variables are just nuisance parameters that one would ideally like to integrate out analytically. Unfortunately, such integration is often impossible. There are several computational methods that have been proposed over the past 15 years that replace intractable analytical marginalization by numerical integration, typically using different flavours of importance sampling (IS). Such methods include particle Markov chain Monte Carlo, sequential Monte Carlo squared (SMC$^2$), IS$^2$, nested particle filters, and others. In this paper, we investigate the role of the dimension of the nuisance variables in the error bounds achieved by nested IS methods in Bayesian inference. We prove that, under suitable regularity assumptions on the model, the approximation errors increase at a polynomial (rather than exponential) rate w.r.t. the dimension of the nuisance variables. Our analysis relies on tools from functional analysis and measure theory, and it includes the case of polynomials of degree zero, where the approximation error remains uniformly bounded, even as the dimension of the nuisance variables grows without bound. We also show how the general analysis can be applied to specific classes of models, including linear and Gaussian settings, models with bounded observation functions, and others. These findings improve the current understanding of how the performance of IS techniques scales with dimension in Bayesian inference problems.

stat.CO↗

Towards Adaptive Self-Normalized Importance Samplers

The self-normalized importance sampling (SNIS) estimator is a Monte Carlo estimator widely used to approximate expectations in statistical signal processing and machine learning. The efficiency of SNIS depends on the choice of proposal, but selecting a good proposal is typically unfeasible. In particular, most of the existing adaptive IS (AIS) literature overlooks the optimal SNIS proposal. In this paper, we introduce an AIS framework that uses MCMC to approximate the optimal SNIS proposal within an iterative scheme. This is, to the best of our knowledge, the first AIS framework targeting specifically the SNIS optimal proposal. We find a close connection with adaptive schemes used in ratio importance sampling (RIS), which also brings a new perspective and paves the way for combining techniques from AIS and adaptive RIS. We outline possible extensions, connections with existing MCMC-driven AIS algorithms, theoretical directions, and demonstrate performance in numerical examples.

stat.CO↗

Particle Hamiltonian Monte Carlo

In Bayesian inference, Hamiltonian Monte Carlo (HMC) is a popular Markov Chain Monte Carlo (MCMC) algorithm known for its efficiency in sampling from complex probability distributions. However, its application to models with latent variables, such as state-space models, poses significant challenges. These challenges arise from the need to compute gradients of the log-posterior of the latent variables, and the likelihood may be intractable due to the complexity of the underlying model. In this paper, we propose Particle Hamiltonian Monte Carlo (PHMC), an algorithm specifically designed for state-space models. PHMC leverages Sequential Monte Carlo (SMC) methods to estimate the marginal likelihood, infer latent variables (as in particle Metropolis-Hastings), and compute gradients of the log-posterior of model parameters. Importantly, PHMC avoids the need to calculate gradients of the log-posterior for latent variables, which addresses a major limitation of traditional HMC approaches. We assess the performance of Particle HMC on both simulated datasets and a real-world dataset involving crowdsourced cycling activities data. The results demonstrate that Particle HMC outperforms particle marginal Metropolis-Hastings with a Gaussian random walk, particularly in scenarios involving a large number of parameters.

stat.CO↗

Scalable Expectation Estimation with Subtractive Mixture Models

Many Monte Carlo (MC) and importance sampling (IS) methods use mixture models (MMs) for their simplicity and ability to capture multimodal distributions. Recently, subtractive mixture models (SMMs), i.e. MMs with negative coefficients, have shown greater expressiveness and success in generative modeling. However, their negative parameters complicate sampling, requiring costly auto-regressive techniques or accept-reject algorithms that do not scale in high dimensions. In this work, we use the difference representation of SMMs to construct an unbiased IS estimator ($Δ\text{Ex}$) that removes the need to sample from the SMM, enabling high-dimensional expectation estimation with SMMs. In our experiments, we show that $Δ\text{Ex}$ can achieve comparable estimation quality to auto-regressive sampling while being considerably faster in MC estimation. Moreover, we conduct initial experiments with $Δ\text{Ex}$ using hand-crafted proposals, gaining first insights into how to construct safe proposals for $Δ\text{Ex}$.

cs.LG↗

A Proximal Newton Adaptive Importance Sampler

Adaptive importance sampling (AIS) algorithms are a rising methodology in signal processing, statistics, and machine learning. An effective adaptation of the proposals is key for the success of AIS. Recent works have shown that gradient information about the involved target density can greatly boost performance, but its applicability is restricted to differentiable targets. In this paper, we propose a proximal Newton adaptive importance sampler for the estimation of expectations with respect to non-smooth target distributions. We implement a scaled Newton proximal gradient method to adapt the proposal distributions, enabling efficient and optimized moves even when the target distribution lacks differentiability. We show the good performance of the algorithm in two scenarios: one with convex constraints and another with non-smooth sparse priors.

stat.CO↗

Grid Particle Gibbs with Ancestor Sampling for State-Space Models

We consider the challenge of estimating the model parameters and latent states of general state-space models within a Bayesian framework. We extend the commonly applied particle Gibbs framework by proposing an efficient particle generation scheme for the latent states. The approach efficiently samples particles using an approximate hidden Markov model (HMM) representation of the general state-space model via a deterministic grid on the state space. We refer to the approach as the grid particle Gibbs with ancestor sampling algorithm. We discuss several computational and practical aspects of the algorithm in detail and highlight further computational adjustments that improve the efficiency of the algorithm. The efficiency of the approach is investigated via challenging regime-switching models, including a post-COVID tourism demand model, and we demonstrate substantial computational gains compared to previous particle Gibbs with ancestor sampling methods.

stat.CO↗

Hybrid Population Monte Carlo

Importance sampling (IS) is a powerful Monte Carlo (MC) technique for approximating intractable integrals, for instance in Bayesian inference. The performance of IS relies heavily on the appropriate choice of the so-called proposal distribution. Adaptive IS (AIS) methods iteratively improve target estimates by adapting the proposal distribution. Recent AIS research focuses on enhancing proposal adaptation for high-dimensional problems, while addressing the challenge of multi-modal targets. In this paper, a new class of AIS methods is presented, utilizing a hybrid approach that incorporates weighted samples and proposal distributions to enhance performance. This approach belongs to the family of population Monte Carlo (PMC) algorithms, where a population of proposals is adapted to better approximate the target distribution. The proposed hybrid population Monte Carlo (HPMC) implements a novel two-step adaptation mechanism. In the first step, a hybrid method is used to generate the population of the preliminary proposal locations based on both weighted samples and location parameters. We use Hamiltonian Monte Carlo (HMC) to generate the preliminary proposal locations. HMC has a good exploratory behavior, especially in high dimension scenarios. In the second step, the novel cooperation algorithms are performing to find the final proposals for the next iteration. HPMC achieves a significant performance improvement in high-dimensional problems when compared to the state-of-the-art algorithms. We discuss the statistical properties of HPMC and show its high performance in two challenging benchmarks.

stat.CO↗

Differentiable Interacting Multiple Model Particle Filtering

We propose a sequential Monte Carlo algorithm for parameter learning when the studied model exhibits random discontinuous jumps in behaviour. To facilitate the learning of high dimensional parameter sets, such as those associated to neural networks, we adopt the emerging framework of differentiable particle filtering, wherein parameters are trained by gradient descent. We design a new differentiable interacting multiple model particle filter to be capable of learning the individual behavioural regimes and the model which controls the jumping simultaneously. In contrast to previous approaches, our algorithm allows control of the computational effort assigned per regime whilst using the probability of being in a given regime to guide sampling. Furthermore, we develop a new gradient estimator that has a lower variance than established approaches and remains fast to compute, for which we prove consistency. We establish new theoretical results of the presented algorithms and demonstrate superior numerical performance compared to the previous state-of-the-art algorithms.

stat.ML↗

Regularized Rényi divergence minimization through Bregman proximal gradient algorithms

We study the variational inference problem of minimizing a regularized Rényi divergence over an exponential family. We propose to solve this problem with a Bregman proximal gradient algorithm. We propose a sampling-based algorithm to cover the black-box setting, corresponding to a stochastic Bregman proximal gradient algorithm with biased gradient estimator. We show that the resulting algorithms can be seen as relaxed moment-matching algorithms with an additional proximal step. Using Bregman updates instead of Euclidean ones allows us to exploit the geometry of our approximate model. We prove strong convergence guarantees for both our deterministic and stochastic algorithms using this viewpoint, including monotonic decrease of the objective, convergence to a stationary point or to the minimizer, and geometric convergence rates. These new theoretical insights lead to a versatile, robust, and competitive method, as illustrated by numerical experiments.

math.ST↗