https://github.com/imperialcollegelondon/gsvgd

Code for "Grassmann Stein Variational Gradient Descent" (AISTATS 2022)

https://github.com/imperialcollegelondon/gsvgd

Science Score: 10.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    1 of 4 committers (25.0%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.5%) to scientific vocabulary
Last synced: 6 months ago · JSON representation

Repository

Code for "Grassmann Stein Variational Gradient Descent" (AISTATS 2022)

Basic Info
  • Host: GitHub
  • Owner: ImperialCollegeLondon
  • License: mit
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 354 MB
Statistics
  • Stars: 4
  • Watchers: 3
  • Forks: 1
  • Open Issues: 1
  • Releases: 0
Created over 4 years ago · Last pushed over 2 years ago
Metadata Files
Readme License

README.md

GSVGD

[Paper][Slides][Poster]

Test

Test

Test

Data

Covertype data is downloaded from https://archive.ics.uci.edu/ml/datasets/covertype

Other Dependencies

  • Code for Sliced-SVGD is adapted from Wenbo Gong's repo
  • Code for optimization on Grassmann manifold is adapted from Pymanopt

Run experiments

The code below provides an example of running the numerical experiments in the paper. - The .sh scripts assume 8 GPUs are available. You can also use CPUs by changing the --gpu argument in these scripts to --gpu=-1. - Note: These experiments can take several hours to finish, since they encompass various configurations of dimensions/sample sizes, along with multiple repetitions. If you wish to obtain results faster, you can reduce the number of configurations accordingly in the .sh scripts.

To run: 1. Install the GSVGD module pip install -e . 2. Run experiments (the full experiments can take several hours) ```

e.g.1 run multivariate gaussian experiment and generate plots

sh scripts/run_gaussian.sh

e.g.2 run conditioned diffusion and generate plots

sh scripts/run_diffusion.sh ```

Basic usage

``python ''' distribution: target distribution class withlog_prob` method (up to a constant term) kernel: instance of kernel class manifold: instance of Grassmann manifold class for projector update optimizer: instance of optimizer class for particle update

delta: stepsize for projector update T: initial temperature T0 X: initial particles A: initial projectors m: number of projectors epochs: number of iterations '''

instantiate GSVGD class

gsvgd = FullGSVGDBatch( target=distribution, kernel=kernel, manifold=manifold, optimizer=optimizer, delta=delta, T=T )

update particles

_ = gsvgd.fit(X=X, A=A, m=m, epochs=epochs, threshold=0.0001*m)

final particles: X (updates are done in-place)

```

Run tests

python python -m pytest

Code directory

.

requirements.txt: Dependencies.
setup.py: Setup script.
data: covertype data.
experiments: main scripts for the 5 numerical experiments.
plots: folder to hold plots.
scripts: Shell scripts to run the experiments and generate plots.
src: Source files for implementing each sampling method, and util functions for experiments.
   Sliced_KSD_Clean: Utils for Sliced SVGD adapted from Wenbo Gong.
   blr.py: Utils for Bayesian logistic regression.
   diffusion.py: Utils for conditioned duffition.
   gsvgd.py: GSVGD class (main).
   kernel.py: Kernel class.
   manifold.py: Class for optimisation on the Grassmann manifold, adapted from Pymanopt
   metrics.py: Metric class for evaluation of results.
   s_svgd.py: S-SVGD class, adapted from Wenbo Gong.
   svgd.py: SVGD class.
   utils.py: Other utils.
tests: unittests
thumbnail: Thumbnail fig.
README.md

Owner

  • Name: Imperial College London
  • Login: ImperialCollegeLondon
  • Kind: organization
  • Email: icgithub-support@imperial.ac.uk
  • Location: Imperial College London

Imperial College main code repository

GitHub Events

Total
  • Watch event: 1
Last Year
  • Watch event: 1

Committers

Last synced: about 2 years ago

All Time
  • Total Commits: 67
  • Total Committers: 4
  • Avg Commits per committer: 16.75
  • Development Distribution Score (DDS): 0.164
Past Year
  • Commits: 3
  • Committers: 2
  • Avg Commits per committer: 1.5
  • Development Distribution Score (DDS): 0.333
Top Committers
Name Email Commits
XingLLiu l****5@o****m 56
Xing Liu 4****u 8
Harrison Zhu h****5@i****k 2
Harrison Zhu 3****8 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: over 1 year ago

All Time
  • Total issues: 1
  • Total pull requests: 8
  • Average time to close issues: N/A
  • Average time to close pull requests: 5 days
  • Total issue authors: 1
  • Total pull request authors: 1
  • Average comments per issue: 2.0
  • Average comments per pull request: 0.63
  • Merged pull requests: 8
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • heyzude (1)
Pull Request Authors
  • XingLLiu (8)
Top Labels
Issue Labels
Pull Request Labels