Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Infomorphic Networks

This repository contains the PyTorch implementation of im_net, a neuron/layer type (IM_Layer) that optimizes local objective functions built from Partial Information Decomposition (PID) instead of end-to-end gradient descent. It hosts the code for two papers, each in its own subfolder with its own README:

Contributors

This repository was developed by Valentin Neuhaus, Andreas C. Schneider, David A. Ehrlich and Mark Blümel, and is actively maintained by the authors.

System Requirements

Operating system

Developed and tested mostly on Linux. No Windows nor macOS-specific testing has been performed.

Software dependencies

All Python dependencies are listed in env.yml and installed via conda. Key dependencies include PyTorch, Hydra (1.2), Optuna (2.10), and scikit-learn — see env.yml for the complete list.

Hardware requirements

No non-standard hardware is required. An NVIDIA GPU is optional and only used to accelerate training; training also runs on CPU via params.pref_gpu=False (or exp_params.pref_gpu=False in paper_trivariate).

Installation guide

Clone the repository

git clone <repository-url>
cd infomorph_networks

Optional: alternative PID estimators

im_net can optionally compute PID atoms with two additional third-party estimators (dit, BROJA_2PID) for comparison, vendored as git submodules under external/. They are not required for training or reproducing the papers' main results. To add them:

git submodule update --init --recursive

Create the environment

conda env create -f env.yml
conda activate infomorphic_env

Typical install time

Around 10 minutes on a standard desktop (excluding submodule/package download time, which depends on network speed).

Running the code

All commands must be run from the repository root, since im_net loads moebius.pkl (provided at the repository root) using a path relative to the current working directory.

Both papers configure and override runs the same way, via Hydra: parameters live in each paper's conf/ folder as YAML, and any value can be overridden on the command line, e.g. to change the number of training epochs. See each paper's own README for its entry points, available models, and example commands:

All results (performance, PID atom sizes, and the parameters used) are saved to an experiments folder, in a subfolder named after the run's timestamp.

License

This project is licensed under the BSD 3-Clause License — see LICENSE for details.

Contacts

The corresponding author for the code is valentin.neuhaus@ds.mpg.de. For questions, also reach out to us at mark.bluemel@ds.mpg.de, andreas.schneider@ds.mpg.de.

About

Code to reproduce the results of the papers "What should a neuron aim for? Designing local objective functions based on information theory" and "Redundancy Maximization as a Principle of Associative Memory Learning in Hopfield Networks"

Topics

Resources

Stars

16 stars

Watchers

5 watching

Forks

Releases

Packages

Contributors

Languages