rho-diffusion
Parameterizing n-dimensional density fields using denoising diffusion probabilistic models
Science Score: 54.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
✓Academic publication links
Links to: arxiv.org -
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (15.9%) to scientific vocabulary
Keywords
Keywords from Contributors
Repository
Parameterizing n-dimensional density fields using denoising diffusion probabilistic models
Basic Info
Statistics
- Stars: 8
- Watchers: 3
- Forks: 2
- Open Issues: 4
- Releases: 0
Topics
Metadata Files
README.md
$\rho$-Diffusion: A diffusion-based density estimation framework for computational physics
In computational physics, a classical task is to evaluate the density function as a function of the physics parameters of interest or the model parameters. As the number of parameters increases, the parameter space expands geometrically, which, at some point, renders the evaluation of the density function computationally infeasible.
Instead of resorting to a brute-force evaluation of the density field, Rho-Diffusion is a generative model that can learn from existing data and generate the density function based on the parameters it is conditioned. It is based on the Denoising Diffusion Probabilistic Models (DDPMs), which are known for their capability of capturing high-fidelity image data. Rho-Diffusion generates the dimensionality of the data to n, with a current limitation of n = {1, 2, 3}.
Installation
Create a new conda environment with
console
conda env create -n rho_diffusion python=3.10
Then activate the newly created conda environemnt
console
conda activate rho-diffusion
Then install Intel AI tools with XPU support:
console
pip install --extra-index-url https://pytorch-extension.intel.com/release-whl-aitools/ torch==2.1.0.post0 torchvision==0.16.0.post0 torchaudio==2.1.0.post0 intel_extension_for_pytorch==2.1.20+xpu oneccl-bind-pt==2.1.200 deepspeed==0.14.0
And then install the package with
console
pip install .
For developers, performing
console
pip install './[dev]'
will install additional developer dependencies. To ensure code consistency, we also use pre-commit hooks, which can be set up with pre-commit install. The pre-commit hooks will create a virtual environment with the developer tools, and run checks with every commit you make to ensure best practices.
Model Training and Inference
We provide two scripts for easing the model training and inference efforts. These scripts can be found in the scripts directory.
Training
console
python training.py CONFIG.json
CONFIG.json is a JSON config file that defines various parameters of the model and the training/inference process. Examples of CONFIG.json can be found in the examples directory.
Inference
In the context of DDPM, inference is essentially a process of sampling from a pretrained DDPM model. With Rho-Diffusion this can be done by passing the model checkpoint and the config file to the infernece.py script:
console
python inference.py -p CHECKPOINT.pth CONFIG.json
Development
This is a proof-of-concept project under active development. Contributions are much appreciated. Please check out CONTRIBUTING.md for more information.
Citation
If you use Rho-Diffusion in your work, please consider cite the following paper:
- Cai, Maxwell X., Lee, Kin Long Kelvin, "Rho-Diffusion: A diffusion-based density estimation framework for computational physics", NeurIPS 2023 Workshop on Machine Learning for Physical Sciences, arXiv:2312.08153
Please refer to CITATION.cff for citing the code.
Owner
- Name: Intel Corporation
- Login: intel
- Kind: organization
- Email: webadmin@linux.intel.com
- Repositories: 1,189
- Profile: https://github.com/intel
Citation (CITATION.cff)
cff-version: 1.2.0 message: "If you use Rho-diffusion for your work, please consider citing this repository and/or the paper." authors: - family-names: "Cai" given-names: "Maxwell" orcid: "https://orcid.org/0000-0002-1116-2705" - family-names: "Lee" given-names: "Kin Long Kelvin" orcid: "https://orcid.org/0000-0002-1903-9242" title: "Rho-Diffusion: A diffusion-based density estimation framework for computational physics" version: 0.1.0 date-released: 2023-12-15 url: "https://github.com/intel/rho-diffusion"
GitHub Events
Total
- Watch event: 2
Last Year
- Watch event: 2
Committers
Last synced: about 1 year ago
Top Committers
| Name | Commits | |
|---|---|---|
| maxwelltsai | m****l@g****m | 21 |
| dependabot[bot] | 4****] | 11 |
| Lee, Kin Long Kelvin | k****e@i****m | 4 |
| Robert Dower | r****r@i****m | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: over 1 year ago
All Time
- Total issues: 0
- Total pull requests: 44
- Average time to close issues: N/A
- Average time to close pull requests: 17 days
- Total issue authors: 0
- Total pull request authors: 2
- Average comments per issue: 0
- Average comments per pull request: 0.82
- Merged pull requests: 12
- Bot issues: 0
- Bot pull requests: 39
Past Year
- Issues: 0
- Pull requests: 44
- Average time to close issues: N/A
- Average time to close pull requests: 17 days
- Issue authors: 0
- Pull request authors: 2
- Average comments per issue: 0
- Average comments per pull request: 0.82
- Merged pull requests: 12
- Bot issues: 0
- Bot pull requests: 39
Top Authors
Issue Authors
Pull Request Authors
- dependabot[bot] (84)
- maxwelltsai (13)
- laserkelvin (1)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- einops ==0.7.0
- geomloss ==0.2.6
- lightning ==1.8.6
- matplotlib *
- pydantic ==1.10.12
- torchmetrics [image]
- tqdm *
- websockets *