Code Monkey home page Code Monkey logo

tardis's Introduction

TARDIS: Topological Algorithms for Robust DIscovery of Singularities

arXiv Maintainability GitHub contributors GitHub Read the Docs

TARDIS icon

This is the code for our ICML paper on topology-driven singularity analysis:

@inproceedings{vonRohrscheidt23a,
    title       = {Topological Singularity Detection at Multiple Scales},
    author      = {von Rohrscheidt, Julius and Rieck, Bastian},
    year        = 2023,
    booktitle   = {Proceedings of the 40th International Conference on Machine Learning},
    publisher   = {PMLR},
    series      = {Proceedings of Machine Learning Research},
    number      = 202,
    pages       = {35175--35197},
    editor      = {Krause, Andreas and Brunskill, Emma and Cho, Kyunghyun and Engelhardt, Barbara and Sabato, Sivan and Scarlett, Jonathan},
    abstract    = {The manifold hypothesis, which assumes that data lies on or close to an unknown manifold of low intrinsic dimension, is a staple of modern machine learning research. However, recent work has shown that real-world data exhibits distinct non-manifold structures, i.e. singularities, that can lead to erroneous findings. Detecting such singularities is therefore crucial as a precursor to interpolation and inference tasks. We address this issue by developing a topological framework that (i) quantifies the local intrinsic dimension, and (ii) yields a Euclidicity score for assessing the `manifoldness' of a point along multiple scales. Our approach identifies singularities of complex spaces, while also capturing singular structures and local geometric complexity in image data.}
}

Installation

Our code has been tested with Python 3.8 and Python 3.9 under Mac OS X and Linux. Other Python versions may not support all dependencies.

The recommended way to install the project is via poetry. If this is available, installation should work very quickly:

$ poetry install

Recent versions of pip should also be capable of installing the project directly:

$ pip install .

Experiments

To reproduce the main experiments in our paper, we ship synthetic data sets in the repository and offer the automated capability to download the computer vision data sets (MNIST and FashionMNIST). For reasons of simplicity, we suggest to reproduce the experiments with synthetic point clouds first as they run quickly even on a standard desktop computer.

All experiments make use of the script cli.py, which provides a command-line interface to our framework. Given input parameters for the local annuli, this script will calculate Euclidicity values as described in the paper. For reasons of simplicity, all output is provided to stdout, i.e. the standard output of your terminal, and needs to be redirected to a file for subsequent analysis.

We will subsequently provide the precise commands to reproduce the experiments; readers are invited to take a look at the code in cli.py or call python cli.py --help in order to see what additional options are available for processing data.

Pinched torus

Run the following commands from the root directory of the repository:

$ cd tardis
$ python cli.py ../data/Pinched_torus.txt.gz -q 500 -r 0.05 -R 0.45 -s 0.2 -S 0.6 > ../output/Pinched_torus.txt

This will create a point cloud of 500 sample points with $x, y, z$ coordinates, followed by our Euclidicity score.

Wedged spheres (with automated parameter selection)

Warning: this example might require a long runtime on an ordinary machine. We ran this on our cluster (see also the scripts folder in the root directory).

Run the following commands from the root directory of the repository:

$ cd tardis
$ python cli.py -k 100 -q 2000 -d 2 --num-steps 20 ../data/Wedged_spheres_2D.txt.gz > ../output/Wedged_spheres_2D.txt

This will make use of the automated parameter selection procedure based on nearest neighbours. Notice that this example uses more query points; it is of course possible to adjust this parameter.

API & examples

Check out the examples folder for some code snippets that demonstrate how to use TARDIS in your own code. They all make use of the preliminary API.

License

Our code is released under a BSD-3-Clause license. This license essentially permits you to freely use our code as desired, integrate it into your projects, and much more---provided you acknowledge the original authors. Please refer to LICENSE.md for more information.

Issues

This project is maintained by members of the AIDOS Lab. Please open an issue in case you encounter any problems.

tardis's People

Contributors

julius-vr avatar pseudomanifold avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.