Skip to main content
Springer logoLink to Springer
. 2025 Dec 5;29(2):347–386. doi: 10.1007/s10687-025-00521-8

Neural Bayes estimation and selection of complex bivariate extremal dependence models

L M André 1,✉, J L Wadsworth 2, R Huser 3
PMCID: PMC13263241  PMID: 42293256

Abstract

Likelihood-free approaches are appealing for performing inference on complex dependence models, either because it is not possible to formulate a likelihood function, or its evaluation is very computationally costly. This is the case for several models available in the multivariate extremes literature, particularly for the most flexible tail models, including those that interpolate between the two key dependence classes of ‘asymptotic dependence’ and ‘asymptotic independence’. We focus on approaches that leverage neural networks to approximate Bayes estimators. In particular, we explore the properties of neural Bayes estimators for parameter inference for several flexible but computationally expensive models to fit, with a view to aiding their routine implementation. Owing to the absence of likelihood evaluation in the inference procedure, classical information criteria such as the Bayesian information criterion cannot be used to select the most appropriate model. Instead, we propose using neural networks as neural Bayes classifiers for model selection. Our goal is to provide a toolbox for simple, fast fitting and comparison of complex extreme-value dependence models, where the best model is selected for a given data set and its parameters subsequently estimated using neural Bayes estimation. We apply our classifiers and estimators to analyse the pairwise extremal behaviour of changes in horizontal geomagnetic field fluctuations at three different locations.

Supplementary Information

The online version contains supplementary material available at 10.1007/s10687-025-00521-8.

Keywords: Copula, Likelihood-free inference, Neural Bayes estimator, Neural bayes classifier, Neural network, Simulation-based inference, Tail dependence

Introduction

Motivation

Recent developments in bivariate extreme value modelling have produced new classes of models that allow for interpolation between the two key tail dependence regimes of asymptotic dependence and asymptotic independence; see for instance (Engelke et al. 2019). These models simplify the approach to bivariate extremal modelling, by eliminating the need to pre-determine a dependence regime using unreliable empirical diagnostics. However, evaluating their likelihood functions often relies on numerical integration and inversion of functions, as well as censoring of non-extreme values, which makes likelihood evaluation burdensome. In other situations, the likelihood function might not be available at all. Nonetheless, despite the likelihood function being intractable or unavailable, it is often possible to simulate data from the model; this allows for the use of simulation-based likelihood-free algorithms to estimate model parameters.

Traditional likelihood-free inference approaches

One simulation-based approach is the pseudo-marginal Markov chain Monte Carlo (MCMC) sampler proposed first by Beaumont (2003) and later formalised by Andrieu and Roberts (2009). When the target distribution is intractable, usually due to the likelihood function, pseudo-marginal MCMC is able to approximate the target function using an unbiased estimator obtained through importance sampling. The expected value of such an estimator corresponds to the true target distribution, enabling the algorithm to correctly sample from it. Pseudo-marginal MCMC methods, however, perform poorly when dealing with high-dimensional parameter vectors (Alenlöv et al. 2021) or when the distribution of the proposed estimator is, for example, heavy tailed, resulting in difficulties converging to the target distribution (Murray and Graham 2016). Another commonly used likelihood-free procedure is approximate Bayesian computation (ABC; see, e.g., Lintusaari et al. 2017 and Sisson et al. 2018). Specifically, this can be seen as a rejection sampling algorithm, where the model parameters are generated from a prior distribution and subsequently accepted or not based on the distance between a data sample simulated from the model, given the simulated parameters, and the original data sample, often evaluated based on informative summary statistics. Choosing a suitable prior distribution, and defining how similar the data samples are, constitute major drawbacks of using ABC to perform inference. An inadequate prior distribution might lead to misleading posterior estimates, particularly in situations where the selected summary statistics are not very informative. Conversely, a prior distribution which is too informative can result in a posterior that is skewed or biased towards the prior distribution, even if it leads to less variable estimates. Wood (2010) propose the ‘synthetic likelihood’ method, which constructs an approximate likelihood function by assuming that user-defined summary statistics follow a multivariate normal distribution. This approach is usually easier to tune than ABC and computationally more efficient, especially with higher dimensional data sets (Price et al. 2018), but its usual underlying Gaussian assumption makes it inflexible in some cases, which may lead to sub-optimal inferences.

Neural bayes inference for extremes

More recently, there has been a growing interest in likelihood-free estimation methods which use neural networks; see Zammit-Mangion et al. (2025) for an in-depth review. The extremes literature has also started to be impacted by this new inference paradigm, mostly in the spatial setting; see for instance (Dell’Oro and Gaetan 2025; Lenzi et al. 2023; Majumder and Reich 2023; Majumder et al. 2024; Rai et al. 2024; Richards et al. 2024b, a; Sainsbury-Dale et al. 2024, 2025) and Walchessen et al. (2024). One approach for leveraging neural networks for likelihood-free inference is to obtain a point estimate of the vector of model parameters through a neural Bayes estimator (Sainsbury-Dale et al. 2024). Training the neural network to build such an estimator can be computationally expensive; however, this step only needs to be done once, with estimates subsequently obtained in milliseconds with new data, using a single graphics processing unit (GPU). This means that neural Bayes estimators are amortised (Zammit-Mangion et al. 2025), which allows for their repeated use at almost no extra computational cost (see, e.g. Richards et al. 2024b for a compelling data illustration). Therefore, neural Bayes estimators are an appealing, and much faster, avenue to performing inference compared to state-of-the-art likelihood-based methods. Moreover, unlike other likelihood-free methods, such as ABC, this approach automatically learns the relevant summary statistics for the inference problem at hand. Given the computational complexity of the models of interest, this is the approach we take in this paper. Whilst the methodology developed for neural Bayes estimation has been mostly applied in the spatial and temporal contexts, we are interested in exploring its applicability in a simple bivariate setting, while allowing for censored data inputs. In order to achieve this, an appropriate neural network architecture will need to be designed, along with suitable prior choices. While the number of parameters to estimate may be similar to typical spatial models, the inference procedure may be more challenging in a bivariate setting compared to a spatial context, since there are fewer distinctive features (e.g., location, distance) in the data that the neural Bayes estimator can learn from.

When neural Bayes estimators are adopted for inference, typical model selection techniques, such as the Akaike information criterion (AIC) or the Bayesian information criterion (BIC), are often not available as they require knowledge of the likelihood function; see, e.g., Claeskens and Hjort (2008) for details on model selection criteria. Therefore, having a likelihood-free way of selecting the best model, for a given set of candidate models fitted to a certain data set, is desirable. Radev et al. (2023) show how the marginal likelihood (and hence, Bayes factors useful for model selection) may be approximated using a neural network-based approach. Similarly, neural methods targeting the likelihood-to-evidence ratio (see, e.g., Cranmer et al. 2016; Hermans et al. 2020) could be used for model selection using likelihood ratios. These methodologies, however, rely on full posterior and/or full likelihood neural approximations. Ahmed et al. (2022) and Wixson and Cooley (2024), on the other hand, propose using neural networks as classification tools for testing the extremal dependence type of a data set, however not in the context of model selection. Whilst the former only focus on spatial processes, the latter apply the classifier to bivariate data sets. More recently, Ahmed et al. (2024) propose using neural networks for selecting spatial max-stable processes. To do so, the extremal concurrence probability (Dombry et al. 2018) is used as a summary statistic to extract the spatial features of a data set. However, if such summary statistic is not sufficient, its use as input to the neural network might result in a weaker ability to distinguish between key features. Here, we make a step further and instead propose a model selection procedure based on a classification problem, whereby a neural network architecture (analogous to that used for parameter estimation) automatically learns relevant summary statistics for the model selection problem at hand. More specifically, a neural Bayes classifier, designed to learn the distinguishing features of each model, is used (once trained) to efficiently estimate the posterior probability of a data set arising from a certain model. The obtained posterior probabilities can then be used as weights in Bayesian model averaging (e.g., Hoeting et al. 1999) type procedures, if desired.

Beyond parameter estimation, model selection and hypothesis testing, work at the interface between statistics of extremes and deep learning is not new and has been of growing interest recently; see, e.g., Cannon (2010); Cisneros et al. (2024); Pasche and Engelke (2024); Richards and Huser (2022) for univariate extreme regression modelling, and Murphy-Barltrop et al. (2024) for extremal dependence modelling.

Main contributions and paper outline

In this paper, we contribute to the neural inference literature on extremes with the aim to provide a supervised learning toolbox for simple fitting and selection of complex bivariate extremal dependence models, which avoids the subjective, and often awkward, selection of summary statistics. We start by exploring the utility of neural Bayes estimators in this specific setting; this is done through assessment of the estimation accuracy of the model parameters and key dependence measures. The uncertainty of the neural Bayes estimators is assessed and compared through two different approaches: a non-parametric bootstrap approach, and an estimator trained to target posterior quantiles. We then outline the neural Bayes classifier, and examine its success for model selection. When available, we compare its performance to a likelihood-based information criterion. The end goal is to make the entire statistical pipeline amortised. First, the best model for a given data set is selected through the neural Bayes classifier, and then estimates of the model parameters are obtained through a neural Bayes estimator.

This paper is organised as follows: in Section 2, we introduce the methodology used for parameter estimation using neural networks for both uncensored and censored data, and describe our model selection procedure based on a classification task. Section 3 presents an overview of bivariate extreme value modelling and introduces the models of interest for which likelihood-based inference is burdensome. Simulation studies assessing our proposed inference and model selection frameworks are discussed in Section 4. We then apply the proposed toolbox to study the pairwise extremal behaviour of the changes in horizontal geomagnetic field fluctuations between three locations in Section 5, followed by a conclusion in Section 6.

Inference methodology

In this section, we review background on neural point estimation using the methodology developed by Sainsbury-Dale et al. (2024) and Richards et al. (2024b) and describe our neural approach to model selection. In Section 2.1, we review neural Bayes estimators, firstly outlining the general framework when the sample size is fixed and known, and data are fully observed (i.e., uncensored). We then explain how to adapt the estimation procedure to account for variable sample size and censored data, respectively. In Section 2.2, we present our neural Bayes classifier for model selection and describe how to construct it. Implementation details are given in Section 2.3. Although we later focus on bivariate models, we use data dimension d in this section for generality.

Neural bayes estimators

General framework

Let Inline graphic be n independent and identically distributed random vectors, and let their collection be represented by Inline graphic We assume that Inline graphic admits the parametric joint density Inline graphic where Inline graphic is the vector of parameters. A point estimator Inline graphic maps data Inline graphic to parameter estimates from the parameter space Inline graphic i.e., Inline graphic Given a non-negative loss function Inline graphic a Bayes estimator minimises a weighted average of the risk at Inline graphic Inline graphic which may be expressed as

graphic file with name d33e494.gif 2.1

where Inline graphic is a prior measure for Inline graphic Equation (2.1) is known as the Bayes risk. It is key to realise that Bayes estimators are functionals of the posterior distribution induced by the prior Inline graphic. In particular, if Inline graphic is the squared error loss, Inline graphic is the posterior mean of Inline graphic. If Inline graphic is instead the absolute error loss, Inline graphic is the posterior median, and alternative posterior quantiles can be estimated using the quantile loss function; see Section 4.2 for further details. Under suitable regularity conditions and the squared error loss, these estimators are consistent and asymptotically efficient; see for instance (Lehmann and Casella, 1998, Ch. 5 and 6).

In practice, however, Bayes estimators are rarely available in closed form, and the Bayes risk in Equation 2.1 is difficult to evaluate. This can be overcome by approximating these estimators using a neural network, since these are universal function approximators (Hornik et al. 1989). In this context, a neural point estimator Inline graphic is constructed as a neural network, with parameters Inline graphic that returns a point estimate from data input Inline graphic Bayes estimators may thus be approximated with Inline graphic where Inline graphic and

graphic file with name d33e571.gif 2.2

In Equation 2.2, Inline graphic is a training set of size Inline graphic consisting of draws Inline graphic from the the prior Inline graphic and corresponding data set realisations Inline graphic sampled from the model given Inline graphic, i.e., from Inline graphic The neural point estimator Inline graphic is called a neural Bayes estimator (NBE) as it minimises a Monte Carlo approximation (2.2) of the Bayes risk (2.1); see Sainsbury-Dale et al. (2024) for more details.

The discrepancy between the neural Bayes estimator and the true Bayes estimator will depend on a few factors, one of which is the neural network architecture. Through a judicious choice of architecture, NBEs can be enforced to satisfy the fundamental property that Inline graphic for any vector Inline graphic whose elements are permutations of the independent replicates in Inline graphic this can be achieved by exploiting a neural network architecture known as DeepSets (Zaheer et al. 2017; Sainsbury-Dale et al. 2024). Let Inline graphic and Inline graphic be two multilayer neural networks parameterised by Inline graphic and Inline graphic respectively. Following (Sainsbury-Dale et al. 2024), the NBE is then represented as

graphic file with name d33e662.gif 2.3

where the average is computed componentwise, Inline graphic denotes a vector of learnt summary statistics, and Inline graphic are the parameters of the neural networks Inline graphic and Inline graphic. In the multivariate unstructured setting, a multilayer perceptron (MLP) neural network may be used for both Inline graphic and Inline graphic see Section 2.3 for further details. A schematic of the DeepSets architecture is shown in Section S1 of the Supplementary Material.

More recently, Rödder et al. (2025) have provided theoretical and asymptotic guarantees for NBEs. In particular, the authors show that, under the squared error loss function, an MLP with ReLU activation function (see Section 2.3), and other regularity assumptions, these estimators are fully efficient compared to the corresponding analytical Bayes estimators, and are consistent in a Bayesian sense. They do so by decomposing the empirical risk (2.2) into the analytical Bayes risk, an approximation error term, a generalisation error term, and an algorithm error term, which all converge to zero under an appropriate asymptotic regime.

The performance of the NBE is inherently influenced by the choice of the prior distributions. While an informative prior might reduce the volume of the parameter space, and allow lower values for Inline graphic in Equation 2.2, this restricts the use of the trained estimators across several applications; when the latter is desirable, a vague prior is advisable (Sainsbury-Dale et al. 2024). When the likelihood is available, and feasible, informative prior distributions can be constructed using likelihood-based estimates (Lenzi et al. 2023). Alternatively, informative priors can be obtained by sequentially incorporating the knowledge from previously estimated posterior distributions; however, this is no longer an amortised approach, as the neural network must be retrained whenever the prior changes.

Variable sample size

When training a neural Bayes estimator on a data set with a fixed number, n, of replicates, this estimator will generally not be Bayes for data sets with a different sample size Inline graphic Therefore, in order to ensure that the trained NBE approximately minimises the Bayes risk Inline graphic for varying sample sizes n, Sainsbury-Dale et al. (2024) propose two approaches: either obtaining a piecewise neural Bayes estimator by pre-training the estimator for specific fixed sample sizes (Goodfellow et al. 2016), or treating the sample size as a random variable N; we adopt the latter in our work.

Let us assume that the sample size N follows a discrete uniform distribution, that is Inline graphic where Inline graphic for Inline graphic and Inline graphic Further, the sample size N is assumed independent of the model parameters Inline graphic This extra random variable modifies the Bayes risk function (2.1), which can now be approximated by

graphic file with name d33e785.gif

where Inline graphic is a training set of size Inline graphic consisting of sample sizes n drawn from the Inline graphic distribution, parameters Inline graphic drawn from the prior Inline graphic and corresponding data set realisations Inline graphic drawn from the model given n and Inline graphic. Thus, during training, it is now necessary to simulate the sample size along with model parameters from the prior and replicated data from the model; however, the general inference method remains the same.

Censored data

The use of neural Bayes estimators for censored data was later considered by Richards et al. (2024b). This is essential in multivariate models aimed at capturing the extremal dependence structure and common practice in multivariate extremes; see Ledford and Tawn (1996) and Smith et al. (1997) for early examples of this approach. In these models, low observations are often censored to prevent these non-extreme values from affecting the estimation of the tail dependence. As shown by Huser et al. (2016), treating the censored data as observed leads to more biased estimators.

Consider the random vector Inline graphic Inline graphic and let Inline graphic be the inverse cumulative distribution function (cdf) of variable Inline graphic Inline graphic Various censoring schemes can be adopted. One possibility, used by Richards et al. (2024b), is to censor the observations that fall below a high marginal Inline graphic-quantile, i.e., if Inline graphic then Inline graphic is treated as censored. Instead, in this paper, we censor the observations only if all the components are below their respective Inline graphic-marginal quantile, i.e., if Inline graphic then the entire vector Inline graphic is treated as fully censored, otherwise, if at least one component of Inline graphic has a value above its marginal Inline graphic-quantile, the entire vector is treated as uncensored. We do so for consistency in later comparisons between models (see Sections 3.3 and 4.3), as this is the only censoring scheme that is implemented for likelihood-based inference in some of the models we consider. In addition, this censoring scheme can be less computationally demanding for likelihood-based estimation.

In order for the neural Bayes estimator to account for censored data, Richards et al. (2024b) propose standardising data Inline graphic Inline graphic to a common marginal scale and setting the censored observations to some constant Inline graphic, yielding Inline graphic Inline graphic To improve performance of the NBE, this constant c is set to a value outside of the support of the data. In order for information on the censored observations to be passed to the NBE, Richards et al. (2024b) propose additionally creating a one-hot encoded vector Inline graphic that identifies which indices of Inline graphic are censored (taking the value Inline graphic), and which are not (taking the value Inline graphic). Then, the neural Bayes estimator is trained using an augmented data set Inline graphic containing the data Inline graphic and the indicator vector Inline graphic that is Inline graphic Passing Inline graphic as the input to the neural network in place of Inline graphic in Equation 2.3 is sufficient to ensure all information about the censoring scheme is given to the NBE. In contrast to the approach of Richards et al. (2024b), under the adopted censoring scheme, each vector Inline graphic is either a d-dimensional vector of zeros or a d-dimensional vector of ones. Nevertheless, we believe that incorporating Inline graphic as an input to the neural network remains beneficial, as it carries information about the number of exceedances during training. Moreover, we propose handling the augmented data set Inline graphic with a bilinear layer (see Section 2.3) as the input layer of the neural network Inline graphic instead.

Similarly to the sample size, these NBEs are only (approximately) optimal when applied to data sets where the censoring level is kept the same as the one used for training. However, having a single neural estimator which performs well for any valid Inline graphic—or a subset thereof—is often desirable. This can be achieved by feeding Inline graphic as an extra input to the outer neural network Inline graphic as

graphic file with name d33e1026.gif

where Inline graphic as in (2.3) with Inline graphic in place of Inline graphic.

In this context, the censoring level must be treated as a random variable T, which requires an additional prior. As we are not interested in censoring too low, a prior Inline graphic concentrated around high quantiles (i.e., with probability values Inline graphic close to 1) is a natural choice. Thus, each data set now has a censoring level associated with it, making it possible to have different censoring levels for the different training parameter vectors and corresponding data samples. The Monte Carlo approximation of the Bayes risk in this case takes now the form

graphic file with name d33e1059.gif

where Inline graphic is a training set of size Inline graphic consisting of censoring levels Inline graphic drawn from the continuous Inline graphic distribution with density Inline graphic over Inline graphic sample sizes n drawn from the discrete Inline graphic distribution as above, parameters Inline graphic drawn from the prior Inline graphic and corresponding data set realisations Inline graphic, drawn from the model given n and Inline graphic that are masked at the simulated censoring level Inline graphic and augmented with the threshold exceedances indicator vector as described above.

Model selection with neural bayes classifiers

From a Bayesian perspective, model selection is naturally performed by treating the model type as a random variable, M, which is inferred along with model parameters, based on data set Inline graphic. Consider a finite collection of Inline graphic candidate parametric models, such that M takes values in Inline graphic, and assume that a priori Inline graphic Inline graphic with Inline graphic. In our experiments, we specify a uniform prior, i.e., Inline graphic for all Inline graphic, indicating that the data Inline graphic have an equal probability of being drawn from each model a priori; however, other choices are possible. Our interest thus lies in approximating the posterior distribution of Inline graphic, i.e., the distribution of Inline graphic—or functionals thereof—where Inline graphic is the combined vector of model parameters for all candidate models, and Inline graphic is the parameter vector for the m-th model. This joint inference task may be drastically simplified (without loss) by noting that the conditional distribution of Inline graphic can be written as the product between the distribution of Inline graphic and that of Inline graphic, both of which can be inferred separately. Inferring Inline graphic can be further simplified by splitting the problem into model-specific inference tasks, i.e., by separately inferring Inline graphic for each Inline graphic. This can be achieved efficiently by training different NBEs for each specific candidate model Inline graphic; recall Section 2.1. Therefore, to perform amortised model selection, the only missing piece is a fast inference technique to compute, or rather approximate, the distribution of Inline graphic. Bayes’ theorem implies that

graphic file with name d33e1224.gif 2.4

where Inline graphic is the parameter space of Inline graphic Inline graphic is a prior measure for Inline graphic and Inline graphic denotes the density of Inline graphic (evaluated at the value Inline graphic) given Inline graphic and Inline graphic In other words, Inline graphic is the parametric joint density of the m-th candidate model (for n independent replicates) for fixed parameter vector Inline graphic Equation (2.4) thus shows that the distribution of Inline graphic is unavailable when the individual model densities are intractable.

Nevertheless, similarly to amortised parameter estimation, it is possible to construct a neural network that approximates the true discrete distribution of Inline graphic for any data input Inline graphic. Let Inline graphic be the true (target) posterior probabilities of Inline graphic, and let Inline graphic denote the corresponding approximate posterior probabilities (appropriately constrained to be positive and sum to one), obtained as the output of a neural network parameterised by the vector Inline graphic. We further write Inline graphic, Inline graphic and Inline graphic for the densities of Inline graphic (marginalised over both Inline graphic and M), Inline graphic (marginalised over Inline graphic only), and Inline graphic, respectively, and let Inline graphic and Inline graphic be the sample spaces of Inline graphic and Inline graphic, respectively. Following the arguments in Zammit-Mangion et al. (2025), the required inference task reduces to finding the optimal Inline graphic that minimises the expected forward Kullback–Leibler divergence between Inline graphic and Inline graphic, that is

graphic file with name d33e1390.gif 2.5

where Inline graphic is a training set of size Inline graphic consisting of models m drawn from the prior for M with probabilities Inline graphic, model parameters Inline graphic drawn from the prior Inline graphic (i.e., given the model m), and corresponding data set realisations Inline graphic drawn from the fixed model m given parameters Inline graphic. Note that the fourth equality above is justified by a simple application of Bayes’ theorem. With data Inline graphic, amortised model selection can thus proceed based on Inline graphic by selecting the model Inline graphic that maximises the inferred posterior probability Inline graphic This is akin to a classification problem, where each model type is treated as a different ‘class’ (among K classes), and where the data Inline graphic are labelled according to the class that is the most likely a posteriori. The optimisation in Equation 2.5 is indeed identical to minimising the categorical cross-entropy loss function, which is a popular and natural choice in multiclass classification problems. Thus, by analogy with NBEs, we call our amortised model selection tool the neural Bayes classifier (NBC). If suitably trained, the NBC is expected to perform well for any data Inline graphic drawn from one of the K models, provided that Inline graphic is sufficiently large in Equation 2.5. However, as with NBEs, the architecture of NBCs should depend on the structure of the data at hand and the desired level of amortisation. In particular, with replicated data (i.e., with Inline graphic), the DeepSets architecture introduced in Section 2.1 can be applied, and similar techniques to those used for parameter estimation can be employed to ensure the NBC remains suitable for censored data, variable sample sizes, and/or variable censoring levels. We note, however, that there is no restriction in using a different neural network architecture to that used for the NBEs.

Implementation details

In this work, a multilayer perceptron (MLP) neural network is used for both Inline graphic and Inline graphic in the DeepSets construction (2.3), for both parameter and model selection procedures. Two key components of a standard MLP are its activation functions and vector of parameters Inline graphic, with the latter containing what is often referred to as weights and biases. The activation functions introduce non-linearity into the MLP construction, allowing the network to learn and represent the complexities of the underlying data. The parameters, on the other hand, determine the strength (weights) of the connection between two neurons (i.e., nodes of the neural network), and shift the input of the activation functions (biases). Consider a generic MLP with L layers, and let Inline graphic and Inline graphic represent the matrix of weights and vector of biases (of appropriate dimensions) of layer Inline graphic respectively. The MLP is constructed by taking the input Inline graphic and transforming it into the output Inline graphic as

graphic file with name d33e1529.gif

where Inline graphic are often denoted as the hidden states (Zammit-Mangion et al. 2025), and Inline graphic is the activation function of the l-th layer (Inline graphic). As mentioned in Section 2.1.3, a bilinear layer is used as the input layer Inline graphic of the neural network Inline graphic when handling censored data. As opposed to the layer Inline graphic defined above, this type of layer allows for two separate inputs, that may be of different dimension, to be combined into a single input. In particular, given the augmented data set Inline graphic for Inline graphic the k-th element of the first hidden state Inline graphic for each data replicate i takes the form Inline graphic with Inline graphic, for Inline graphic where Inline graphic is the output dimension of Inline graphic This corresponds to a sum of elementwise interactions between the standardised data input Inline graphic and the indicator vector Inline graphic Inline graphic As before, the n data replicates are combined using the DeepSets framework (recall Sections 2.1.1 and 2.1.3). We note, however, that with the adopted censoring scheme (i.e., with Inline graphic either being a d-dimensional vector of zeros or ones), identical results are obtained when considering the original data input Inline graphic instead.

Unless stated otherwise, the Rectified Linear Unit (ReLU) activation function is used when training the neural Bayes estimator and classifier, except in the final layer L. Writing Inline graphic for Inline graphic (and Inline graphic for Inline graphic), the ReLU function returns the same value if the corresponding element of Inline graphic is positive, and 0 otherwise, i.e, Inline graphic applied elementwise. For the final layer L of the Inline graphic network (recall the DeepSets framework in (2.3)), different activation functions are used so that constraints on the support of the parameters are satisfied. In particular, when training the NBE, if the j-th parameter is strictly positive, the softplus activation function is applied, i.e., Inline graphic where Inline graphic denotes the j-th element of the vector Inline graphic. If the parameter is bounded in the interval [a, b], a layer compression is used instead; such a layer uses a logistic function Inline graphic restricting the j-th parameter to be within [a, b]. The identity function, Inline graphic is used for parameters whose support is the real line. When training the NBC, the softmax activation function is used in the final layer L so that the output Inline graphic is a valid vector of probabilities, i.e., all elements of Inline graphic are positive and Inline graphic. More specifically, writing Inline graphic, the softmax activation function takes the form Inline graphic with componentwise operations again.

As mentioned in Sections 2.1 and 2.2, neural Bayes estimators and classifiers are trained by minimising a specific objective function defined either as the empirical Bayes risk (for parameter estimation) or as the expected Kullback–Leibler divergence (for model selection), with respect to the neural network parameters Inline graphic More specifically, the training process involves learning the optimal parameters Inline graphic that map data inputs to parameter estimates or posterior probabilities. This optimisation is done via back-propagation and the stochastic gradient descent (SGD) algorithm, where parameters are iteratively updated to minimise the selected objective function. Moreover, during training, two types of data sets are used: the training and validation sets, denoted respectively by Inline graphic and Inline graphic from now on. Both data sets are passed through the network and are refreshed after every epoch; here an epoch is defined as one full cycle through all the input data in the training set during the SGD process. Precisely, the training set Inline graphic contains data used to train the model, which are used to update the parameters of the network by minimising the objective function using SGD. On the other hand, the validation set Inline graphic does not contribute to the parameter updates; instead, it is used to assess the ability of the model to generalise to new data by evaluating the same objective function on the validation set, which helps to avoid overfitting, and it is used to define an early-stopping criterion for the algorithm (see, e.g., Prechelt 1998). Finally, the performance of the trained estimator to model new data is objectively assessed by evaluating the same objective function on a test set, which is not used during training (nor validation) at all. All the computations are performed using the NeuralEstimators (Sainsbury-Dale 2024) and Flux (Innes 2018) packages in Julia; see https://msainsburydale.github.io/NeuralEstimators.jl/dev/ and https://fluxml.ai/Flux.jl/stable/, respectively, for the full documentation.

Bivariate models of interest

From now on, we work in the bivariate setting. Specifically, we focus on the modelling of the joint tail behaviour of the (single) random vector Inline graphic We note, however, that the inference methodology can be applied to higher dimensions. We are particularly interested in bivariate models that are suitable for the modelling of both types of extremal dependence structures. More specifically, we focus on flexible models that allow interpolation between asymptotic dependence and independence, as well as on the weighted copula model (WCM) proposed by André et al. (2024), which is designed to represent both the body and tail of a data set. We aim to provide a tool for fast inference for a variety of bivariate models exhibiting complex dependence structures. Evaluation of their likelihood functions relies heavily on numerical integration and inversion of functions; this results in computationally costly likelihood-based inference procedures and may otherwise limit the use of these models in practice. Furthermore, likelihood-based inference for the WCM, which is a dynamic mixture model, is currently infeasible when one of its components is taken as one of the models able to interpolate between the two classes of extremal dependence. Section 3.1 reviews basics of copula modelling, while some background on extremal dependence measures is given in Section 3.2. The models of interest are introduced in Sections 3.3 and 3.4.

Copula modelling

The dependence between variables Inline graphic and Inline graphic can be characterised by means of copulas. Let Inline graphic and Inline graphic be the margins and let Inline graphic denote their joint distribution function. According to Sklar’s theorem (Sklar 1959), the underlying copula Inline graphic of Inline graphic is obtained as

graphic file with name d33e1878.gif

When Inline graphic and Inline graphic are continuous variables, the copula C is unique and represents the joint distribution function of Inline graphic where Inline graphic and Inline graphic are Inline graphic random variables. This result is useful since it is sufficient to marginally transform the data to a uniform scale through the probability integral transform and represent their joint behaviour via a copula model C. When it exists, the copula density Inline graphic can be obtained by taking the second derivative of C with respect to Inline graphic and Inline graphic as

graphic file with name d33e1929.gif

where Inline graphic is the probability density function (pdf) of variable Inline graphic for Inline graphic and Inline graphic is the joint pdf of Inline graphic and Inline graphic When Inline graphic does not have an explicit form, it often needs to be computed through numerical integration; this might also be necessary for Inline graphic Additionally, inversion techniques are often required to compute Inline graphic All of these can require substantial computational resources.

Bivariate extremal dependence measures

When interest lies in the joint extremes of a bivariate random vector, a key element is to correctly identify its extremal dependence behaviour, i.e., whether large values in different components of this vector are likely to occur simultaneously or not. Misidentifying the extremal dependence structure may indeed lead to inaccurate representations of the extremes, and incorrect extrapolations (see, e.g., Ledford and Tawn 1996, 1997; Heffernan and Tawn 2004; Huser and Genton 2016). Intuitively speaking, asymptotic dependence (AD) is present if the most extreme values of the components of the random vector Inline graphic can occur together, and asymptotic independence (AI) is present otherwise. This extremal behaviour is often quantified through the tail dependence coefficient Inline graphic (see, e.g., Joe 1997) and/or through the residual tail dependence coefficient Inline graphic (Ledford and Tawn 1996). The coefficient Inline graphic can be obtained as Inline graphic when it exists, with

graphic file with name d33e2015.gif 3.1

The vector Inline graphic is asymptotically independent if Inline graphic and asymptotically dependent if Inline graphic Given a function Inline graphic that is slowly-varying at zero (i.e, Inline graphic as Inline graphic for any Inline graphic), Ledford and Tawn (1996) assume the joint tail may be expressed as

graphic file with name d33e2052.gif 3.2

If Inline graphic and Inline graphic as Inline graphic then Inline graphic is asymptotically dependent with Inline graphic otherwise it is asymptotically independent, with larger values of Inline graphic indicating stronger dependence. Similarly to Inline graphic given in Equation 3.1, a sub-asymptotic version of Inline graphic can be obtained from Equation 3.2.

Taken together, Inline graphic provides a summary measure of dependence within the AD class (with Inline graphic), while Inline graphic provides a summary within the AI class (with Inline graphic). Available models in the multivariate extremes literature are often only suitable for one extremal dependence class. That is, aside from boundary points of the parameter space, traditional models either yield Inline graphic or Inline graphic but cannot span across both classes. However, in recent years, more flexible methods which are able to capture both types of dependence have been proposed; see for instance Wadsworth et al. (2017); Huser and Wadsworth (2019) and Engelke et al. (2019). Each of these can be written as a random scale construction, which we introduce in the following section.

Random scale construction models

A range of bivariate dependence models can be constructed using a random scale representation based on ‘radial’ and ‘angular’ coordinates. More specifically, a random scale mixture vector Inline graphic is constructed as follows

graphic file with name d33e2141.gif 3.3

where Inline graphic is the ‘radial’ variable and is assumed to follow a non-degenerate distribution, and Inline graphic is the vector of ‘angular’ components. Different models can be obtained by varying the distributions and constructions of R and Inline graphic Depending on the precise specification, these may be able to interpolate between the two regimes of extremal dependence; see Engelke et al. (2019) for a detailed overview of the dependence properties arising from this construction. Interest lies in exploiting the copula C of these flexible models. Moreover, since these aim at capturing the extremal dependence of the vector Inline graphic non-extreme values are often censored to prevent their influence on the joint tail. We now present four particularly interesting bivariate models with construction (3.3), each of which can yield both Inline graphic and Inline graphic depending on their parameter vectors, with the transition between these two regimes occurring at interior points of the parameter space.

Model W

Let Inline graphic and let R follow a generalised Pareto distribution (GPD) with scale parameter 1 and shape parameter Inline graphic i.e, Inline graphic with cdf Inline graphic Inline graphic Wadsworth et al. (2017) propose a model with

graphic file with name d33e2215.gif

Given the model construction, Inline graphic is assumed to hold only when Inline graphic is large. This model is able to smoothly interpolate between the two classes of asymptotic dependence through the parameter Inline graphic For Inline graphic Inline graphic is asymptotically dependent with

graphic file with name d33e2240.gif

If Inline graphic then asymptotic independence is present with Inline graphic and Inline graphic More details can be found in Wadsworth et al. (2017).

Model HW

Huser and Wadsworth (2019) detail a model construction providing flexible extremal dependence structures for spatial processes. However, they also propose a bivariate model able to transition between different types of dependence. In this model, both R and the vector Inline graphic are marginally Pareto distributed with different shape parameters. More specifically, the marginal cdfs of each variable are given by Inline graphic Inline graphic and Inline graphic Inline graphic with Inline graphic defined analogously, for Inline graphic Additionally, we assume here that Inline graphic follows a bivariate Gaussian copula with correlation parameter Inline graphic see also Gong and Huser (2022a, 2022b).

This model is able to interpolate between the two classes of extremal dependence through the parameter Inline graphic when Inline graphic the tail of R is heavier than Inline graphic and so Inline graphic is asymptotically dependent with

graphic file with name d33e2336.gif

When Inline graphic Inline graphic is asymptotically independent with

graphic file with name d33e2348.gif

where Inline graphic is the residual tail dependence coefficient (3.2) of vector Inline graphic More details can be found in Huser and Wadsworth (2019).

The final two models were proposed by Engelke et al. (2019). Similarly to the model introduced by Wadsworth et al. (2017), let Inline graphic Inline graphic

Model E1

For the first model, R follows a Weibull distribution with distribution function Inline graphic Inline graphic and the angular components are constructed as follows

graphic file with name d33e2397.gif

where Inline graphic and Inline graphic For this model, the extremal dependence is controlled by Inline graphic when Inline graphic Inline graphic and Inline graphic are asymptotically independent with Inline graphic and Inline graphic If Inline graphic they are asymptotically dependent with

graphic file with name d33e2439.gif

Model E2

For the second model, Inline graphic with Inline graphic as in Wadsworth et al. (2017). The angular components Inline graphic and Inline graphic are now independent of each other and distributed as V, that is Inline graphic The extremal dependence of this model is determined by Inline graphic In particular, if Inline graphic

graphic file with name d33e2480.gif

and Inline graphic are asymptotically dependent. When Inline graphic the variables are asymptotically independent with

graphic file with name d33e2493.gif

Although Models E1 and E2 were proposed in Engelke et al. (2019), to the best of our knowledge they have not been used for model inference or in concrete data applications in the literature previously.

Weighted copula model

André et al. (2024) propose a model that is able to accurately represent both the body and tail regions of a data set, while ensuring a smooth transition between them. Let Inline graphic denote the density of a copula tailored to the tail, with parameter Inline graphic and Inline graphic denote the density of a copula tailored to the body, with parameter Inline graphic For Inline graphic, the density of the proposed model is given by dynamically mixing Inline graphic with Inline graphic as follows

graphic file with name d33e2536.gif 3.4

where Inline graphic is a dynamic weighting function, Inline graphic is the vector of model parameters, and Inline graphic a normalising constant. Note that model (3.4) does not have uniform margins in general, which makes likelihood-based inference difficult. The weighting function is dynamic and specified such that it is increasing in Inline graphic and Inline graphic for a fixed value of Inline graphic in particular, more weight is given to Inline graphic for small values of Inline graphic and more weight is given to Inline graphic for large values of Inline graphic Similarly to the models introduced in Section 3.3, the interest lies in exploiting the copula Inline graphic of density (3.4), where Inline graphic and Inline graphic are the marginal cdfs of the cdf H corresponding to h in (3.4). As shown in André et al. (2024), the model shows some interesting features regarding extremal dependence, with Inline graphic potentially having an influence on Inline graphic depending on the weighting function chosen. More details can be found in André et al. (2024).

Simulation studies

Several simulation studies are performed to assess the trained neural Bayes estimators in different scenarios. We present selected studies in this section, and give the remaining ones in the Supplementary Material. All general settings and priors are outlined in Section 4.1. In Section 4.2 we then study the performance of NBEs in estimating the model parameters of the models described in Sections 3.3 and 3.4. We assess the efficacy of the neural Bayes classifier for model selection in Section 4.3, focusing on the four models from Section 3.3. In Section 4.4 we investigate the performance of the NBCs and NBEs trained for model selection and parameter estimation, respectively, in misspecified scenarios.

General settings

In all simulations, the sample size n and, when applicable, the censoring level Inline graphic are assumed random and independent realisations of variables distributed, respectively, as Inline graphic and Inline graphic Each parameter of the four models mentioned in Section 3.3 are also assumed independent a priori and uniformly distributed. In particular, for Model W (Wadsworth et al. 2017) we take Inline graphic for the parameter of the Beta distribution, and Inline graphic for the shape parameter of the GPD. For Model HW (Huser and Wadsworth 2019), we take Inline graphic and Inline graphic For Model E1 (Engelke et al. 2019), we take Inline graphic for the parameter of the Beta distribution, Inline graphic for the Weibull parameter, and Inline graphic For Model E2 (Engelke et al. 2019), we assume that Inline graphic and Inline graphic For the weighted copula model from Equation 3.4, we take the weighting function to be Inline graphic with Inline graphic as the prior for the weighting function parameter; based on previous analysis of this model, Inline graphic ensures that there is a good representation of both copula components, Inline graphic and Inline graphic in each drawn sample.

In order to train the NBE for parameter estimation, training and validation sets are generated (recall Sections 2.1 and 2.3). For the training set Inline graphic, we sample Inline graphic parameter vectors Inline graphic independently, and for each of them we sample five different data set realisations Inline graphic from the model, each associated with a different (randomly sampled) sample size n and censoring level Inline graphic (when applicable). Therefore, the training set Inline graphic for the NBE is of size Inline graphic For the validation set Inline graphic, we use the same sampling strategy, but we only sample Inline graphic parameter vectors, thus resulting in a set of size Inline graphic In order to train the NBC for model selection (recall Section 2.2), a similar approach is used, but the model is now also treated as random. For the training set Inline graphic, we start by generating Inline graphic models m, but only sample a single parameter vector, sample size, censoring level (when applicable), and corresponding data set for each model. Therefore, the size of the training set for the NBC is Inline graphic For the validation set, we use the same strategy but only generate Inline graphic models, resulting in a validation set of size Inline graphic In all simulations, the rank transform is used to transform the margins of Inline graphic to an approximate uniform scale, as required when fitting our copula models.

The number of layers assumed for each neural network Inline graphic and Inline graphic (recall (2.3)) and its parameters are determined experimentally, and in order to reduce the computational intensity, we adopt the ‘simulation-on-the-fly’ technique; see Sainsbury-Dale et al. (2024) for more details. We also adopt an early stopping rule whereby the training step finishes if the objective function (i.e., empirical Bayes risk for the NBE or expected Kullback–Leibler divergence for the NBC) computed based on the validation set has not decreased in 5 consecutive epochs for parameter estimation and 10 consecutive epochs for the model selection procedure. All the simulations are performed using a high-end computing cluster with a NVidia V100 32 GB GPU hardware with 192 GB of memory; see https://lancaster-hec.readthedocs.io/en/latest/gpu.html for more details (last accessed on 02/09/2025). For reproducibility and to make our methodology available to a broad readership, all the trained NBEs for parameter estimation and NBCs for model selection are available on https://github.com/lidiamandre/NBE_classifier_depmodels.

Parameter estimation assessment

We take the absolute error loss function in Equation 2.2 and its analogues, thus targeting the marginal posterior median. We first demonstrate the performance of NBEs for uncensored data from the weighted copula model from Section 3.4, and for censored data from one of the random scale mixture models mentioned in Section 3.3. The neural network architecture used for parameter estimation is given in Table S1 of the Supplementary Material. Finally, the assessment of the NBEs is done on a test parameter set with 1000 parameter vectors Inline graphic and corresponding test data realisations, each of size Inline graphic

In the first simulation study, we consider the weighed copula model from Equation 3.4. In particular, we take Inline graphic to be the Gaussian copula density with correlation parameter Inline graphic for which we take Inline graphic and Inline graphic to be the copula density of Model E1 with Inline graphic. This is a configuration for which likelihood-based inference is simply infeasible, owing to the nesting of two complex models requiring numerical integrals and inversion of functions. Figure 1 shows the results; the true values for each parameter are compared with their estimated values given by the trained NBE. It can be seen that there is a bit of variability, in particular for the parameters Inline graphic and Inline graphic we note that these are the parameters with the largest prior range. We can see that the NBE generally estimates the weighting parameter Inline graphic quite well, indicating that it is able to distinguish between the body and tail components of the copula. In addition, estimates of Inline graphic are quite accurate; this means that the two regimes of extremal dependence are reasonably well captured. In particular, Inline graphic of the data sets showing asymptotic dependence (i.e., Inline graphic) were estimated to be AD, whereas Inline graphic of the data sets showing asymptotic independence (i.e., Inline graphic) were estimated to be AI. Finally, estimates of Inline graphic exhibit the best results. Among negatively correlated data sets (i.e., Inline graphic), Inline graphic were estimated to be negatively correlated, whereas Inline graphic of the positively correlated data sets were correctly identified to be positively correlated.

Fig. 1.

Fig. 1

Assessment of the NBE when Inline graphic is the Gaussian copula with parameter Inline graphic Inline graphic is Model E1 with parameters Inline graphic and with weighting function Inline graphic Inline graphic for a sample size of Inline graphic The points highlighted in different shapes and colours refer to parameter configurations used for further diagnostics (see Figure 2)

It is important to assess the uncertainty of the NBE; we consider two different approaches for this task. For the first, a non-parametric bootstrap procedure is adopted. Specifically, we generate Inline graphic bootstrap samples by resampling with replacement. Then, for each bootstrap sample, the model parameters are estimated using the trained NBE. From these estimates, Inline graphic confidence intervals are constructed by taking the Inline graphic and Inline graphic quantiles of the samples. This is done for each parameter configuration and data from the test set. While there are no guarantees on the quality of the confidence intervals obtained through this procedure, it is computationally inexpensive to implement owing to the amortised nature of the NBE. This makes the bootstrap procedure a practical choice for exploring the uncertainty of these estimators. For the second approach, we train an additional estimator designed to target credible intervals. To do so, a composite quantile loss function targeting jointly low and high posterior quantiles is used instead. Precisely, this loss function is defined as Inline graphicInline graphic for probability levels Inline graphic, Inline graphic and parameter estimators Inline graphic Inline graphic We train an NBE Inline graphicInline graphic that outputs posterior quantiles for all parameters and probability levels, and note that the neural network is constrained in such a way that quantiles are properly ordered; see more details in Sainsbury-Dale et al. (2025). With this estimator, herein referred to as the neural interval estimator, we are able to approximate marginal Inline graphic central credible intervals by taking Inline graphic and setting Inline graphic We evaluate the performance of each approach by computing coverage probabilities, with the results presented in Table 1. The bootstrap procedure leads to lower than nominal coverage rates, with the extent of the miscalibration linked to the quality of estimates shown in Figure 1: the best coverage is obtained for the parameters showing a better correspondence between true and estimated values, such as Inline graphic or Inline graphic The parameters Inline graphic and Inline graphic exhibit more bias in their estimation, which is reflected in worse coverage rates. On the other hand, the neural interval estimator is much better calibrated. In the context of NBEs, bootstrap-based confidence intervals have been used extensively to account for the estimation uncertainty; however, to the best of our knowledge, their coverage rates have not been systematically explored.

Table 1.

Coverage probability and average length of the Inline graphic uncertainty intervals obtained via a non-parametric bootstrap procedure and via the neural interval estimator averaged over 1000 models fitted using a NBE (rounded to 2 decimal places)

Parameter Bootstrap procedure Interval estimator
Coverage Length Coverage Length
Inline graphic 0.80 0.27 0.97 0.57
Inline graphic 0.36 3.12 0.97 11.84
Inline graphic 0.53 3.42 0.96 10.32
Inline graphic 0.67 0.63 0.97 1.67
Inline graphic 0.70 1.12 0.97 2.54

We also explore whether the apparent bias in parameter estimates leads to bias in dependence quantities of interest. To do so, we consider parameter and data sets for which the NBE severely under- or over-estimates at least one parameter and compare the empirical and model-based dependence measure Inline graphic from Equation 3.1 at several thresholds Inline graphic For this model configuration, model-based Inline graphic values are estimated using a Monte Carlo approximation with Inline graphic samples. The parameter configurations considered are highlighted with different shapes and colours in Figure 1, and the results for Inline graphic are shown in Figure 2. Despite some parameters being greatly under/over-estimated, the dependence structure is still well captured overall, apart from the configuration shown in blue for which Inline graphic is massively over-estimated. Given that this is the parameter that controls the limiting extremal dependence structure of the data, directly determining the value of Inline graphic this result is not very surprising. Finally, from the Inline graphic bootstrap samples obtained previously, we compute coverage probabilities of Inline graphic confidence intervals for Inline graphic at levels Inline graphic these are shown in Table 2. As can be seen, the true value for Inline graphic is within the confidence intervals in at least Inline graphic of the time, suggesting that this derived feature of the models is relatively well estimated and better calibrated than the individual parameters when their estimates obtained by the NBE exhibit bias and display poor coverage properties.

Fig. 2.

Fig. 2

Empirical Inline graphic (in grey), true Inline graphic (in pink) and model-based Inline graphic for the fitted weighted copula model with six different parameter configurations (in colour) for Inline graphic The 95Inline graphic confidence bands, representing uncertainty in the empirical estimates, were obtained by boostrapping

Table 2.

Coverage probability and average length of the Inline graphic confidence intervals for Inline graphic at levels Inline graphic obtained via a non-parametric bootstrap procedure averaged over 1000 models fitted using a NBE (rounded to 2 decimal places)

Inline graphic Coverage Length
Inline graphic 0.86 0.09
Inline graphic 0.82 0.11
Inline graphic 0.79 0.12

In the second simulation study, we consider Model W with the priors mentioned in Section 4.1. Since this model is suitable for censored data, we consider a variable censoring level Inline graphic drawn from the prior given in Section 4.1. Figure 3 shows the performance of the trained NBE; estimates are quite accurate overall, but with some bias for large Inline graphic close to the prior support upper bound. We observe from the right panel of Figure 3 that the two regimes of extremal dependence are well captured; in particular, Inline graphic of the samples exhibiting asymptotic dependence (i.e., Inline graphic) were estimated to be AD, while Inline graphic of samples exhibiting asymptotic independence (i.e., Inline graphic) were correctly estimated to be AI.

Fig. 3.

Fig. 3

Assessment of the NBE for Model W with parameters Inline graphic for a sample size of Inline graphic The points highlighted in different shapes and colours refer to parameter configurations used for further diagnostics (see Figure 4)

As with the first study, we assess the uncertainty of the NBE through non-parametric bootstrap and by training a neural interval estimator. Coverage probabilities of the Inline graphic uncertainty intervals and their average length are shown in Table 3. The coverage probabilities are once again better using the trained neural interval estimator, with wider intervals on average. Figure 4 shows the extremal dependence measure Inline graphic from Equation 3.1 computed as a further diagnostic for the four parameter configurations highlighted in Figure 3 at several thresholds Inline graphic where Inline graphic is the censoring level. Despite the under/over-estimation by the NBE, e.g., shown by the vector of parameters in red, the extremal dependence behaviour is well captured. This is further supported by the fairly good coverage probabilities of Inline graphic confidence intervals for Inline graphic at levels Inline graphic Coverage probabilities, reported in Table 4, are computed from estimates obtained from new data sets for 1000 parameter configurations, each computed with a fixed censoring level Inline graphic As a final diagnostic, we compare the joint tail behaviour along different rays. Transforming the model variables, Inline graphic and Inline graphic into standard exponentially distributed variables, Inline graphic and Inline graphic respectively, we compute the joint probability Inline graphic and its empirical counterpart for two different rays Inline graphic and Inline graphic The results for three parameter configurations exhibiting asymptotic independence are given in Figure 5. There is a very good agreement between the estimated and empirical joint probabilities for both rays considered, supporting the efficacy of the trained NBE.

Table 3.

Coverage probability and average length of the Inline graphic uncertainty intervals obtained via a non-parametric bootstrap procedure and via the neural interval estimator averaged over 1000 models fitted using a NBE (rounded to 2 decimal places)

Parameter Bootstrap procedure Interval estimator
Coverage Length Coverage Length
Inline graphic 0.76 3.59 0.96 6.68
Inline graphic 0.84 0.49 0.98 0.81

Fig. 4.

Fig. 4

Empirical Inline graphic (in grey), true Inline graphic (in cyan) and model-based Inline graphic estimated via the NBE with four different parameter configurations (in colour) for Inline graphic where Inline graphic is the corresponding censoring level. A comparison with model Inline graphic estimated via censored maximum likelihood inference is given in pink. The 95Inline graphic confidence bands, representing uncertainty in empirical estimates, were obtained by boostrapping

Table 4.

Coverage probability and average length of the Inline graphic confidence intervals for Inline graphic at levels Inline graphic obtained via a non-parametric bootstrap procedure averaged over 1000 models fitted using a NBE (rounded to 2 decimal places)

Inline graphic Coverage Length
Inline graphic 0.91 0.06
Inline graphic 0.89 0.09
Inline graphic 0.88 0.09

Fig. 5.

Fig. 5

Empirical (in grey), true (in pink) and model-based Inline graphic estimated via the NBE with three different parameter configurations (in colour) for Inline graphic where Inline graphic is the corresponding censoring level. The 95Inline graphic confidence bands, representing uncertainty in empirical estimates, were obtained by boostrapping

Comparison with censored maximum likelihood estimation

Finally, we compare estimates obtained by the NBE and those obtained by the censored maximum likelihood estimation (CMLE) procedure, using the same censoring scheme as outlined in Wadsworth et al. (2017). We first compute the CMLE for the four parameter configurations highlighted in Figure 3, and the corresponding estimates for Inline graphic for Inline graphic Results based on the CMLE, shown by the pink lines in Figure 4, are almost identical to those obtained using the NBE. Then, from the assigned prior distributions, we generate 5 different parameter vectors Inline graphic, censoring levels Inline graphic with corresponding data sets from Model W, each with a sample size of 1000. We then simulate data sets from each configuration 100 times. Figure 6 shows boxplots comparing the sampling distribution of the estimators and the corresponding Inline graphic for two parameter vectors: Inline graphic with censoring level Inline graphic and Inline graphic with Inline graphic (rounded to 2 decimal places). The remaining three cases are given in Section S2.2.1 of the Supplementary Material. Estimates given by the NBE are slightly more biased, but often less variable than the CMLE. Despite this small bias, estimates provided by the NBE are still relatively accurate whilst being much faster to obtain. In particular, the NBE took on average 0.676 seconds to evaluate, whereas the censored MLE took 183 seconds on average—a 225-fold speed-up.

Fig. 6.

Fig. 6

Comparison between parameter estimates Inline graphic given by CMLE (orange) and by NBE (red), and corresponding Inline graphic for 100 samples with Inline graphic The true parameters are given by the red line. (a) Inline graphic with censoring level Inline graphic and (b) Inline graphic with censoring level Inline graphic

To assess the effect of treating the sample size n and/or censoring level Inline graphic as a random variable, we perform a similar study considering fixed censoring level Inline graphic with either fixed Inline graphic or variable sample size. The results are presented in Sections S2.2.2 and S2.2.3 of the Supplementary Material, respectively. Although the overall findings are similar, slightly higher coverage probabilities and shorter intervals, are obtained when n and Inline graphic are fixed.

Model selection assessment

Here we investigate the performance of the NBC for model selection, using the procedure outlined in Section 2.2. For each sampled model m during the training step, a data set Inline graphic is generated with a random sample size n, a random censoring level Inline graphic and a random vector of model parameters Inline graphic using the priors defined in Section 4.1. We demonstrate the performance of the trained NBC for the four models mentioned in Section 3.3, with censoring at level Inline graphic. The neural network architecture used for the model selection procedure is given in Table S12 of the Supplementary Material. We have compared all possible pairs among the four models, resulting in Inline graphic, and all models simultaneously, resulting in Inline graphic. Each model is selected with probability 1/K, and the sample simulated from that model is of size Inline graphic The class which has the highest output probability is the assigned model for the data set. We also compare the NBC with model selection via the Bayesian information criterion (BIC). This requires optimisation of the CMLE, which is time-consuming. However, we wish to explore how well the NBCs perform in comparison to established likelihood-based methods.

Figure 7 shows the assessment of the NBC when Inline graphic For this study, the proportions of correctly identified models (i.e., the models with the highest posterior probability matching the one from which data were simulated) with the NBC are always above Inline graphic with an average of Inline graphic whilst through BIC these are above Inline graphic with an average of Inline graphic Aside from the cases where the choice is between Model W and Model E2 or between Model HW and Model E2, the NBC and the likelihood-based BIC perform comparably, with the selection procedure through the NBC being quicker than using the BIC as no likelihood evaluation is needed. Finally, the uncertainty of the NBCs is assessed through a bootstrap procedure. Given Inline graphic samples, the Inline graphic confidence intervals for the proportions of correctly identified data sets are computed for each model and NBC; these results are reported in the middle bar plots of Figure 7.

Fig. 7.

Fig. 7

Proportion (in Inline graphic) of correctly identified data sets when Inline graphic through the NBC (middle) and through BIC (right) for the six pairs of models considered. The true counts of data sets generated from model Inline graphic (red) and from model Inline graphic (orange) are given in the left bar plot. The Inline graphic confidence intervals for the proportions of correctly identified data sets by the NBC are given in brackets

Results for the case when Inline graphic are displayed in Figure 8. Similarly to the previous case, the uncertainty of the NBC is assessed via a bootstrap procedure with Inline graphic bootstrap samples; the Inline graphic confidence intervals for the proportions obtained by the NBC are shown in the middle bar plot. The resulting proportions achieved through the NBC are all above Inline graphic with an average of Inline graphic whereas via the BIC they are above Inline graphic with and average of Inline graphic The proportions obtained via the BIC are generally lower than the ones obtained with the NBC apart from Model W, which indicates that the NBC correctly identifies the data sets more frequently than the BIC, and in a quicker way.

Fig. 8.

Fig. 8

Proportion (in Inline graphic) of correctly identified data sets when Inline graphic through the NBCs (middle) and through BIC (right). The true counts of data sets generated from models Inline graphic (red), Inline graphic (light red), Inline graphic (orange) and Inline graphic (light orange) are given in the left bar plot. The Inline graphic confidence intervals for the proportions of correctly identified data sets by the NBC are given in brackets

To assess the impact of the sample size on the performance of the NBC, and how this compares with the BIC, we have conducted a similar study, drawing 500 model indices, and simulating with a range of sample sizes Inline graphic The results are presented in Section S3.1 of the Supplementary Material. This shows that, across the training range, Inline graphic, the NBC outperforms BIC for small n, while the BIC is slightly better for larger n. Outside of the training range, at Inline graphic, the NBC still exhibits good performance. Interestingly the BIC is worse for Inline graphic than for Inline graphic. This non-intuitive result may reflect sampling variability, numerical problems, or convergence to local rather than global minima; however, further investigations did not reveal any convincing explanation for the reduced performance of the BIC for larger n, and the computationally-intensive nature of the likelihood-based methods means that it is hard to conduct more repetitions to confirm such conjectures.

Misspecified scenarios

We now examine the performance of the model selection and subsequent parameter estimation procedure in a misspecified scenario, where the underlying data do not come from one of the models considered. We consider two different situations and, in both cases, model selection is first done using the NBC, followed by estimation of the model parameters using the NBE trained for the selected models. A comparison with classical model selection and inference tools is also provided.

For the first study, we generate 100 samples, each with Inline graphic from a Gaussian copula with correlation parameter Inline graphic and consider a censoring level of Inline graphic The proportion of times each model was selected through the NBC and BIC is given on the top of Table 5, and the proportion of AD and AI samples identified by the NBE and CMLE is on the bottom. Model HW is the most suitable one according to either selection procedure, with the NBC selecting it Inline graphic of the time and the BIC Inline graphic of the time. This is to be expected given the nature of the underlying data and the model assumptions, i.e., we are assuming that Inline graphic follows a Gaussian copula in Model HW, such that the Gaussian copula arises as a limiting special case of the model as Inline graphic; this implies that Model HW is the least misspecified model in this case. Both inference procedures are able to capture the correct extremal dependence structure. In particular, according to the NBE and CMLE, Inline graphic and Inline graphic of the samples, respectively, exhibit AI, which is in agreement with the underlying data since Gaussian data are known to be AI. According to the NBE, the two samples identified as coming from Model E1 exhibit AD, with estimated values (and corresponding Inline graphic confidence intervals) Inline graphic and Inline graphic For the CMLE, three of the samples identified as coming from Model W are AD; for these, the estimates for Inline graphic are close to 0, specifically Inline graphic and Inline graphic As a further diagnostic, we compute Inline graphic estimates at three levels Inline graphic for the selected models, and compare with the true Inline graphic at each level. The results are given in Figure 9. The estimates obtained with either inference method are concentrated around the true value, indicating that both the NBE and CMLE are able to capture the true extremal dependence structure quite well. In Section S4 of the Supplementary Material we describe an individual example, where the proposed toolbox for model selection and inference is presented in detail. The results obtained through this individual example agree with the findings of this study.

Table 5.

Proportion of times each model was selected through the NBC and through BIC (top), and proportion of AD and AI samples identified by the NBE and CMLE (bottom). All the values are rounded up to 2 decimal places

Model NBC BIC
Model W 0.02 0.30
Model HW 0.88 0.69
Model E1 0.02 0.00
Model E2 0.08 0.01
Method AD AI
NBE 0.02 0.98
CMLE 0.03 0.97

Fig. 9.

Fig. 9

Model-based estimates of Inline graphic given by the NBE (red) and by the CMLE (orange) for levels Inline graphic and for 100 samples of (a) a Gaussian copula with correlation parameter Inline graphic and Inline graphic and of (b) a logistic distribution with dependence parameter Inline graphic and Inline graphic For both cases, the true Inline graphic value is given by the dashed red lines

For the second case, we generate 100 samples, each with Inline graphic from a logistic distribution (Gumbel 1960) with dependence parameter Inline graphic (the smaller Inline graphic the stronger the extremal dependence) and consider a censoring level of Inline graphic The proportion of times each model was selected and the proportion of AD and AI samples identified by the NBE and CMLE are given in Table 6. For this case, the model selection procedures differ, with the NBC selecting Model HW Inline graphic of the time, and the BIC selecting Model W as the most suitable one in Inline graphic of cases. Additionally, the CMLE correctly identifies all of the samples to be AD, whereas the NBE misclassifies 16 of the samples fitted with Model HW as being AI. For these 16 samples, the estimated values for Inline graphic are near 0.5 (precisely Inline graphic), the boundary point for AI, in 12 samples. Moreover, in all 16 samples, the boundary point Inline graphic is within the Inline graphic uncertainty intervals. The estimates for Inline graphic at three levels Inline graphic are shown in Figure 9. Contrarily to the previous case, the NBE somewhat under-estimates the true Inline graphic of the logistic distribution, while the CMLE under-estimates it slightly only at higher levels. Moreover, the estimates provided by the NBE exhibit higher variability than the CMLE. As with the first specification in the section, an individual example is presented in Section S4 of the Supplementary Material. Similarly to this study, Model HW is selected as the most suitable one to fit the data and seems to under-estimate the true Inline graphic for Inline graphic

Table 6.

Proportion of times each model was selected through the NBC and through BIC (top), and proportion of AD and AI samples identified by the NBE and CMLE (bottom). All the values are rounded up to 2 decimal places

Model NBC BIC
Model W 0.18 0.42
Model HW 0.79 0.21
Model E1 0.02 0.08
Model E2 0.01 0.29
Method AD AI
NBE 0.84 0.16
CMLE 1.00 0.00

Case study: changes in geomagnetic field fluctuations

Data and background

The behaviour of the sun and the consequences of its interaction with the Earth’s magnetic field and atmosphere are known as space weather events. Examples include phenomena such as the auroras, often known as Southern and Northern lights, or solar storms. These events can cause large fluctuations in the geomagnetic field, leading to geomagnetically induced currents (GICs), which are electrical currents generated at the surface of the planet by rapid changes in the magnetic field. Furthermore, GICs can cause disruptions on power grids, communication systems, railway systems, and other critical infrastructures. Thus, the modelling of extreme solar activity can help prevent the impacts of GICs.

Following Rogers et al. (2020), we use the rate of change of the horizontal component of geomagnetic field, Inline graphic which is available through the SuperMAG interface (Gjerloev 2009), as a measure of the magnitude of GICs. In particular, we apply the proposed toolbox to select and make inference on the pairwise extremal dependence structure between measurements at three pairs of locations in the northern hemisphere: two in Greenland and one in the east coast of Canada (see Table 7)—to assess whether a large magnitude of GICs occurring in one location has an effect on another location. We take daily maximum absolute one-minute changes in Inline graphic which results in 7572 complete observations. However, since the estimators are trained for sample sizes between 100 and 1500, we take a subset of the data set with Inline graphic retaining every 5th observation in order to reduce the temporal dependence present in the data, and truncate the resulting data set to 1500 observations by removing the last few. Figure 10 shows the scatterplots of pairwise daily maxima absolute one-minute changes in Inline graphic between the pairs of locations considered. We first transform the data to uniform margins using the semi-parametric approach of Coles and Tawn (1991) with a generalised Pareto distribution (GPD) fit to the tail of the data. Thus, the cdf of each margin is estimated via

graphic file with name d33e4461.gif

where Inline graphic is the empirical distribution function, Inline graphic is the estimated probability of exceeding a selecting high threshold r, and Inline graphic and Inline graphic are the estimated scale and shape parameters of the GPD, respectively. In particular, with r as the Inline graphic marginal quantile of the data, we have Inline graphic for SCO, Inline graphic for STF, and Inline graphic for STJ.

Table 7.

International Association of Geomagnetism and Aeronomy (IAGA) code, and location of the observatory for the three locations considered

IAGA code Observatory (Country) Latitude Longitude
SCO Scoresby Sund 2 (Greenland) 70.48 Inline graphic
STF Sdr Stromfjord (Greenland) 67.02 Inline graphic
STJ St. John’s (Canada) 47.60 Inline graphic

Fig. 10.

Fig. 10

Daily maxima absolute one-minute changes in Inline graphic measurements between three pairs of locations: (SCO, STF) on the left, (SCO, STJ) in the middle, and (STF, STJ) on the right

Statistical inference

We are interested in modelling the joint extremal behaviour of Inline graphic between each pair of locations, so we focus on the four models mentioned in Section 3.3, and censor the non-extreme observations; we do so by taking Inline graphic as the censoring threshold. We note, however, that we have considered a range of censoring levels and summarise these results in Section S5 of the Supplementary Material. We start by applying our NBC to select the best model and estimate its parameters through the corresponding trained NBE; the results are shown in Tables 8, 9 and 10 for pairs (SCO, STF), (SCO, STJ) and (STF, STJ), respectively. The fit of the preferred model is then assessed by comparing the estimated dependence measure Inline graphic with its empirical counterparts for levels Inline graphic As extra comparisons, the estimated measures for the model with the second highest posterior probability are also obtained, and a Bayesian model averaged approximation of Inline graphic is computed, by setting Inline graphic where Inline graphic and Inline graphic are the posterior probabilities and estimated Inline graphic for Inline graphic Finally, a comparison with the results obtained through censored MLE is also provided; the results for Inline graphic are shown in Figure 11, where the confidence bands for empirical estimates are obtained via block bootstrap with a block length of 10 to reflect the remaining temporal dependence present in the data.

Table 8.

Model selection procedure obtained through the NBC for censoring level Inline graphic and parameter estimates given by the trained NBE for pair (SCO, STF). The results through censoring MLE and BIC are given in the bottom table. All the values are rounded to 3 decimal places

Model Inline graphic Inline graphic Extremal dependence
W Inline graphic Inline graphic AD
HW Inline graphic Inline graphic AI
E1 Inline graphic Inline graphic AI
E2 0.078 Inline graphic AI
Model BIC Inline graphic Extremal dependence
W 226.785 Inline graphic AD
HW 215.897 Inline graphic AI
E1 214.556 Inline graphic AI
E2 Inline graphic Inline graphic AI

Table 9.

Model selection procedure obtained through the NBC for censoring level Inline graphic and parameter estimates given by the trained NBE for pair (SCO, STJ). The results through censoring MLE and BIC are given in the bottom table. All the values are rounded to 3 decimal places

Model Inline graphic Inline graphic Extremal dependence
W 0.029 Inline graphic AI
HW 0.072 Inline graphic AI
E1 Inline graphic Inline graphic AI
E2 Inline graphic Inline graphic AI
Model BIC Inline graphic Extremal dependence
W 390.990 Inline graphic AI
HW Inline graphic Inline graphic AI
E1 396.119 Inline graphic AI
E2 393.674 Inline graphic AI

Table 10.

Model selection procedure obtained through the NBC for censoring level Inline graphic and parameter estimates given by the trained NBE for pair (STF, STJ). The results through censoring MLE and BIC are given in the bottom table. All the values are rounded to 3 decimal places

Model Inline graphic Inline graphic Extremal dependence
W 0.308 Inline graphic AI
HW 0.019 Inline graphic AI
E1 Inline graphic Inline graphic AI
E2 Inline graphic Inline graphic AI
Model BIC Inline graphic Extremal dependence
W 398.908 Inline graphic AI
HW Inline graphic Inline graphic AI
E1 401.390 Inline graphic AI
E2 409.988 Inline graphic AI

Fig. 11.

Fig. 11

Empirical (in grey) and model Inline graphic estimated via the NBE for Inline graphic for the models with the two highest posterior probabilities. For each pair, the estimated Inline graphic for the selected model is given by the thick line, followed by its estimate for the model with the second highest probability given by the dashed line. The BMA approximation of Inline graphic is given by the pink line. Note that this may overlap with the estimated Inline graphic for the model with the highest posterior probability. Estimated model Inline graphic for the selected model through BIC is given by the purple line. The 95Inline graphic confidence bands were obtained by block boostrapping

For pair (SCO, STF), Model HW is clearly the selected model with a probability of 0.922 followed by Model E2 with probability 0.078. As can be seen by the estimates given by the parameters of interest, Inline graphic and Inline graphic respectively, both models indicate the presence of asymptotic independence in the data. The same is not true for Model W. It can be seen on the left panel of Figure 11 that models HW and E2 (in blue and orange, respectively) seem to capture the extremal dependence of data well. According to the BIC, however, Model E2 is the most appropriate to fit this pair. Like the NBE estimates, the CMLE estimates for this model indicate the presence of asymptotic independence, which is in agreement with the estimates obtained by the NBE and CMLE for models HW and E1. Furthermore, the estimated Inline graphic given by the CMLE (in purple) almost overlaps with the obtained Inline graphic with Model E2. When censoring below a range of thresholds, Model E2 or HW were consistently the preferred choices, both indicating asymptotic independence.

Model E2 is clearly selected as the best model to fit pair (SCO, STJ) with a posterior probability of 0.9. However, as shown by the middle panel of Figure 11, the estimated Inline graphic measure (in orange) is somewhat below the empirical estimate for higher levels u. In turn, the estimated measure Inline graphic given by Model HW (in blue) is closer to its empirical counterpart further in the tail, suggesting a better fit of the dependence structure in the limit. Although small, the probability for Model HW given by the NBC is the second highest, followed closely by Model W. For this pair, all four models indicate the presence of asymptotic independence through the estimates given by the NBE and CMLE. Contrarily to the NBC, BIC selects Model HW as the best model to fit the data, with a very small difference compared to model W. The estimated Inline graphic highlighted in purple, is also able to capture the extremal dependence well, particularly further in the tail. Similarly to the first pair, Model HW or E2 were selected as the preferred fit for pair (SCO, STJ) for a range of censoring levels, both models indicating asymptotic independence.

For the final pair (STF, STJ), Model E2 is again selected as the preferred model with a probability of 0.672. Model W closely follows with a posterior probability of 0.308. However, Model E2 has the highest BIC value, indicating that, in the likelihood framework, any of the other models would provide a better fit for this pair. The right panel of Figure 11 shows that Model E2 (in orange) leads to an estimate below the empirical Inline graphic for all levels u considered, whilst Model HW (obtained by CMLE and shown in purple) gives an estimate slightly above the empirical value of Inline graphic On the other hand, Model W (in green) best captures the extremal dependence structure over most of the range. Despite this, all models indicate asymptotically independent variables; this is also in agreement with the estimates obtained by censored maximum likelihood inference. Interestingly enough, the estimated value of parameter Inline graphic of Model E1 given by either approach is very close to 1. When considering different censoring thresholds, the NBC consistently chose either Model HW or E2 as the best fit for the pair (STF, STJ), both models indicating asymptotic independence across all censoring levels.

A few conclusions can be drawn from these results. For instance, although the selected model may not always align most closely with the empirical Inline graphic, a good representation can still be achieved if the model with the second highest probability is considered instead; furthermore the majority of Inline graphic estimates remained in the pointwise 95% confidence intervals for the empirical estimates. When considering a BMA approximation of Inline graphic the influence of the model selected through the NBC is clear. Additionally, with the proposed toolbox, we are not only able to infer about some model characteristics, but also able to assess the sensitivity to the censoring threshold by considering a range of different levels Inline graphic In particular, from the results obtained for the range of Inline graphic considered (see Section S5 of the Supplementary Material), we can see that, for lower censoring levels, Model HW is clearly the preferred one to fit the three pairs, with posterior probabilities above 0.9 in all cases. This changes for censoring levels Inline graphic or Inline graphic for pair (SCO, STF), for which Model E2 is the most suitable one to fit the data according to the NBC. In all cases, the selected models consistently indicate the presence of asymptotic independence in each pair. This sensitivity analysis to the censoring level is computationally expensive in a likelihood-based inference method, where the likelihood needs to be evaluated for all considered models across various censoring levels. Likelihood estimation can indeed be about 7300 times slower than using the NBE, especially for Models E1 or E2, where the code is not as efficient as for Models W or HW. This leads to the need for choosing a censoring level before the analysis, which might end up not being the most suitable one for the underlying application.

Conclusion and discussion

In some situations, the likelihood function of a model may be available but its evaluation may be computationally costly. In multivariate extremes, this is often due to the need for numerical inversion of functions, and numerical integration. This computational burden in the inference process poses limitations on the use of certain models in practice since modelling usually entails consideration of different candidate models and threshold levels. In this paper, we exploited the use of neural Bayes estimators, a modern likelihood-free approach which uses neural networks, to perform inference on the vector of model parameters. In particular, we focused on two types of models which are available in the multivariate extremes literature: a weighted copula model, which is able to represent both the body and tail regions of a data set, and models based on random scale constructions, which are flexible enough to capture the two regimes of extremal dependence, interpolating between the two in the interior of the parameter space. When likelihood evaluation is no longer required, model selection criteria such as the AIC or BIC are now unavailable for determining the best-fitting model. We overcame this by proposing a neural Bayes classifier which allows us to choose the most suitable model from candidates models in a fast and effective manner.

For the models where it is feasible—albeit relatively slow—to evaluate the likelihood function, we compared the performance of the neural Bayes estimators and NBC with (censored) maximum likelihood inference and BIC, respectively. Through simulation studies, we have shown that NBEs perform quite well overall, though they tend to be slightly more biased than the (censored) MLE in some cases; however, they also sometimes exhibit lower variability. Moreover, when estimating tail quantities of interest, such as the extremal measures Inline graphic from Equation 3.1, we did not find the bias to be problematic, as the overall dependence structure appeared to be well captured with the trained NBEs anyway. Nevertheless, the bias of the estimates is reflected by lower coverage probabilities when using bootstrap-based credible intervals. Whilst coverage probabilities significantly improved when we trained a neural interval estimator, obtaining a value close to nominal, it would be ideal to also obtain such values with bootstrap-based intervals as we would only need to train the estimator once using a single loss function. Despite this, since the neural Bayes estimates are considerably faster to obtain than the (censored) MLE, which may also sometimes converge to local rather than global minima, and the extremal dependence structure is generally well captured, the methodology may be considered preferable overall.

Given the symmetry of all models considered, an estimator that is invariant to permutations of the vector components Inline graphic would be desirable. However, this is not achieved with the DeepSets architectures mentioned in Section 2.1, which results in different estimates when considering Inline graphic and Inline graphic. We investigated this issue by creating an alternative estimator that is the average of the NBE obtained with inputs Inline graphic and Inline graphic, but the results were almost indistinguishable from the basic approach presented.

When comparing the NBC with the BIC for model selection, both procedures performed similarly with Inline graphic candidate models. However, when Inline graphic and Inline graphic, the NBC was able to correctly categorise more data sets than the BIC for all considered models, except Model W. As shown in Section S3.1 of the Supplementary Material, this conclusion also holds for smaller sample sizes. Interestingly in Section 5, the BIC and NBC often displayed large disagreements in the selected model. While all selected models generally performed adequately, it could be of interest in further work to explore the effect of being on the boundary of our set of simulated sample sizes. We also demonstrated the possibility of using the NBC as part of Bayesian model averaging-like approach to estimate measures of interest such as Inline graphic. However, full Bayesian model averaging requires complete posterior distributions rather than individual estimates. Combining the NBC with neural posterior approximations such as normalising flows (Radev et al. 2023) would be beneficial for amortised BMA, and presents an interesting area for future research.

We have shown that the proposed toolbox for model selection and inference performs well—though not always as accurately as classical likelihood inference—for misspecified scenarios where the data set does not originate from one of the models considered in this paper, with the extremal dependence structure being generally well captured. In particular, through repeated simulation, we showed that the NBC and NBE captured the true extremal dependence structure the majority of the times, especially for asymptotically independent data. Further investigation on the performance of NBEs in misspecified scenarios is an important future line of research. An alternative and interesting line for further research is to adapt the current framework to incorporate an unobserved model class Inline graphic into the model selection framework when there is sufficient evidence that the data is not generated by any of the K candidate parametric models.

In all our examples, we assumed the parameters to be uniformly distributed a priori. However, we note this implies non-uniform priors in alternative parameterisations and we did not assess the effect of this choice on the performance of the trained NBE. Despite this, for studies involving the weighted copula model from Section 3.4, we found that reparameterising some of the model parameters (see Section S2.1 of the Supplementary Material) helped the neural network learn about them in the training step of the NBE. More specifically, the assessment of the NBE showed less variability and higher coverage probabilities (with narrower range) of the Inline graphic uncertainty intervals for each model parameters obtained with bootstrap-based intervals. Additionally, the (censored) MLE only depends on the likelihood function as opposed to the NBE, which relies on the choice of a prior. While the (C)MLE is the most used likelihood-based inference method in the extremes literature, it would be of interest to incorporate the same prior belief and obtain a (censored) maximum a posteriori (MAP) estimate instead. Investigating and comparing the performance of the (C)MAP with the NBE in our bivariate copula context presents an interesting avenue for further research.

We restricted our analysis to the bivariate setting. Each of the random scale models described in Section 3.3 could be expanded to higher dimensions; however, this may not be as useful since the models considered are only suitable when all the variables are asymptotically dependent or asymptotically independent. On the other hand, the dynamic mixture model could usefully be extended to higher dimensions, and the benefits of NBEs may be even clearer in this setting as the complexity of the likelihood increases with dimension for this model.

The proposed toolbox has potential to be extended to other settings, such as online learning, change-point detection, and trend estimation problems. In particular, recent work has explored deep learning techniques for change-point detection (see, e.g., Li et al. 2024). Within our framework, a prior on the number and position of change-points could be used and a neural estimator could then be trained under a suitable loss function. This would allow estimating change-points simultaneously with the other model parameters. For capturing trends, we could incorporate covariates into the analysis. However, to amortise over covariate values, a suitable prior model for the covariates would be required. Depending on the application, this might not be straightforward to specify.

Supplementary information

Supplementary Material for ‘Neural Bayes estimation and selection of complex bivariate extremal dependence models’: File containing additional results and figures. (supplementary.pdf)

Supplementary Information

Below is the link to the electronic supplementary material.

Acknowledgements

We are grateful to the two anonymous reviewers and editors for constructive comments and suggestions that have improved this article. This paper is based on work completed while Lídia André was part of the EPSRC funded STOR-i Centre for Doctoral Training (EP/S022252/1). The research of Lídia André was also partially supported financially by the Fonds de la Recherche Scientifique—FNRS, Belgium (grant number T.0203.21). We are thankful to Matthew Sainsbury-Dale and Andrew Zammit-Mangion for providing useful feedback to help improve this paper. We are also grateful to Matthew Sainsbury-Dale for all the help with the code and implementation of the bilinear layers used to handle censored multivariate data, and Jordan Richards for the support in the computational implementation of framework for the censored data. The ground magnetometer data were provided by SuperMAG (available from https://supermag.jhuapl.edu/) and we gratefully acknowledge Jim Wild, Emma Eastoe and Neil Rogers for sourcing them, as well as contributions from the SuperMAG collaborators: EMMA; The MACCS program; CARISMA and AALPIP. We are grateful to Neil Rogers for processing the data as described in Rogers et al. (2020).

Author Contributions

All authors contributed to the development of the core ideas of the paper. Raphaël Huser contributed primarily to the inference methodology, while Jennifer Wadsworth contributed substantially in discussions on the simulation and case study analysis, and provided code to implement the models of Engelke et al. (2019). Lídia André developed all other code and performed all the simulation and case studies. The first draft of the manuscript was written by Lídia André, and all authors commented on previous versions. All authors read and approved the final version of the manuscript.

Funding

This work was fully supported by EPSRC grant number EP/S022252/1 and partially by the Fonds de la Recherche Scientifique–FNRS, Belgium (grant number T.0203.21).

Data Availability

The ground magnetometer data were provided by SuperMAG (available from https://supermag.jhuapl.edu/).

Code Availability

Code supporting the findings of this study are available on https://github.com/lidiamandre/NBE_classifier_depmodels.

Declarations

Competing interests

The authors declare no competing interests.

Ethical Approval and Consent to Participate

Not Applicable

Consent for Publication

Not Applicable

Footnotes

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

References

  1. Ahmed, M., Maume-Deschamps, V., Ribereau, P.: Recognizing a spatial extreme dependence structure: A deep learning approach. Environmetrics 33(4), e2714 (2022) [Google Scholar]
  2. Ahmed, M., Maume-Deschamps, V., and Ribereau, P.: Model selection for extremal dependence structures using deep learning: Application to environmental data (2024). arXiv:2409.13276
  3. Alenlöv, J., Doucet, A., Lindsten, F.: Pseudo-marginal Hamiltonian Monte Carlo. J. Mach. Learn. Res. 22(141), 1–45 (2021) [Google Scholar]
  4. André, L., Wadsworth, J., O’Hagan, A.: Joint modelling of the body and tail of bivariate data. Comput. Stat. Data Anal. 189, 107841 (2024) [Google Scholar]
  5. Andrieu, C., Roberts, G.O.: The pseudo-marginal approach for efficient Monte Carlo computations. Ann. Stat. 37(2), 697–725 (2009) [Google Scholar]
  6. Beaumont, M.A.: Estimation of population growth or decline in genetically monitored populations. Genetics 164, 1139–1160 (2003) [DOI] [PMC free article] [PubMed] [Google Scholar]
  7. Cannon, A.J.: A flexible nonlinear modelling framework for nonstationary generalized extreme value analysis in hydroclimatology. Hydrol. Process. 24, 673–685 (2010) [Google Scholar]
  8. Cisneros, D., Richards, J., Dahal, A., Lombardo, L., Huser, R.: Deep graphical regression for jointly moderate and extreme Australian wildfires. Spatial Statistics 59, 100811 (2024) [Google Scholar]
  9. Claeskens, G. and Hjort, N. L.: Model selection and model averaging. Cambridge books (2008)
  10. Clauer, C.R., Kim, H., Deshpande, K., Xu, Z., Weimer, D., Musko, S., Crowley, G., Fish, C., Nealy, R., Humphreys, T.E., Bhatti, J.A., Ridley, A.J.: An autonomous adaptive low-power instrument platform (AAL-PIP) for remote high-latitude geospace data collection. Geoscientific Instrumentation, Methods and Data Systems 3(2), 211–227 (2014) [Google Scholar]
  11. Coles, S.G., Tawn, J.A.: Modelling extreme multivariate events. J. Roy. Stat. Soc. B 53(2), 377–392 (1991) [Google Scholar]
  12. Cranmer, K., Pavez, J., and Louppe, G.: Approximating likelihood ratios with calibrated discriminative classifiers (2016). arXiv:1506.02169v2
  13. Dell’Oro, L., Gaetan, C.: Flexible space-time models for extreme data. Spatial Statistics 68, 100916 (2025) [Google Scholar]
  14. Dombry, C., Ribatet, M., Stoev, S.: Probabilities of concurrent extremes. J. Am. Stat. Assoc. 113(524), 1565–1582 (2018) [Google Scholar]
  15. Engebretson, M.J., Hughes, W.J., Alford, J.L., Zesta, E., Cahill, L.J., Jr., Arnoldy, R.L., Reeves, G.D.: Magnetometer array for cusp and cleft studies observations of the spatial extent of broadband ULF magnetic pulsations at cusp/cleft latitudes. J. Geophys. Res. Space Physics 100(A10), 19371–19386 (1995) [Google Scholar]
  16. Engelke, S., Opitz, T., Wadsworth, J.: Extremal dependence of random scale constructions. Extremes 22, 623–666 (2019) [Google Scholar]
  17. Gjerloev, J.W.: A global ground-based magnetometer initiative. EOS Trans. Am. Geophys. Union 90(27), 230–231 (2009) [Google Scholar]
  18. Gong, Y., Huser, R.: Asymmetric tail dependence modeling, with application to cryptocurrency market data. The Annals of Applied Statistics 16(3), 1822–1847 (2022) [Google Scholar]
  19. Gong, Y., Huser, R.: Flexible modeling of multivariate spatial extremes. Spatial Statistics 52, 100713 (2022) [Google Scholar]
  20. Goodfellow, I., Bengio, Y., Courville, A.: Deep Learning. MIT Press (2016)
  21. Gumbel, E.J.: Bivariate exponential distributions. J. Am. Stat. Assoc. 55(292), 698–707 (1960) [Google Scholar]
  22. Heffernan, J.E., Tawn, J.A.: A conditional approach for multivariate extreme values (with discussion). Journal of the Royal Statistical Society: Series B (Statistical Methodology) 66, 497–546 (2004) [Google Scholar]
  23. Hermans, J., Begy, V., and Louppe, G.: Likelihood-free MCMC with amortized approximate ratio estimators. In Proceeding of the 37th International Conference on Machine Learning (2020)
  24. Hoeting, J. A., Madigan, D., Raftery, A. E., and Volinsky, C. T.: Bayesian model averaging: a tutorial (with comments by M. Clyde, David Draper and EI George, and a rejoinder by the authors. Statistical science, 14(4):382–417 (1999)
  25. Hornik, K., Stinchcombe, M., White, H.: Multilayer feedforward networks are universal approximators. Neural Netw. 2(5), 359–366 (1989) [Google Scholar]
  26. Huser, R., Davison, A.C., Genton, M.G.: Likelihood estimators for multivariate extremes. Extremes 19, 79–103 (2016) [Google Scholar]
  27. Huser, R., Genton, M.G.: Non-stationary dependence structures for spatial extremes. J. Agric. Biol. Environ. Stat. 21, 470–491 (2016) [Google Scholar]
  28. Huser, R., Wadsworth, J.L.: Modeling spatial processes with unknown extremal dependence class. J. Am. Stat. Assoc. 114(525), 434–444 (2019) [Google Scholar]
  29. Innes, M.: Flux: Elegant machine learning with Julia. Journal of Open Source Software 3(25), 602 (2018) [Google Scholar]
  30. Joe, H.: Multivariate Models and Multivariate Dependence Concepts, 1st edn. Chapman and Hall/CRC, New York (1997) [Google Scholar]
  31. Ledford, A.W., Tawn, J.A.: Statistics for near independence in multivariate extreme values. Biometrika 83(1), 169–187 (1996) [Google Scholar]
  32. Ledford, A.W., Tawn, J.A.: Modelling dependence within joint tail regions. Journal of the Royal Statistical Society: Series B (Statistical Methodology) 59(2), 475–499 (1997) [Google Scholar]
  33. Lehmann, E.L., Casella, G.: Theory of Point Estimation, 2nd edn. Springer, New York (1998) [Google Scholar]
  34. Lenzi, A., Bessac, J., Rudi, J., Stein, M.L.: Neural networks for parameter estimation in intractable models. Comput. Stat. Data Anal. 185, 107762 (2023) [Google Scholar]
  35. Li, J., Fearnhead, P., Fryzlewicz, P., Wang, T.: Automatic change-point detection in time series via deep learning. J. R. Stat. Soc. Ser. B Stat Methodol. 86(2), 273–285 (2024)
  36. Lichtenberger, J., Clilverd, M.A., Heilig, B., Vellante, M., Manninen, J., Rodger, C.J., Collier, A.B., Jørgensen, A.M., Reda, J., Holzworth, R.H., Friedel, R., Simon-Wedlund, M.: The plasmasphere during a space weather event: first results from the PLASMON project. Journal of Space Weather Space Climate 3, A23 (2013) [Google Scholar]
  37. Lintusaari, J., Gutmann, M.U., Dutta, R., Kaski, S., Corander, J.: Fundamentals and recent developments in approximate Bayesian computation. Syst. Biol. 66(1), 66–82 (2017) [DOI] [PMC free article] [PubMed] [Google Scholar]
  38. Majumder, R., Reich, B.J.: A deep learning synthetic likelihood approximation of a non-stationary spatial model for extreme streamflow forecasting. Spatial Statistics 55, 100755 (2023) [Google Scholar]
  39. Majumder, R., Reich, B.J., Shaby, B.A.: Modeling extremal streamflow using deep learning approaximations and a flexible spatial process. The Annals of Applied Statistics 18, 1519–1542 (2024) [Google Scholar]
  40. Mann, I., Milling, D., Rae, I., Ozeke, L., Kale, A., Kale, Z., Murphy, K., Parent, A., Usanova, M., Pahud, D., et al.: The upgraded CARISMA magnetometer array in the THEMIS era. Space Sci. Rev. 141, 413–451 (2008) [Google Scholar]
  41. Murphy-Barltrop, C. J. R., Majumder, R., and Richards, J.: Deep learning of multivariate extremes via a geometric representation (2024). arXiv:2406.19936v2
  42. Murray, I. and Graham, M.: Pseudo-marginal slice sampling. In Artificial Intelligence and Statistics, pages 911–919. PMLR (2016)
  43. Pasche, O.C., Engelke, S.: Neural networks for extreme quantile regression with an application to forecasting of flood risk. The Annals of Applied Statistics 18(4), 2818–2839 (2024) [Google Scholar]
  44. Prechelt, L.: Early Stopping - But When?, pages 55–69. Springer Berlin Heidelberg, Berlin, Heidelberg (1998)
  45. Price, L.F., Drovandi, C.C., Lee, A., Nott, D.J.: Bayesian synthetic likelihood. J. Comput. Graph. Stat. 27(1), 1–11 (2018) [Google Scholar]
  46. Radev, S. T., Schmitt, M., Pratz, V., Picchini, U., Köthe, U., and Bürkner, P.-C. (2023). JANA: Jointly amortized neural approximation of complex Bayesian models. In Proceedings of the 39th Conference on Uncertainty in Artificial Intelligence (UAI 1013), pages 1695–1706
  47. Rai, S., Hoffman, A., Lahiri, S., Nychka, D.W., Sain, S.R., Bandyopadhyay, S.: Fast parameter estimation of generalized extreme value distribution using neural networks. Environmetrics 35(3), e2845 (2024) [Google Scholar]
  48. Richards, J., Alotaibi, N., Cisneros, D., Gong, Y., Guerrero, M. B., Redondo, P. V., and Shao, X.: Modern extreme value statistics for Utopian extremes. EVA (2023) Conference Data Challenge: Team Yalla. Extremes, pages 1–23 (2024a)
  49. Richards, J. and Huser, R.: Regression modelling of spatiotemporal extreme U.S. wildfires via partially-interpretable neural networks (2022). arXiv:2208.07581
  50. Richards, J., Sainsbury-Dale, M., Zammit-Mangion, A., Huser, R.: Neural Bayes estimators for censored inference with peaks-over-threshold models. J. Mach. Learn. Res. 25(390), 1–49 (2024)41334350 [Google Scholar]
  51. Rödder, A., Hentschel, M., and Engelke, S.: Theoretical guarantees for neural estimators in parametric statistics (2025). arXiv:2506.18508
  52. Rogers, N.C., Wild, J.A., Eastoe, E.F., Gjerloev, J.W., Thomson, A.W.P.: A global climatological model of extreme geomagnetic field fluctuations. Journal of Space Weather and Space Climate 10(5), 1–19 (2020) [Google Scholar]
  53. Sainsbury-Dale, M.: NeuralEstimators: Likelihood-free parameter estimation using neural networks. R package version 0.1-2 (2024)
  54. Sainsbury-Dale, M., Zammit-Mangion, A., Huser, R.: Likelihood-free parameter estimation with neural Bayes estimators. Am. Stat. 78(1), 1–14 (2024) [Google Scholar]
  55. Sainsbury-Dale, M., Zammit-Mangion, A., Richards, J., Huser, R.: Neural Bayes estimators for irregular spatial data using graph neural networks. J. Comput. Graph. Stat. 34(3), 1153–1168 (2025) [Google Scholar]
  56. Sisson, S., Fan, Y., and Beaumount, M.: Handbook of Approximate Bayesian Computation. Chapman & Hall/CRC Press (2018)
  57. Sklar, M.: Fonctions de répartition à dimensions et leurs marges. Publications de l’Institut Statistique de l’Université de Paris, VII I(3), 229–231 (1959) [Google Scholar]
  58. Smith, R.L., Tawn, J.A., Coles, S.G.: Markov chain models for threshold exceedances. Biometrika 84(2), 249–268 (1997) [Google Scholar]
  59. Wadsworth, J.L., Tawn, J.A., Davison, A.C., Elton, D.M.: Modelling across extremal dependence classes. J. Roy. Stat. Soc. B 79, 149–175 (2017) [Google Scholar]
  60. Walchessen, J., Lenzi, A., Kuusela, M.: Neural likelihood surfaces for spatial processes with computationally intensive or intractable likelihoods. Spatial Statistics 62, 100848 (2024) [Google Scholar]
  61. Wixson, T. P. and Cooley, D.: Neural network for asymptotic dependence/ independence classification: A series of experiments (2024). 10.21203/rs.3.rs-3994810/v1
  62. Wood, S.N.: Statistical inference for noisy nonlinear ecological dynamic systems. Nature 466(7310), 1102–1104 (2010) [DOI] [PubMed] [Google Scholar]
  63. Zaheer, M., Kottur, S., Ravanbhakhsh, S., Póczos, B., Salakhutdinov, R., and Smola, A. J.: Deep Sets. Advances in Neural Information Processing Systems, 30 (2017)
  64. Zammit-Mangion, A., Sainsbury-Dale, M., Huser, R.: Neural methods for amortized inference. Annual Review of Statistics and Its Application 12, 311–335 (2025) [Google Scholar]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Supplementary Materials

Data Availability Statement

The ground magnetometer data were provided by SuperMAG (available from https://supermag.jhuapl.edu/).

Code supporting the findings of this study are available on https://github.com/lidiamandre/NBE_classifier_depmodels.


Articles from Extremes are provided here courtesy of Springer

RESOURCES