TopSearch
TopSearch: a Python package for topographical analysis of machine learning models and physical systems - Published in JOSS (2024)
Science Score: 98.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
Found 13 DOI reference(s) in README and JOSS metadata -
✓Academic publication links
Links to: arxiv.org -
○Committers with academic emails
-
○Institutional organization owner
-
✓JOSS paper metadata
Published in Journal of Open Source Software
Scientific Fields
Repository
This Python package is designed for mapping the solution space of machine learning models. An understanding of the organisation of the solution space can answer important questions about the reproducibility, explainability and performance of ML methods.
Basic Info
- Host: GitHub
- Owner: IBM
- License: mit
- Language: Python
- Default Branch: main
- Size: 61.6 MB
Statistics
- Stars: 17
- Watchers: 3
- Forks: 8
- Open Issues: 1
- Releases: 3
Metadata Files
README.md
TopSearch
Introduction
The TopSearch package provides functionality to map the topography of surfaces, and can be used to map the solution space of machine learning algorithms. Many machine learning algorithms have non-convex loss (or cost) functions, and the aim of fitting is usually to locate low-valued or diverse solutions. An understanding of the solution space organisation provides key understanding about the reproducibility, explainability and performance of ML methods.
The methodology derives from the field of chemical physics, and is agnostic to the given surface, allowing application to a wide range of machine learning algorithms. Leveraging ideas from chemical physics we can assess the performance and reliability of neural networks, Gaussian processes, Bayesian optimisation, clustering algorithms and understand the effect of dataset roughness on model performance. Application of the same framework to many different machine learning paradigms provides a route for transferable understanding, and its application to machine learning is reviewed in this paper.
Overview
The topographical mapping is performed using the energy landscape framework. The energy landscape framework, developed in chemical physics, encodes surfaces as a network of stationary points. These stationary points, points with zero gradient, can be either local minima or transition states. Transition states are maximal in a single direction and local minimisation along that given direction (both forwards and backwards) locates two connected minima. Each transition state gives the lowest barrier between its two connected minima, and provides information about the intermediate behaviour of the function. In the network, each minimum is a node and edges exist between minima connected by a transition state. The complete network of minima and transition states constitutes the solution landscape, and we show an example landscape below.
|
|
|:--:|
| Top: A contour plot of the original surface with the stationary points, and their connections, overlaid. The minima are given in green, the transition states in red, and the connections between them with solid black lines. Bottom: The corresponding network abstraction of the surface. Here, the separation between connected nodes is specified by the height of the transition state between them. |
Topographical mapping of surfaces involves two main steps: * Global optimisation → location of the global minimum and other low-valued local minima of the surface * Landscape exploration → attempt transition state searches between pairs of minima to generate a fully connected set of minima
Global optimisation is usually performed using the basin-hopping algorithm within TopSearch. Basin-hopping is a modified Monte Carlo approach that includes local minimisation at each step to efficiently optimise complex solution spaces. During global optimisation we store all unique minima that we encounter, which gives us the initial set of minima that will be connected by transition state searches.
Landscape exploration involves selecting pairs of minima and attempting to find transition states between them. Transition state location is usually performed using a combination of double-ended and single-ended transition state searches. Double-ended searches aim to locate the lowest-valued path between a given pair of minima, and we use the nudged elastic band algorithm within TopSearch. Single-ended methods start from a single point and follow the lowest eigenmode towards the nearest transition state, and this is performed using hybrid eigenvector-following. The nudged elastic band algorithm locates an approximate minimum energy path between two chosen minima, and the maxima on this path are refined to true transition states using hybrid eigenvector-following. There are a variety of schemes to decide which pairs of minima should be selected for transition state connections, all of which aim to produce a fully connected network of minima and explore important regions of solution space.
For more details of the methodology please refer to common_citations.md.
Documentation
A complete documentation for the package can be found at the GitHub pages
Installation
Instructions are for installation into a conda environment. First create the conda environment
conda create -n topsearch_env python=3.11
conda activate topsearch_env
The package is available on PyPI and can be installed using pip
pip install topsearch
For the source code you can clone the git repository locally using
git clone https://github.com/IBM/topography-searcher.git
and then install the dependencies locally using pip
cd topography-searcher
python -m pip install .
or in editable mode using
cd topography-searcher
python -m pip install -e .
Dependency management can additionally be performed using poetry, and we provide a
poetry.lock file that contains the tested versions of the dependencies.
We can test the environment build by running
pip install pytest
pip install pytest-cov
pytest
For a successful build we should have all tests pass. If this is the case then enjoy using TopSearch!
Note: By default we do not specify the dependencies for molecular potentials (dft.py, ml_potentials.py) due to the large increase in environment size, which is unnecessary for machine learning applications. The dependencies for a given potential should be installed in addition if required. Therefore, we do not run the tests in molecular_potentials by default, but these can be run manually with
cd tests/molecular_potentials
pytest test*
Examples
We provide several examples to illustrate the tasks that TopSearch can perform in examples. These examples are provided as both an annotated Jupyter notebook or a python script (the scripts are further separated for ease), and each example has a detailed description of its content within the README. example_function as a notebook or scripts are the best place to start for an introduction to the methodology, where we apply it to some simple test functions.
Contributors
This package is written and maintained by Luke Dicks at IBM Research as part of the AI-Enriched Simulation team. Please contact Luke (luke.dicks@ibm.com) or Edward Pyzer-Knapp (EPyzerK3@uk.ibm.com) for questions about how to use and/or contribute.
License
TopSearch is an open-source software licensed under the MIT License. Check the details in the LICENSE file.
Citations
If you use this package please cite it appropriately using the 'Cite this repository' dropdown in the right sidebar. Moreover, we also provide a bibliography of previous relevant work in common_citations.md. This file provides references to energy landscape algorithms and their applications to different fields of machine learning, each given as a bibtex entry with the handle providing a summary of the content.
Owner
- Name: International Business Machines
- Login: IBM
- Kind: organization
- Email: awesome@ibm.com
- Location: United States of America
- Website: https://www.ibm.com/opensource/
- Twitter: ibmdeveloper
- Repositories: 3,152
- Profile: https://github.com/IBM
JOSS Publication
TopSearch: a Python package for topographical analysis of machine learning models and physical systems
Authors
Tags
machine learning topography energy landscapes chemical physicsCitation (CITATION.cff)
cff-version: "1.2.0"
authors:
- family-names: Dicks
given-names: Luke
orcid: "https://orcid.org/0000-0002-5278-4412"
- family-names: Pyzer-Knapp
given-names: Edward O.
orcid: "https://orcid.org/0000-0002-8232-8282"
contact:
- family-names: Pyzer-Knapp
given-names: Edward O.
orcid: "https://orcid.org/0000-0002-8232-8282"
doi: 10.5281/zenodo.12613017
message: If you use this software, please cite our article in the
Journal of Open Source Software.
preferred-citation:
authors:
- family-names: Dicks
given-names: Luke
orcid: "https://orcid.org/0000-0002-5278-4412"
- family-names: Pyzer-Knapp
given-names: Edward O.
orcid: "https://orcid.org/0000-0002-8232-8282"
date-published: 2024-07-02
doi: 10.21105/joss.06711
issn: 2475-9066
issue: 99
journal: Journal of Open Source Software
publisher:
name: Open Journals
start: 6711
title: "TopSearch: a Python package for topographical analysis of
machine learning models and physical systems"
type: article
url: "https://joss.theoj.org/papers/10.21105/joss.06711"
volume: 9
title: "TopSearch: a Python package for topographical analysis of
machine learning models and physical systems"
GitHub Events
Total
- Issues event: 2
- Watch event: 5
- Member event: 2
- Push event: 9
- Pull request review event: 13
- Pull request event: 14
- Fork event: 3
- Create event: 3
Last Year
- Issues event: 2
- Watch event: 5
- Member event: 2
- Push event: 9
- Pull request review event: 13
- Pull request event: 14
- Fork event: 3
- Create event: 3
Committers
Last synced: 5 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Luke Dicks | l****s@L****l | 98 |
| Luke Dicks | 1****s | 47 |
| MorrowChem | j****7@g****m | 21 |
| Matthew Wilson | m****n@u****m | 6 |
| Vlad Carare | c****6@g****m | 6 |
| IBM Open Source Bot | 6****t | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 4 months ago
All Time
- Total issues: 2
- Total pull requests: 17
- Average time to close issues: about 2 months
- Average time to close pull requests: 3 months
- Total issue authors: 2
- Total pull request authors: 5
- Average comments per issue: 2.5
- Average comments per pull request: 0.0
- Merged pull requests: 13
- Bot issues: 0
- Bot pull requests: 1
Past Year
- Issues: 1
- Pull requests: 11
- Average time to close issues: 2 months
- Average time to close pull requests: about 1 month
- Issue authors: 1
- Pull request authors: 5
- Average comments per issue: 1.0
- Average comments per pull request: 0.0
- Merged pull requests: 7
- Bot issues: 0
- Bot pull requests: 1
Top Authors
Issue Authors
- ml-evs (1)
- VladCarare (1)
Pull Request Authors
- MorrowChem (7)
- matthewpwilson (4)
- LukeDicks (4)
- VladCarare (4)
- renovate[bot] (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 36 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 3
- Total maintainers: 1
pypi.org: topsearch
A Python package for topographical analysis of machine learning models and physical systems
- Homepage: https://github.com/IBM/topography-searcher/
- Documentation: https://topsearch.readthedocs.io/
- License: MIT
-
Latest release: 0.0.3
published over 1 year ago
