Skip to main content

Learning and Aligning Manifolds using Implicit Neural Representations.

Project description

LAMINR Logo

LAMINR (Learning and Aligning Manifolds of Single-Neuron Invariances using Implicit Neural Representations) enables the systematic discovery and alignment of invariance manifolds in stimulus space for visual sensory neurons, providing a principled way to characterize and compare neuronal invariances at the population level, independent of nuisance receptive field properties such as position, size, and orientation.

🚀 Highlights

  • Continuous Invariance Manifold Learning: Identifies the full space of stimuli that elicit near-maximal responses from a neuron.
  • Alignment Across Neurons: Learns transformations that align invariance manifolds across neurons, revealing shared invariance properties.
  • Functional Clustering: Uncovers distinct functional neuron clusters based on their invariance properties.
  • Model-Agnostic: Can be applied to any robust response-predicting model of biological neurons.
Method Overview

🛠 Installation (still working on it)

You can install LAMINR using one of the following methods:

1️⃣ Using pip

pip install laminr

2️⃣ Via GitHub (Latest Version)

pip install git+https://github.com/sinzlab/laminr.git

🔥 Quick Start

Here's a simple example of how to use LAMINR to learn and align invariance manifolds.

from laminr import neuron_models, get_mei_dict, InvarianceManifold

device = "cuda"
input_shape = [1, 100, 100]  # (channels, height, width)

# Load the trained neuron model
model = neuron_models.simulated("demo1", img_res=input_shape[1:]).to(device)

# Generate MEIs (Maximally Exciting Inputs)
image_constraints = {
    "pixel_value_lower_bound": -1.0,
    "pixel_value_upper_bound": 1.0,
    "required_img_norm": 1.0,
}
meis_dict = get_mei_dict(model, input_shape, **image_constraints)

# Initialize the invariance manifold pipeline
inv_manifold = InvarianceManifold(model, meis_dict, **image_constraints)

# Learn invariance manifold for neuron 0 (template)
template_idx = 0
template_imgs, template_activations = inv_manifold.learn(template_idx)

# Align the template to neurons 1 and 2
target_idxs = [1, 2]
aligned_imgs, aligned_activations = inv_manifold.match(target_idxs)

🛠 Questions & Contributions

If you encounter any issues while using the method, please create an Issue on GitHub.

We welcome and appreciate contributions to the package! Feel free to open an Issue or submit a Pull Request for new features.

For other questions or project collaboration inquiries, please contact mohammadbashiri93@gmail.com or loocabaroni@gmail.com.

📜 License

This package is licensed under the Creative Commons Attribution-NonCommercial 4.0 International (CC BY-NC 4.0) License. Briefly:

  • Attribution Required: You must credit the original authors and indicate if changes were made.
  • NonCommercial Use Only: This package may not be used for commercial purposes without explicit permission.
  • No Additional Restrictions: You may not apply legal terms that prevent others from using this package under these terms.

For full details, see the CC BY-NC 4.0 License.
For commercial use inquiries, please contact: mohammadbashiri93@gmail.com.

📖 Paper

ICLR 2025 (Oral): Learning and Aligning Single-Neuron Invariance Manifolds in Visual Cortex
Authors: Mohammad Bashiri*, Luca Baroni*, Ján Antolík, Fabian H. Sinz. (* denotes equal contribution)

Please cite our work if you find it useful:

@inproceedings{bashiri2025laminr,
  title={Learning and Aligning Single-Neuron Invariance Manifolds in Visual Cortex},
  author={Bashiri, Mohammad and Baroni, Luca and Antolík, Ján and Sinz, Fabian H.},
  booktitle={International Conference on Learning Representations (ICLR)},
  year={2025}
}

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

laminr-0.0.4.tar.gz (120.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

laminr-0.0.4-py3-none-any.whl (150.7 kB view details)

Uploaded Python 3

File details

Details for the file laminr-0.0.4.tar.gz.

File metadata

  • Download URL: laminr-0.0.4.tar.gz
  • Upload date:
  • Size: 120.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.21

File hashes

Hashes for laminr-0.0.4.tar.gz
Algorithm Hash digest
SHA256 0b4b501042fac708c8837714bed7124050adb6f52d1353faf3b7e5d61ed867a2
MD5 812f8509219d0291960fdde09cde0900
BLAKE2b-256 7808c1eefaaa09680716377833ea7e86d059f702b7737752e28105e8033fd5ac

See more details on using hashes here.

File details

Details for the file laminr-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: laminr-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 150.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.21

File hashes

Hashes for laminr-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 a6362758fef90c909e4350706b2c6c7e7f300fa5c0d3b373232d3238ae7e6b63
MD5 669bef399a304cb3eda7bb5b76518894
BLAKE2b-256 9c2b2c910d73d933154e0dd1c7ab9e211a4898ee8f4da577ada554cb12d8caa7

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