{"id":39333945,"url":"https://github.com/sinzlab/laminr","last_synced_at":"2026-01-18T02:06:22.040Z","repository":{"id":277061531,"uuid":"927911280","full_name":"sinzlab/laminr","owner":"sinzlab","description":"Learning and Aligning Manifolds using Implicit Neural Representations","archived":false,"fork":false,"pushed_at":"2025-11-21T13:05:03.000Z","size":1176,"stargazers_count":5,"open_issues_count":1,"forks_count":4,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-11-21T15:10:30.991Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sinzlab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-02-05T18:40:48.000Z","updated_at":"2025-11-21T13:05:06.000Z","dependencies_parsed_at":"2025-02-11T23:33:05.662Z","dependency_job_id":"fb09c8be-32cc-4d13-a9bc-fae6adef3164","html_url":"https://github.com/sinzlab/laminr","commit_stats":null,"previous_names":["sinzlab/laminr"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/sinzlab/laminr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinzlab%2Flaminr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinzlab%2Flaminr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinzlab%2Flaminr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinzlab%2Flaminr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sinzlab","download_url":"https://codeload.github.com/sinzlab/laminr/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinzlab%2Flaminr/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28526561,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T00:39:45.795Z","status":"online","status_checked_at":"2026-01-18T02:00:07.578Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-18T02:06:18.617Z","updated_at":"2026-01-18T02:06:22.033Z","avatar_url":"https://github.com/sinzlab.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/sinzlab/laminr/main/assets/logo.svg\" alt=\"LAMINR Logo\" width=\"100%\"\u003e\n  \u0026nbsp;\n\n  [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/sinzlab/laminr/blob/main/examples/laminr_quick_start.ipynb)\n  [![PyPI version](https://badge.fury.io/py/laminr.svg)](https://pypi.org/project/laminr/)\n  [![ICLR 2025 Paper](https://img.shields.io/badge/Paper-ICLR%202025_(Oral)-CA3FE6.svg?style=flat)](https://openreview.net/forum?id=kbjJ9ZOakb)\n  [![Talk @ ICLR](https://img.shields.io/badge/Talk-ICLR%202025-D77327.svg?style=flat)](https://youtu.be/psCQ65zjqPc?si=TjOVdUhLTYQ6JeVn)\n\n\u003c/div\u003e\n\n**LAMINR** (**L**earning and **A**ligning **M**anifolds of Single-Neuron Invariances using **I**mplicit **N**eural **R**epresentations) 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.\n\n### 🚀 Highlights\n\n- **Continuous Invariance Manifold Learning:** Identifies the full space of stimuli that elicit near-maximal responses from a neuron.\n- **Alignment Across Neurons:** Learns transformations that align invariance manifolds across neurons, revealing shared invariance properties.\n- **Functional Clustering:** Enables clustering neurons into distinct functional types based on their invariance properties.\n- **Model-Agnostic:** Can be applied to any robust response-predicting model of biological neurons.\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/sinzlab/laminr/main/assets/method.png\" alt=\"Method Overview\" width=\"90%\"\u003e\n\u003c/div\u003e\n\n## 🛠 Installation\n\nYou can install LAMINR using one of the following methods:\n\n### 1️⃣ Using `pip`\n```bash\npip install laminr\n```\n\n### 2️⃣ Via GitHub (Latest Version)\n```bash\npip install git+https://github.com/sinzlab/laminr.git\n```\n\n## 🔥 Quick Start\n\nHere's a simple example of how to use **LAMINR** to learn and align invariance manifolds.\n\n[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/sinzlab/laminr/blob/main/examples/laminr_quick_start.ipynb)\n\n\n```python\nfrom laminr import neuron_models, get_mei_dict, InvarianceManifold\n\ndevice = \"cuda\"\ninput_shape = [1, 100, 100]  # (channels, height, width)\n\n# Load the trained neuron model\nmodel = neuron_models.simulated(\"demo1\", img_res=input_shape[1:]).to(device)\n\n# Generate MEIs (Maximally Exciting Inputs)\nimage_constraints = {\n    \"pixel_value_lower_bound\": -1.0,\n    \"pixel_value_upper_bound\": 1.0,\n    \"required_img_norm\": 1.0,\n}\nmeis_dict = get_mei_dict(model, input_shape, **image_constraints)\n\n# Initialize the invariance manifold pipeline\ninv_manifold = InvarianceManifold(model, meis_dict, **image_constraints)\n\n# Learn invariance manifold for neuron 0 (template)\ntemplate_idx = 0\ntemplate_imgs, template_activations = inv_manifold.learn(template_idx)\n\n# Align the template to neurons 1 and 2\ntarget_idxs = [1, 2]\naligned_imgs, aligned_activations = inv_manifold.match(target_idxs)\n```\n\n## 🐳 Running with Docker\nWe have provided a Dockerfile for building an image with LAMINR pre-installed. Ensure that both **`docker`** and **`docker-compose`** are installed on your system. \n\nFollow the steps below to run **LAMINR** inside a Docker container with **Jupyter Lab**.\n\n**1. Clone the repository and navigate to the project directory:**\n```bash\ngit clone https://github.com/sinzlab/laminr.git\ncd laminr\n```\n\n**2. Run the following command inside the directory:**\n```bash\ndocker compose run -p 10101:8888 examples\n```\nThis command:\n- **Builds the Docker image** and creates a container.\n- **Exposes Jupyter Lab** on port **10101**.\n\n**3. Access Jupyter Lab:**\nJupyter Lab will launch in the **examples folder**, which you can open in your browser via\n[localhost:10101](http://localhost:10101) (the token can be found in the terminal logs).\n\n\n## 🛠 Questions \u0026 Contributions\n\nIf you encounter any issues while using the method, please create an [Issue](https://github.com/sinzlab/laminr/issues) on GitHub.\n\nWe welcome and appreciate contributions to the package! Feel free to open an [Issue](https://github.com/sinzlab/laminr/issues) or submit a [Pull Request](https://github.com/sinzlab/laminr/pulls) for new features.\n\nFor other questions or project collaboration inquiries, please contact mohammadbashiri93@gmail.com or loocabaroni@gmail.com.\n\n## 📜 License\n\nThis package is licensed under the **Creative Commons Attribution-NonCommercial 4.0 International (CC BY-NC 4.0) License**. Briefly:\n- **Attribution Required**: You must credit the original authors and indicate if changes were made.\n- **NonCommercial Use Only**: This package may not be used for commercial purposes without explicit permission.\n- **No Additional Restrictions**: You may not apply legal terms that prevent others from using this package under these terms.\n\nFor full details, see the [CC BY-NC 4.0 License](https://creativecommons.org/licenses/by-nc/4.0/).\u003cbr\u003e\nFor commercial use inquiries, please contact: mohammadbashiri93@gmail.com.\n\n## 📖 Paper\n\n**ICLR 2025 (Oral)**: [Learning and Aligning Single-Neuron Invariance Manifolds in Visual Cortex](https://openreview.net/forum?id=kbjJ9ZOakb) \u003cbr\u003e\n**Authors**: Mohammad Bashiri*, Luca Baroni*, Ján Antolík, Fabian H. Sinz. (* denotes equal contribution)\n\nPlease cite our work if you find it useful:\n\n```bibtex\n@inproceedings{bashiri2025laminr,\n  title={Learning and Aligning Single-Neuron Invariance Manifolds in Visual Cortex},\n  author={Bashiri, Mohammad and Baroni, Luca and Antolík, Ján and Sinz, Fabian H.},\n  booktitle={International Conference on Learning Representations (ICLR)},\n  year={2025}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsinzlab%2Flaminr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsinzlab%2Flaminr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsinzlab%2Flaminr/lists"}