betaFeedback

WorksComputer Science

Variational Learning with Lie Group Exponential Families

Abstract

Variational Bayesian learning for deep neural networks offers many potential benefits. The difficulty in implementation arises from constraints on the parameters of the variational distributions, as well as the need for low-variance gradient estimators. Our recent work proposes Lie group methods for multiplicative or affine groups that naturally overcome such difficulties. Lie groups are essentially parameter spaces with a binary operator such as addition or multiplication, which allows for natural updates within the parameter space. In this article, we streamline and extend our Lie group framework to any general Lie group, and give an explicit relation to standard natural-gradient variational learning methods such as the Bayesian learning rule (BLR). In particular, we prove that linear approximations of the Lie group algorithm give generalizations of the BLR. The key ingredient is the harmonic exponential family, a general class of Lie group exponential families associated to representations of Lie groups. Our work provides a systematic method to construct from such representations efficiently implementable algorithms for variational learning.

Introduction

Variational learning for neural networks ([17, 14]) offers many potential benefits over standard empirical risk minimization and can be used to motivate various deep-learning algorithms ([18]). Some of the benefits of variational learning are improved regularization and reduced overfitting, as suggested by the minimum description length principle ([17, 14, 6, 15]) and PAC-Bayesian bounds ([1]). Depending on the form of the variational posterior, different deep learning algorithms can be obtained, for instance, Adam-like methods [31] for diagonal Gaussians, algorithms for binary neural networks for Bernoulli distributions [25] and biologically plausible multiplicative dynamics for log-normal distributions [30]. The Bayesian viewpoint also offers a fruitful framework for thinking about model adaptation and model understanding, for example, federated and continual learning [27, 3], model merging [24, 12] or sensitivity analysis to perturbations in both the model and data [28].

The de-facto standard approach for variational learning in neural networks is to update the distribution parameters using gradient-based methods to leverage backpropagation training [14]. Khan and Rue [18], for example, use a natural gradient method on the natural parameters of an exponential family. This method has two main difficulties. First, one needs to satisfy constraints on the parameters of the distribution, for example, positivity of the covariance matrix in the case of Gaussians [22]. Secondly, the objective functions involve integrals with respect to the variational distribution, and obtaining low-variance stochastic gradients is a major challenge. Reparametrization tricks provide such estimators, but it is not clear whether they are available for the variational family at hand and they have to be derived case by case [26].

Recently, Kıral et al. [20] proposed a learning algorithm which addresses the above difficulties by parametrizing the probability distribution through Lie groups. The constraints on the parameters are naturally handled through the group’s closure and lower variance gradients are available by default as the Lie group automatically enables the reparametrization technique. Furthermore the homogeneity of the group allows transporting the gradients on the Lie group to a common tangent space thus allowing for a natural application of momentum, and such transports are compatible with the Fisher information metric which is invariant under reparametrizations.

In this work we establish the connection between the Lie group updates and existing methods on exponential families (EFs) such as the Bayesian Learning Rule (BLR) by Khan and Rue [18]. The Lie group update rule does not require the family to be an EF, however many useful families are EFs. EFs are especially well suited to the Bayesian framework, which relies on multiplication and division of distributions to add, remove or modify information. This corresponds to simple addition and subtraction on the natural parameters of the family, connecting the Bayesian framework to optimizing on natural parameters. EFs come with a rich structure, such as dually flat coordinate systems of natural and expectation parameters studied in information geometry [2]. As EFs have many desirable properties, the aim of this paper is to further study the Lie group learning rule of Kıral et al. [20] when specialized to EFs and to understand its relation to the Bayesian learning rule [18] which is derived for EFs and gives a unifying and simplifying view of many other algorithms.

Those EFs which also have a Lie group structure are families of distributions which combine the best of both worlds, and it should therefore not be surprising that most of the eponymous EFs named after a mathematician share this property. They have the above desirable properties of EFs, but the additional group structure gives easy reparametrization tricks and allows for updating without breaking constraints. Developing a recipe to construct exponential families on homogeneous spaces from real representations of Lie groups, Tojo and Yoshino [32] redefine the term harmonic exponential families subsuming the earlier definition coined by Cohen and Welling [10] for homogeneous spaces of compact Lie groups via unitary representations. These families characterize all exponential families closed under a Lie group action. Using this characterization we establish a general and concrete connection between the Lie group update and BLR. Our main contribution is to prove that the linearization of the update proposed by Kıral et al. [20] always recovers the Bayesian learning rule for exponential families with Lie group structure, see Theorem 8. Altogether, our work supplies the theoretical foundations for efficient algorithms for variational learning using Lie groups and exponential families.

Background on Variational Learning

We first introduce some background on variational learning methods, with particular focus on exponential families. In the following section we introduce the Lie group method of Kıral et al. [20] to prepare for combining Lie groups with exponential families.

The Variational Learning Problem

Given a parametrized model (for example, a neural network) with parameter space Θ\Theta, choose a base measure ν\nu on Θ\Theta. For a standard neural network the parameter space Θ\Theta is either RP\mathbb{R}^{P} or an open subset of RP\mathbb{R}^{P}, and the base measure is generally taken as the Lebesgue measure. Denote the loss function by ℓ:Θ→R≥0\ell:\Theta\to\mathbb{R}_{\ge0}. Instead of minimizing ℓ(θ)\ell(\theta) to arrive at a θ^∈Θ\hat{\theta}\in\Theta, variational learning obtains a distribution on the parameters via the optimization,

q^∈arg⁡min⁡q∈Q E(q)whereE(q)=Eθ∼q[ℓ(θ)]−τHν(q).(1)\hat{q} \in\underset{q\in\mathcal{Q}}{\arg\min}\,\mathcal{E}(q) \qquad\text{where} \qquad \mathcal{E}(q)=\mathbb{E}_{\theta\sim q}[\ell(\theta)]-\tau\mathcal{H}_{\nu}(q). \tag*{(1)}

Here Q\mathcal{Q} is a variational family of distributions on Θ\Theta and τ>0\tau>0 is a temperature parameter. Assume members of Q\mathcal{Q} to be of the form q dνq\,\mathrm{d}\nu for some density qq, and by abuse of notation we often omit dν\mathrm{d}\nu and simply refer to the distribution qq—since the base measure will be fixed throughout, once chosen. We also assume that ℓ\ell is ν\nu-almost everywhere differentiable and satisfies Eq[∣ℓ∣]<∞\mathbb{E}_{q}[|\ell|]<\infty for every q∈Qq\in\mathcal{Q}. The first is standard also in non-variational (point-based) learning if applying methods such as gradient descent, and the second assumption holds as long as members of Q\mathcal{Q} have rapid decay and ℓ\ell has moderate growth1.

The term Hν(q)=−∫Θqlog⁡q dν\mathcal{H}_{\nu}(q)=-\int_{\Theta}q\log q\,\mathrm{d}\nu denotes the entropy of the measure q dνq\,\mathrm{d}\nu relative to the base measure ν\nu. The base measure underlies the concept of entropy, see Figure 1 for how the choice of base measure can affect the solution. Indeed, if we have two ways of writing the same measure q1dν=q2(hdν)q_{1}\mathrm{d}\nu=q_{2}(h\mathrm{d}\nu) their relative entropies are not the same and are related by the equality Hν(q1)+Eq1dν[log⁡h]=Hhν(q2)\mathcal{H}_{\nu}(q_{1})+\mathbb{E}_{q_{1}\mathrm{d}\nu}[\log h]=\mathcal{H}_{h\nu}(q_{2}). We introduce the required notions from measure theory later when we need them in § 3.1.

Figure 1. (Left) The distributions q1q_1 and q2q_2 are translates of each other and have the same entropy relative to the Lebesgue base measure dν(θ)=dθ\mathrm{d}\nu(\theta)=\mathrm{d}\theta. Therefore an algorithm optimizing for Eq. (1) will not take entropy into account in deciding between them while finding q^\hat{q}. (Right) Two distributions on R>0\mathbb{R}_{>0} are related by q4(θ)=12q~3(θ2)q_4(\theta)=\frac{1}{2}\tilde{q}_3\left(\frac{\theta}{2}\right). Relative to the Lebesgue measure, q4q_4 is spread out more and has a higher entropy, however both measures have the same entropy relative to the base measure dθ/θ\mathrm{d}\theta/\theta. In this case the densities are given by q~j\tilde{q}_j with q~j(θ)=θqj(θ)\tilde{q}_j(\theta)=\theta q_j(\theta) (j=3,4j=3,4) and q~4(θ)=q~3(θ2)\tilde{q}_4(\theta)=\tilde{q}_3\left(\frac{\theta}{2}\right). Therefore the solution to the Bayesian Learning problem in Eq. (1) depends on the base measure and it is the practitioner’s choice whether to bias the solutions q^\hat{q} towards q4q_4 (dν(θ)=dθ\mathrm{d}\nu(\theta)=\mathrm{d}\theta) or not (dν(θ)=dθθ\mathrm{d}\nu(\theta)=\frac{\mathrm{d}\theta}{\theta}).

The notion of relative entropy is exactly the KL-divergence Hν(q)=−KL⁡(qdν∥ν)\mathcal{H}_{\nu}(q)=-\operatorname{KL}(q\mathrm{d}\nu\Vert\nu) if ν\nu is also a probability measure. The variational learning problem is sometimes (equivalently) introduced as E(q)=Eq[ℓdata]+τKL⁡(q∥pprior)\mathcal{E}(q)=\mathbb{E}_{q}[\ell_{\mathrm{data}}]+\tau\operatorname{KL}(q\Vert p_{\mathrm{prior}}), where the prior is chosen as pprior∝e−1τℓregdνp_{\mathrm{prior}}\propto e^{-\frac{1}{\tau}\ell_{\mathrm{reg}}}\mathrm{d}\nu following a decomposition of the loss ℓ=ℓdata+ℓreg\ell=\ell_{\mathrm{data}}+\ell_{\mathrm{reg}} into the data term and regularizer.

In Eq. (1), the expectation term Eq[ℓ]\mathbb{E}_q[\ell] pushes the optimization towards qq that are more concentrated in regions of low loss. Antagonistically the negative entropy term −Hν(q)-\mathcal{H}_{\nu}(q) pushes the optimization towards qq which are more spread out, exploring the parameter space. The objective E\mathcal{E} can thus be seen as an implementation of the exploration–exploitation trade-off in the parameter space. The temperature τ\tau balances this trade-off. The entropy term is an additional regularization on top of what might already exist in ℓ\ell, selecting for models robust to larger parameter noise. These ideas have been studied from the minimum description length principle perspective [17, 14, 6, 15] and through PAC-Bayesian bounds [1].

If ℓ(θ)\ell(\theta) is the sum of negative log-likelihood and the negative log-prior, then Eq. (1) is equivalent (with τ=1\tau=1) to minimizing the Kullback-Leibler divergence arg⁡min⁡q∈QKL⁡(q∥p)\arg\min_{q\in\mathcal{Q}}\operatorname{KL}(q\mathbin{\|}p) from the “Gibbs” posterior p∝p(D∣θ)pprior(θ)∝e−ℓ(θ)p\propto p(D\mid\theta)p_{\mathrm{prior}}(\theta)\propto e^{-\ell(\theta)}, leading to a Bayesian interpretation (Zellner, 1988). A general loss function ℓ\ell leads to generalized posteriors, [8, 21, 5] (Zhang 1999).

The set Q\mathcal{Q} over which we restrict Eq. (1) is also called the space of candidate posteriors. An important family of candidate posteriors Q\mathcal{Q} are exponential families, which have many desirable properties. We introduce them in the following subsection, and subsequently the BLR algorithm solving for Eq. (1) with exponential families.

Exponential Families

First construct an exponential family of distributions on Θ\Theta. For this purpose, fix a pair (ν,T)(\nu,\mathbf{T}) where ν\nu is a base measure on Θ\Theta and T:Θ→Rd\mathbf{T}:\Theta\to\mathbb{R}^{d} is a measurable function with coordinate functions T(θ)=(T1(θ),T2(θ),…,Td(θ))T\mathbf{T}(\theta)=(T_1(\theta),T_2(\theta),\ldots,T_d(\theta))^\mathsf{T}. This T\mathbf{T} is called a sufficient statistic. Given T\mathbf{T} and ν\nu as above, we construct the associated (maximal) exponential family as

EF⁡ν(T)={qλdν:qλ(θ)=exp⁡(−λTT(θ)−A(λ)):λ∈Ω},(2)\operatorname{EF}_{\nu}(\mathbf{T})=\left\{q_{\lambda}d\nu:q_{\lambda}(\theta)=\exp\left(-\lambda^{\mathsf{T}}\mathbf{T}(\theta)-A(\lambda)\right):\lambda\in\Omega\right\}, \tag*{(2)}

where A=Aν,T:Rd→(−∞,∞]A=A_{\nu,\mathbf{T}}:\mathbb{R}^{d}\to(-\infty,\infty] is the log partition function defined as

A(λ)=log⁡∫Θexp⁡(−λTT(θ))dν(θ)(3)A(\lambda)=\log\int_{\Theta}\exp\left(-\lambda^{\mathsf{T}}\mathbf{T}(\theta)\right)d\nu(\theta) \tag*{(3)}

and Ων,T={λ∈Rd:A(λ)<∞}\Omega_{\nu,\mathbf{T}}=\{\lambda\in\mathbb{R}^{d}:A(\lambda)<\infty\} is the effective domain of AA. The log-partition function A(λ)A(\lambda) is convex and therefore the set Ω=Ων,T\Omega=\Omega_{\nu,\mathbf{T}} is convex as well.

The vectors λ\lambda are called the natural parameters of the distribution qλdνq_{\lambda}d\nu. The coordinate-free notation is also revealing; consider T:Θ→V\mathbf{T}:\Theta\to V where VV is a finite dimensional real vector space3^{3} and in this case λ\lambda is naturally an element of the dual space V∗V^{*}. This coordinate-free notation lets us distinguish between the sufficient statistics and natural parameters which are otherwise both simply elements of Rd\mathbb{R}^{d}. The linear dual space—denoted by V∗V^{*}—is the set of real valued linear functionals on VV, which itself forms a vector space. The value of the linear functional is denoted by the inner product notation λ(v)=⟨λ,v⟩\lambda(v)=\langle\lambda,v\rangle for v∈Vv\in V and λ∈V∗\lambda\in V^{*}. This coincides with the coordinate-laden description above; upon choosing a basis of VV and the corresponding dual basis in V∗V^{*}, both T(θ)\mathbf{T}(\theta) and λ\lambda can be written as column vectors and the pairing is given by the dot product ⟨λ,T(θ)⟩=λTT(θ)\langle\lambda,\mathbf{T}(\theta)\rangle=\lambda^{\mathsf{T}}\mathbf{T}(\theta).

The discussion above is a constructive approach to exponential families. Alternatively, we may as in Sec. C, from [4, 32 § 8.1; Def. 2.2], give criteria dubbing a set P\mathcal{P} of probability measures as an exponential family or not. Their approach does not commit to a base measure or sufficient statistics, as the same set of probability distributions may be realized as an exponential family with two (or more) realizations given by R=(ν,T)R=(\nu,\mathbf{T}), R′=(ν′,T′)R'=(\nu',\mathbf{T}'). It also allows for considering smaller families than all normalizable ones. Given a realization RR of an exponential family P\mathcal{P}, denote the set of natural parameters corresponding to the family as ΩR(P)⊆ΩR⊆V∗\Omega_{R}(\mathcal{P})\subseteq\Omega_{R}\subseteq V^{*}. We drop RR from the notation if it is understood. It is worth going into some delicate technicalities about different realizations of a set of probability measures as an exponential family.

Example 1 Take P\mathcal{P} as the one-dimensional Gaussian distributions with fixed variance 1. This set of distributions can be realized as an exponential family in two ways.

References

  1. [1]Pierre Alquier. User-friendly introduction to PAC-Bayes bounds. Foundations and Trends® in Machine Learning, 17(2):174–303, 2024.
  2. [2]Shun-Ichi Amari. Information Geometry and its Applications. Springer, 2016.
  3. [3]Matthew Ashman, Thang D Bui, Cuong V Nguyen, Stratis Markou, Adrian Weller, Siddharth Swaroop, and Richard E Turner. Partitioned variational inference: A framework for probabilistic federated learning. arXiv:2202.12275, 2022.arxiv.org/abs/2202.12275
  4. [4]Ole Eiler Barndorff-Nielsen. Information and exponential families in statistical theory. Chichester: Wiley, 1978.
  5. [5]Pier Giovanni Bissiri, Chris C Holmes, and Stephen G Walker. A general framework for updating belief distributions. Journal of the Royal Statistical Society Series B: Statistical Methodology, 78(5):1103–1130, 2016.
  6. [6]Léonard Blier and Yann Ollivier. The description length of deep learning models. In Advances in Neural Information Processing Systems (NeurIPS), 2018.arxiv.org/abs/1802.07044
  7. [7]Michael M Bronstein, Joan Bruna, Taco Cohen, and Petar Veličković. Geometric deep learning: Grids, groups, graphs, geodesics, and gauges. arXiv preprint arXiv:2104.13478, 2021.arxiv.org/abs/2104.13478
  8. [8]Olivier Catoni. PAC-Bayesian Supervised Classification. Number 56. Institute of Mathematical Statistics Lecture Notes – Monograph Series, 2007.DOI
  9. [9]Xiangning Chen, Chen Liang, Da Huang, Esteban Real, Kaiyuan Wang, Hieu Pham, Xuanyi Dong, Thang Luong, Cho-Jui Hsieh, Yifeng Lu, et al. Symbolic discovery of optimization algorithms. In Advances in Neural Information Processing Systems (NeurIPS), 2023.arxiv.org/abs/2302.06675
  10. [10]Taco Cohen and Max Welling. Harmonic exponential families on manifolds. In International Conference on Machine Learning, pages 1757–1765. PMLR, 2015.arxiv.org/abs/1505.04413
  11. [11]Thomas Cover and Joy Thomas. Elements of Information Theory. Wiley, 2nd edition, 2006.
  12. [12]Nico Daheim, Thomas Möllenhoff, Edoardo M Ponti, Iryna Gurevych, and Mohammad Emtiyaz Khan. Model merging by uncertainty-based gradient matching. In International Conference on Learning Representations, volume 2024, pages 11836–11854, 2024.arxiv.org/abs/2310.12808
  13. [14]Alex Graves. Practical variational inference for neural networks. In Advances in Neural Information Processing Systems (NeurIPS), 2011.
  14. [15]Peter D Grünwald. The minimum description length principle. MIT Press, 2007.DOI
  15. [16]Gert Heckman. Introduction to Riemannian Geometry. https://www.math.ru.nl/~heckman/DiffGeom.pdf, 2019. Lecture notes, Radboud University Nijmegen.
  16. [17]Geoffrey E Hinton and Drew Van Camp. Keeping the neural networks simple by minimizing the description length of the weights. In Conference on Learning Theory (COLT), 1993.DOI
  17. [18]Mohammad Emtiyaz Khan and Haavard Rue. The Bayesian learning rule. J. Mach. Learn. Res. (JMLR), 24(281):1–46, 2023.
  18. [19]Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In International Conference on Learning Representations (ICLR), 2015.arxiv.org/abs/1412.6980
  19. [20]Eren Mehmet Kiral, Thomas Möllenhoff, and Mohammad Emtiyaz Khan. The Lie-Group Bayesian learning rule. In International Conference on Artificial Intelligence and Statistics (AISTATS), 2023.arxiv.org/abs/2303.04397
  20. [21]Jeremias Knoblauch, Jack Jewson, and Theodoros Damoulas. Generalized variational inference: Three arguments for deriving new posteriors. arXiv:1904.02063, 2019.arxiv.org/abs/1904.02063
  21. [22]Wu Lin, Mark Schmidt, and Mohammad Emtiyaz Khan. Handling the positive-definite constraint in the Bayesian learning rule. In International Conference on Machine Learning (ICML), 2020.arxiv.org/abs/2002.10060
  22. [23]Wu Lin, Valentin Duruisseaux, Melvin Leok, Frank Nielsen, Mohammad Emtiyaz Khan, and Mark Schmidt. Simplifying momentum-based positive-definite submanifold optimization with applications to deep learning. In International Conference on Machine Learning (ICML), 2023.arxiv.org/abs/2302.09738
  23. [24]Michael S Matena and Colin A Raffel. Merging models with Fisher-weighted averaging. In Advances in Neural Information Processing Systems (NeurIPS), 2022.arxiv.org/abs/2111.09832
  24. [25]Xiangming Meng, Roman Bachmann, and Mohammad Emtiyaz Khan. Training binary neural networks using the Bayesian learning rule. In International Conference on Machine Learning (ICML), 2020.arxiv.org/abs/2002.10778
  25. [26]Shakir Mohamed, Mihaela Rosca, Michael Figurnov, and Andriy Mnih. Monte Carlo gradient estimation in machine learning. J. Mach. Learn. Res. (JMLR), 21(132):1–62, 2020.arxiv.org/abs/1906.10652
  26. [27]Cuong V. Nguyen, Yingzhen Li, Thang D. Bui, and Richard E. Turner. Variational Continual Learning. ICLR, February 2018. URL https://openreview.net/forum?id=BkQqQgRgB.arxiv.org/abs/1710.10628
  27. [28]Peter Nickl, Lu Xu, Dharmesh Tailor, Thomas Möllenhoff, and Mohammad Emtiyaz Khan. The memory-perturbation equation: Understanding model’s sensitivity to data. In Advances in Neural Information Processing Systems (NeurIPS), 2023.arxiv.org/abs/2310.19273
  28. [29]Frank Nielsen and Kazuki Okamura. Information measures and geometry of the hyperbolic exponential families of Poincaré and hyperboloid distributions. Inf. Geom., 7:S943–S989, 2024. ISSN 2511-2481,2511-249X. doi: 10.1007/s41884-024-00158-9. URL https://doi.org/10.1007/s41884-024-00158-9.
  29. [30]Keigo Nishida, Eren Mehmet Kiral, Kenichi Bannai, Mohammad Emtiyaz Khan, and Thomas Möllenhoff. Log-normal multiplicative dynamics for stable low-precision deep learning. In Forty-third International Conference on Machine Learning, 2026.
  30. [31]Yuesong Shen, Nico Daheim, Bai Cong, Peter Nickl, Gian Maria Marconi, Clement Bazan, Rio Yokota, Iryna Gurevych, Daniel Cremers, Mohammad Emtiyaz Khan, and Thomas Möllenhoff. Variational learning is effective for large deep networks. In International Conference on Machine Learning (ICML), 2024.arxiv.org/abs/2402.17641
  31. [32]Koichi Tojo and Taro Yoshino. Harmonic exponential families on homogeneous spaces. Information Geometry, 4(1):215–243, 2021.DOI
  32. [33]Koichi Tojo and Taro Yoshino. Note on harmonic exponential families on homogeneous spaces. In Geometric science of information. Part III, volume 16035 of Lecture Notes in Comput. Sci., pages 246–253. Springer, Cham, 2026a.DOI
  33. [34]Koichi Tojo and Taro Yoshino. The Fisher metric and the Amari–Chentsov tensor of the family of Poincaré distributions. In Frank Nielsen and Frédéric Barbaresco, editors, Geometric Science of Information, pages 254–262, Cham, 2026b. Springer Nature Switzerland.DOI
  34. [35]Martin J Wainwright and Michael I Jordan. Graphical models, exponential families, and variational inference. Foundations and Trends® in Machine Learning, 1(1–2):1–305, 2008.

Paper details

vlnc:W_ryx8rggz
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 13

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents