Zyphra/zuna

Python package for Zuna, an EEG foundation model for inference.

What it solves

ZUNA1.1 is designed to fix common issues in EEG (electroencephalogram) recordings, such as noisy data, missing channels (dead electrodes), or sparse electrode layouts. It allows researchers to denoise signals, reconstruct dropped channels, and upsample sparse montages to denser ones without needing to retrain the model for different hardware setups.

How it works

ZUNA1.1 is a 380M-parameter transformer encoder-decoder diffusion autoencoder. It processes EEG signals by slicing them into 0.125-second segments and treating them as tokens. Unlike traditional models that rely on a fixed list of channels, ZUNA uses 4D rotary positional encodings (x, y, z, t) based on the electrode's 3D scalp coordinates. This makes the model "channel-agnostic," meaning it can synthesize signals at any location on the scalp, regardless of the number or layout of the electrodes used during recording.

Who it’s for

It is intended for EEG researchers and BCI (Brain-Computer Interface) developers who need to clean and augment their neural data. It is explicitly not a diagnostic tool for clinical medical use.

Highlights

  • Flexible Montage Support: Works with any layout, from 4-channel headbands to 256-channel research caps.
  • Efficient Inference: Requires less than 1 GB of VRAM, allowing it to run on consumer GPUs, Macs (Apple Silicon), or CPUs.
  • Robust Training: Trained on 3.5M channel-hours of public EEG using four different dropout schemes to simulate real-world corruption (whole-channel, full-time, channel-time, and random-uniform).
  • Variable-length Inputs: Supports signal segments ranging from 0.5 to 30 seconds.
  • Easy Integration: Provides a Python API and a browser-based playground for quick denoising and upsampling.

Related

  • Project
  • Project
  • Project
  • Project
  • Project