Skip to main content

Joint Autoencoders (JAE1 channel-split, JAE2 JEPA) for neural signal denoising and manifold learning

Project description

pyjae: Joint Autoencoders (JAE) for Neural Signal Denoising

Python 3.10+ PyTorch License: MIT

pyjae (pronounced "pie-jay") is the official implementation of joint autoencoder models for denoising high-dimensional neural population recordings and recovering the low-dimensional manifold underneath, based on Altan et al. (2021).

Installation

pip install pyjae

Or with uv:

uv add pyjae

For development from source:

git clone https://github.com/egealtan/pyjae.git
cd pyjae
uv sync            # installs the package with the dev extras

Quick start

from pyjae import JAE, simulate_neural_data

# Simulate a 6D nonlinear manifold observed on 64 noisy channels
clean, noisy, info = simulate_neural_data(
    n_samples=400, n_channels=64, n_timepoints=96,
    latent_dim=6, snr_db=10.0, nonlinear=True, alpha=3.0, seed=0,
)

# Train the channel-split model and denoise
model = JAE(latent_dim=6)          # backend="jae1" by default
model.fit(noisy, epochs=200)
denoised = model.denoise(noisy)
print("VAF:", model.score(clean, denoised))

Use the JEPA backend for representation learning plus a denoising readout:

model = JAE(latent_dim=32, backend="jepa", patch_len=8, d_model=64)
model.fit(noisy, epochs=150)
denoised = model.denoise(noisy)

Package layout

Module Purpose
pyjae.api JAE facade (fit / denoise / score / save / load) over both backends
pyjae.models JAE1, JAE2, and shared encoder building blocks
pyjae.views Modular channel-split and JEPA-mask strategies
pyjae.data Simulator (Altan et al. generative model) and evaluation controls
pyjae.metrics Per-channel VAF plus a collapse-resistant latent-quality panel
pyjae.baselines PCA, Factor Analysis, denoising autoencoder, Wiener oracle
pyjae.eval Benchmark and evaluation harness

Requirements

  • Python >= 3.10
  • PyTorch >= 2.0, NumPy, scikit-learn, SciPy

Citation

@article{altan2021jae,
  title={Estimating the dimensionality of the manifold underlying multi-electrode neural recordings},
  author={Altan, Ege and Solla, Sara A. and Miller, Lee E. and Perreault, Eric J.},
  journal={PLOS Computational Biology},
  year={2021},
  volume={17},
  number={11},
  pages={e1008591},
  doi={10.1371/journal.pcbi.1008591}
}

License

MIT License. See LICENSE.

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

pyjae-0.2.2.tar.gz (66.4 kB view details)

Uploaded Source

Built Distribution

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

pyjae-0.2.2-py3-none-any.whl (52.0 kB view details)

Uploaded Python 3

File details

Details for the file pyjae-0.2.2.tar.gz.

File metadata

  • Download URL: pyjae-0.2.2.tar.gz
  • Upload date:
  • Size: 66.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pyjae-0.2.2.tar.gz
Algorithm Hash digest
SHA256 1739bf8d089272e96a491347d1bd8a4a39b313adcd08417f3ae74b15e23f6ba3
MD5 21b3269c81602db25a8783d17b828dc6
BLAKE2b-256 6f271cd515cd094bfe55ddbe8eedc19020810b4941bc3f3ec92297a8741e674a

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyjae-0.2.2.tar.gz:

Publisher: publish.yml on egealtan/pyjae

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyjae-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: pyjae-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 52.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pyjae-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 092eed65ee4b4ae20b9d0fb1c8dad998afc0ad6fb9ae5c7491a489e2d7652988
MD5 82896f6e63fa1930b70c35603618bee0
BLAKE2b-256 10c8bbd144dbce4665ecf91f04fb7efaff170dc1fb7cc114aee4dbc75e5e1b28

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyjae-0.2.2-py3-none-any.whl:

Publisher: publish.yml on egealtan/pyjae

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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