Sampling in Constrained Domains with Orthogonal-Space Variational Gradient Descent

Ruqi Zhang, Qiang Liu, Xin T. Tong
10/12/2022
cs.LGstat.ML

Official code: ruqizhang/o-gradient (5 stars, Python, last commit 2023-05-21).

Abstract

Sampling methods, as important inference and learning techniques, are typically designed for unconstrained domains. However, constraints are ubiquitous in machine learning problems, such as those on safety, fairness, robustness, and many other properties that must be satisfied to apply sampling results in real-life applications.

Show full abstract

Enforcing these constraints often leads to implicitly-defined manifolds, making efficient sampling with constraints very challenging. In this paper, we propose a new variational framework with a designed orthogonal-space gradient flow (O-Gradient) for sampling on a manifold $\mathcal{G}_0$ defined by general equality constraints. O-Gradient decomposes the gradient into two parts: one decreases the distance to $\mathcal{G}_0$ and the other decreases the KL divergence in the orthogonal space. While most existing manifold sampling methods require initialization on $\mathcal{G}_0$, O-Gradient does not require such prior knowledge. We prove that O-Gradient converges to the target constrained distribution with rate $\widetilde{O}(1/\text{the number of iterations})$ under mild conditions. Our proof relies on a new Stein characterization of conditional measure which could be of independent interest. We implement O-Gradient through both Langevin dynamics and Stein variational gradient descent and demonstrate its effectiveness in various experiments, including Bayesian deep neural networks.

View on arXivView PDF

Code Implementations(1)

50PythonOct 12, 20223 years ago

Similar Papers

Cite this paper

@article{zhang2022sampling,
  title  = {Sampling in Constrained Domains with Orthogonal-Space Variational Gradient Descent},
  author = {Ruqi Zhang and Qiang Liu and Xin T. Tong},
  year   = {2022},
  eprint = {2210.06447},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2210.06447}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2210.06447.svg)](https://codeofpaper.com/paper/2210.06447)

Discussion