Skip to main content

Bristol implements techniques developed by Mezzadri with parallel processing capabilities and a data model for further processing for generating random matrices. Circular module provides methods to generate matrices from Circular Unitary Ensemble (CUE), Circular Ortogonal Ensemble (COE) and Circular Symplectic Ensemble (CSE). Additional spectral analysis utilities are also implemented, such as computation of spectral density and spectral ergodicity for complexity of deep learning architectures.

Project description

Bristol

Build Status Coverage Status DOI PyPI version Downloads Downloads

Parallel random matrix tools and complexity for deep learning

Bristol implements techniques developed by Mezzadri with parallel processing capabilities and a data model for further processing for generating random matrices. Circular module provides methods to generate matrices from Circular Unitary Ensemble (CUE), Circular Ortogonal Ensemble (COE) and Circular Symplectic Ensemble (CSE). Additional spectral analysis utilities are also implemented, such as computation of spectral density and spectral ergodicity for complexity of deep learning architectures.

Features

  • Generation of Circular Ensembles: CUE, COE and CSE.
  • Random matrices: Reproducibility both in serial and parallel processing.
  • Eigenvalue Spectra, spectral densitiy.
  • Kullbach-Leibler divergence and spectral ergodicity measure functionality.
  • Cascading Periodic Spectral Ergodicity (cPSE)

Installation

Install with pip from pypi.

pip install bristol

To use the latest development version

pip install -upgrade git+https://github.com/msuzen/bristol.git

Documentation

Complexity of a deep learning model: cPSE

You need to put your model as pretrained model format of PyTorch. An example for vgg, and use cPSE.cpse_measure function simply:

from bristol import cPSE
import torchvision.models as models
netname = 'vgg11'
pmodel = getattr(models, netname)(pretrained=True)
(d_layers, cpse) = cPSE.cpse_measure(pmodel)

This would give cpse a single number expressing the complexity of your network and d_layers evolution of periodic spectral ergodicity withing layers as a vector, order matters.

Complex Circular Ensembles and prototype notebooks

  • Basics of circular ensembles ipynb.

  • Computing spectral ergodicity for generated matrices ipynb. This is to reproduce the main figure from arXiv:1704.08693.

  • The concept of cascading periodic ergodicity (cPSE) ipynb This is only to reproduce paper's results from arXiv:1911.07831.

Contact

  • Please create an issue for any type of questions or contact msuzen.

References

  • Berry, M V & Pragya Shukla 2013, Hearing random matrices and random waves, New. J. Phys. 15 013026 (11pp) berry456

  • Spectral Ergodicity in Deep Learning Architectures via Surrogate Random Matrices, Mehmet Süzen, Cornelius Weber, Joan J. Cerdà, arXiv:1704.08693

  • Periodic Spectral Ergodicity: A Complexity Measure for Deep Neural Networks and Neural Architecture Search, Mehmet Süzen, Cornelius Weber, Joan J. Cerdà, arXiv:1911.07831

Citation

If you use the ideas or tools from this package please do cite our manuscripts.

@article{suezen2017a,
    title={Spectral Ergodicity in Deep Learning Architectures via Surrogate Random Matrices},
    author={Mehmet Süzen and Cornelius Weber and Joan J. Cerdà},
    year={2017},
    eprint={1704.08303},
    archivePrefix={arXiv},
    primaryClass={stat.ML}
}
@article{suezen2019a,
    title={Periodic Spectral Ergodicity: A Complexity Measure for Deep Neural Networks and Neural Architecture Search},
    author={Mehmet Süzen and Cornelius Weber and Joan J. Cerdà},
    year={2019},
    eprint={1911.07831},
    archivePrefix={arXiv},
    primaryClass={stat.ML}
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bristol-0.2.7.tar.gz (26.2 kB view details)

Uploaded Source

File details

Details for the file bristol-0.2.7.tar.gz.

File metadata

  • Download URL: bristol-0.2.7.tar.gz
  • Upload date:
  • Size: 26.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.3

File hashes

Hashes for bristol-0.2.7.tar.gz
Algorithm Hash digest
SHA256 d111caf5d90d9987a328b41ea859cd0726da1069117b56aa1b196ce00a05eb30
MD5 3459ac7e3d9048aff2a8017a7f62f705
BLAKE2b-256 3a57f1330401d4b251950f45da5a86bdf16625d2da8cef5218ff8cbfe8f95eb9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page