Skip to main content

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

Project description

JAE: Joint Autoencoders for Neural Signal Denoising and Manifold Learning

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.1.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.1-py3-none-any.whl (52.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyjae-0.2.1.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.1.tar.gz
Algorithm Hash digest
SHA256 49e83a9a67f0e9e11ce7d5b20d3c0f3fc4b3b35ee38a791b0bdd955bd03f74bc
MD5 f5e0bb951eb2acaed9afd8bdcda29466
BLAKE2b-256 3a7d3fa017a4bbef74c4f57c5672c0d06d73ad6d6a918c4ed338fa082bf751de

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyjae-0.2.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: pyjae-0.2.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 04c4a25bf6a8ca7333dc82e0d268b6ee3dc962027a0d674fec2e1161bae9c037
MD5 d59673bd1263d5cea8ac91bcddcccf52
BLAKE2b-256 a3ccfc93af2002b78d6450358584acc365a21a90a823f2a0b6c10e5546a965f4

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyjae-0.2.1-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