Oskar Laverny
I am currently an associate professor in statistics in Marseille (France). Actuary by formation, I focus my researches on high dimensional statistics and dependence structures estimations, with a lot of applications in insurance, reinsurance, and more recently public health. I do have a taste for numerical code and open-source software, and most of my work is freely available on GitHub.
Sessions
Since 2022, Copulas.jl has provided native support for dependence modeling in Julia. Copulas are multivariate distribution functions on the unit hypercube that allow practitioners to model dependence structures separately from marginal behavior. By building on the Distributions.jl framework, Copulas.jl integrates seamlessly with Julia’s probabilistic and statistical ecosystem.
In this talk, we review the major design improvements and new features introduced since the first public releases of Copulas.jl. The package now offers a broad collection of classical parametric copula families, along with tools for evaluating distribution functions and densities, computing dependence measures such as Kendall’s tau and Spearman’s rho, estimating parameters via inversion of moments or maximum likelihood, and fitting models to data.
A key feature of the package is the Sklar type, inspired by Sklar’s Theorem, which enables users to construct full multivariate models by combining copulas with arbitrary marginal distributions. These composite models are fully compatible with the Distributions.jl API, making them directly usable in downstream tools such as Turing.jl for Bayesian inference.
We conclude with practical examples showcasing how the new features of Copulas.jl enable advanced dependence modeling workflows entirely in native Julia.
Automatic differentiation (AD) is deeply embedded in the Julia ecosystem. Thanks to dual numbers and generic programming, derivatives often “just work” across packages. However, this is not always the case. In certain situations (e.g., when transcendental functions are evaluated via partial fraction expansions) propagating dual numbers through the implementation may fail, and for good numerical reasons.
In this talk, we present the case of beta_inc and beta_inc_inv from SpecialFunctions.jl. Their original implementations relied on partial fraction expansions carefully designed for Float64 evaluation. While this approach yields numerically stable function values, it does not automatically provide correct derivatives under AD. Crucially, differentiating the partial fraction expansion is not equivalent to computing the partial fraction expansion of the derivative — the latter being significantly more involved.
Drawing from the numerical analysis literature (this challenge is not Julia-specific), we implemented exact derivatives for these functions, as proposed in pull request #506. This work enables the standard automatic differentiation tools to handle these functions seemlessly.
These derivatives are central to e.g. statistical computing: they are used in the Beta cumulative distribution and quantile functions, the Student’s t cumulative distribution and quantile functions, and most importantly for us the multivariate Student’s t distribution, which has been asked about several time on discourse. Prior to this work, fully differentiable implementations of these models were not available in Distributions.jl.
This talk goes through the story of SpecialFunctions.jl's pull request #506 titled “Exact chainrules derivatives for beta_inc and beta_inc_inv”, which solves all these issues and will hopefully be merged by Juliacon.