UnlockNN

UnlockNN: Uncertainty quantification for neural network models of chemical systems - Published in JOSS (2022)

https://github.com/a-ws-m/unlocknn

Science Score: 93.0%

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

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 1 DOI reference(s) in JOSS metadata
  • Academic publication links
    Links to: joss.theoj.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
    Published in Journal of Open Source Software

Keywords

chemistry keras machine-learning materials-science python tensorflow-probability

Scientific Fields

Artificial Intelligence and Machine Learning Computer Science - 32% confidence
Last synced: 6 months ago · JSON representation

Repository

A Python package for adding uncertainties to neural network models of chemical systems.

Basic Info
  • Host: GitHub
  • Owner: a-ws-m
  • License: mit
  • Language: PureBasic
  • Default Branch: master
  • Homepage:
  • Size: 128 MB
Statistics
  • Stars: 26
  • Watchers: 5
  • Forks: 7
  • Open Issues: 7
  • Releases: 5
Topics
chemistry keras machine-learning materials-science python tensorflow-probability
Created over 5 years ago · Last pushed over 3 years ago
Metadata Files
Readme License

README.md

unlockNN

Documentation Status PyPi status made-with-python License: MIT Code style: black codecov

A Python package for interpreting and extracting uncertainties in neural network models of chemical systems based upon Gaussian processes.

Statement of need

Neural networks (NNs) are powerful tools for materials property prediciton (MPP) based on structural information. After training, they offer a cheaper alternative to density function theory (DFT) and are therefore promising for high throughput screening of materials. However, most current implementations of NNs for MPP lack uncertainty quantifiers. Knowledge of the certainty in an estimate is particularly important for machine learning models, as the reliability of a prediction depends on the existence of functionally similar structures in the training dataset, which cannot be readily determined.

UnlockNN contains utilities for adding uncertainty quantification to Keras-based models. This is achieved by replacing the last layer of the model with a variational Gaussian process (VGP), a modification of a Gaussian process that improves scalability to larger data sets. The caveat is that the modified model must undergo further training in order to calibrate the uncertainty quantifier; however, this typically only requires a small number of training iterations.

UnlockNN also contains a specific configuration for adding uncertainty quantification to MEGNet: a powerful graph NN model for predicting properties of molecules and crystals.

Installation

The package can be installed by cloning this repository and building it using either anaconda or pip, or it can be downloaded directly from PyPi.

To install from PyPi, run pip install unlockNN. To install from source:

bash git clone https://github.com/a-ws-m/unlockNN.git cd unlockNN conda env create -f environment.yml # Optional: create a virtual environment with conda pip install .

The dev_environment.yml contains additional dependencies for development, testing and building documentation. It can be installed using conda env create -f dev_environment.yml.

Documentation

Full documentation is available for the project here.

Benchmarks

Benchmark details and results can be found in the benchmarking subdirectory.

License and attribution

Code licensed under the MIT License.

Development notes

Reporting issues

Please use the Issue tracker to report bugs in the software, suggest feature improvements, or seek support.

Contributing to unlockNN

Contributions are very welcome as we look to make unlockNN more flexible and efficient. Please use the Fork and Pull workflow to make contributions and follow the contribution guidelines:

  • Use the environment defined in dev_environment.yml. This installs black, the formatter used for this project, as well as utilities for building documentation (sphinx and the insegel theme), enabling the testing suite (pytest and pytest-cov) and publishing to PyPi (build, but this will be handled by the package maintainer).
  • Use black to format all Python files that you edit: black {edited_file.py} or python -m black {edited_file.py}.
  • Write tests for new features in the appropriate directory. Run tests using pytest tests/, or optionally with pytest --cov=unlocknn tests/ to generate coverage on the fly.
  • After testing that pytest works for your current environment, run tox in the root directory of the project to check that all versions of Python are compatible.
  • Use Google-style Docstrings. Check docstrings with pydocstyle: pydocstyle {edited_file.py}.
  • Check docstrings are valid Sphinx RST and that the documentation compiles without errors: in the docs directory, run make html.
  • Feel free to clean up others' code as you go along.

List of developers

Contributors to unlockNN:

Huge thanks to Keith Butler, Aron Walsh and Kazuki Morita for supervising the project at its inception and for their immense support.

Owner

  • Name: Alex Moriarty
  • Login: a-ws-m
  • Kind: user

JOSS Publication

UnlockNN: Uncertainty quantification for neural network models of chemical systems
Published
July 05, 2022
Volume 7, Issue 75, Page 3700
Authors
Alexander Moriarty ORCID
Department of Materials, Imperial College London, London, UK
Kazuki Morita ORCID
Department of Materials, Imperial College London, London, UK
Keith T. Butler ORCID
SciML, STFC Scientific Computing Division, Rutherford Appleton Laboratories, UK
Aron Walsh ORCID
Department of Materials, Imperial College London, London, UK, Department of Materials Science and Engineering, Yonsei University, Seoul, Korea
Editor
Øystein Sørensen ORCID
Tags
graph neural networks uncertainty quantification machine learning material science chemistry

GitHub Events

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

Committers

Last synced: 7 months ago

All Time
  • Total Commits: 614
  • Total Committers: 2
  • Avg Commits per committer: 307.0
  • Development Distribution Score (DDS): 0.003
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
a-ws-m a****4@g****m 612
Øystein Sørensen o****n@h****m 2

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 19
  • Total pull requests: 22
  • Average time to close issues: 2 months
  • Average time to close pull requests: 2 days
  • Total issue authors: 4
  • Total pull request authors: 2
  • Average comments per issue: 2.05
  • Average comments per pull request: 0.0
  • Merged pull requests: 22
  • 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
  • pmeier (14)
  • sgbaird (3)
  • Het-Shah (1)
  • matthewmelissa049 (1)
Pull Request Authors
  • a-ws-m (20)
  • osorensen (2)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 21 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 1
  • Total versions: 3
  • Total maintainers: 1
pypi.org: unlocknn

Uncertainty quantification for neural network models of chemical systems.

  • Versions: 3
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 21 Last month
Rankings
Dependent packages count: 7.3%
Stargazers count: 13.1%
Forks count: 13.3%
Dependent repos count: 22.1%
Average: 27.2%
Downloads: 80.0%
Maintainers (1)
Last synced: 6 months ago

Dependencies

environment.yml pypi
  • megnet *
  • pyarrow *
  • pymatgen ==2021.2.8
  • requests *
  • tensorflow *
  • tensorflow-probability *
requirements.txt pypi
  • megnet >=1.1.4
  • numpy <=1.19.5
  • pyarrow >=1.0.1
  • pymatgen <=2021.2.8
  • requests *
  • tensorflow >=2.5
  • tensorflow-probability >=0.10.1
  • typish *
setup.py pypi
  • megnet >=1.1.4
  • numpy <=1.19.5
  • pyarrow >=1.0.1
  • pymatgen <=2021.2.8
  • requests *
  • tensorflow >=2.2
  • tensorflow-probability >=0.10.1
  • typish *