{"slug": "zyphra-releases-zuna1-1-an-apache-2-0-eeg-foundation-model-with-variable-length", "title": "Zyphra Releases ZUNA1.1: An Apache 2.0 EEG Foundation Model With Variable-Length Inputs From 0.5 To 30 Seconds", "summary": "Zyphra released ZUNA1.1, an open-source EEG foundation model under Apache 2.0, that accepts variable-length inputs from 0.5 to 30 seconds and works across arbitrary channel layouts. The model builds on ZUNA1 with improved training stability, richer reconstruction tasks, and a larger corpus of 3.5M channel-hours, enabling denoising, reconstruction, and upsampling of EEG signals without sacrificing accuracy.", "body_md": "This week, Zyphra released ** ZUNA1.1 under the Apache 2.0 license**. The EEG foundation model reconstructs, denoises, and upsamples data across arbitrary channel layouts. It builds on ZUNA1, the Zyphra’s earlier open EEG foundation model.\n\nThe main change is flexibility, not a jump in raw accuracy. Real EEG recordings are messy. Sessions vary in length, and channels go noisy or drop out mid-session. Montages range from four-electrode headbands to 256-channel research caps. ZUNA1 processed only fixed five-second segments. ZUNA1.1 accepts variable-length inputs from 0.5 to 30 seconds.\n\n**What is ZUNA1.1?**\n\nTo understand that flexibility, start with what the model does.\n\nZUNA1.1 is a 380M-parameter masked diffusion autoencoder for scalp-EEG signals. Given a subset of channels, it denoises existing EEG segments and channels. It reconstructs missing ones. It also predicts novel channel signals given physical coordinates on the scalp.\n\nThe parameter count is unchanged from ZUNA1. It runs on a consumer GPU and works acceptably on CPU for many workloads. Weights sit on Hugging Face; inference and preprocessing code sit on GitHub. Install with `pip install zuna`\n\n. Zyphra also hosts a free browser EEG Playground, and ships all of this for research use only.\n\n**How The Architecture Works**\n\nThat flexibility rests on tokenization.\n\nZUNA is a transformer encoder–decoder diffusion autoencoder. It slices each channel into 0.125 second segments, which is 32 samples at 256 Hz. Each segment becomes a continuous-valued token. Tokens are serialized in channel × time order.\n\nThe positional encoding is the key idea. Each token carries a 4D rotary positional encoding over (x, y, z, t). That is the electrode’s 3D scalp coordinate along with its coarse-time index. Because position, not array index, tells the model where a channel sits, ZUNA is channel-agnostic. It accepts any electrode layout, and can generate signals at positions never recorded. That capability enables arbitrary channel upsampling by location.\n\nThe encoder compresses the signal into a latent. That latent conditions the decoder via adaptive-RMS norm. The decoder is trained with a rectified-flow objective. ZUNA1.1’s architectural changes targeted training stability, such as added normalization layers.\n\n**What Changed From ZUNA1**\n\nSince the architecture stayed close, the differences come from training.\n\n**1. Variable-length inputs (0.5–30 seconds)**: ZUNA1.1 samples a segment length per training example, snapped to the 0.125 s token grid. Lengths are drawn across four bins, from very short to long. The middle 1.5–10 s range is oversampled, since it is the most common operating point. Because token counts vary, Zyphra packs multiple segments per batch up to a fixed budget. Flex attention with a sample-aware mask stops tokens attending across samples. One model therefore serves a 0.5 s snippet and a 30 s stretch without reconfiguration.\n\n**2. A richer mixture of reconstruction tasks**: ZUNA1 trained on one dropout pattern: uniformly random whole channels. ZUNA1.1 trains on four. The first is whole-channel dropout, covering sparse montages and dead electrodes. The second removes short time stretches across every channel. The third removes those stretches from only some channels, clustering gaps in space and time. The fourth scatters missing values across individual points.\n\n**3. Quality-aware preprocessing and a bigger corpus**: ZUNA1 made channel-quality calls at the whole-recording level, discarding usable signal. ZUNA1.1 instead computes a per-channel, per-second quality score, thresholded at load time. That grew the corpus from roughly 2M to roughly 3.5M channel-hours of public EEG data. Zyphra team also precomputes two filter variants per recording: a 0.1–45 Hz bandpass, and a 0.01 Hz highpass along with notch. Generalizing across preprocessing strategies is a stated goal, not a benchmarked result.\n\n**The Results**\n\nConsequently, the question is whether flexibility cost accuracy.\n\nOn held-out tasks, ZUNA1.1 reaches better or essentially the same reconstruction NMSE as ZUNA1. Both clearly outperform classical spherical-spline interpolation from MNE. For fair comparison, those evaluation sets used exactly five-second samples.\n\nZyphra also ran a region-based test. Electrodes from one brain region are deleted, then reconstructed from the remaining seven. That setup is more realistic than random channel dropping. ZUNA1.1 outperforms both spherical-spline and ZUNA1 there.\n\n**Interactive Explainer**\n\nTo make those mechanics concrete, the demo below animates the pipeline end to end.\n\n**ZUNA1 vs ZUNA1.1**\n\nTaken together, the releases differ mostly in training, not architecture.\n\n| Attribute | ZUNA1 | ZUNA1.1 |\n|---|---|---|\n| Parameters | 380M | 380M |\n| Architecture | Transformer encoder–decoder diffusion autoencoder | Same, plus extra normalization layers |\n| Input length | Fixed 5 s | 0.5–30 s, snapped to 0.125 s grid |\n| Token | 0.125 s / 32 samples at 256 Hz | Same |\n| Positional encoding | 4D RoPE over (x, y, z, t) | Same |\n| Decoder objective | Rectified flow | Rectified flow |\n| Dropout schemes in training | 1 (uniform random whole-channel) | 4 (channel, time, channel×time, scattered) |\n| Training corpus | ~2M channel-hours | ~3.5M channel-hours |\n| Quality filtering | Whole-recording level | Per-channel, per-second score at load time |\n| Preprocessing variants | Single | Two (0.1–45 Hz bandpass; 0.01 Hz highpass + notch) |\n| License | Apache 2.0 | Apache 2.0 |\n| Reconstruction NMSE | Baseline | Equal or better |\n\n**Running It**\n\nTurning to practice, `reconstruct_fif`\n\nruns directly on `.fif`\n\nfiles with no `.pt`\n\nround-trip. The older four-step pipeline still ships alongside it.\n\n``` python\nfrom zuna import reconstruct_fif\n\nreconstruct_fif(\n    input_dir=\"fif_in\",\n    output_dir=\"fif_out\",\n    figures_dir=\"figures\",\n    gpu_device=0,                            # GPU id, or \"\" for CPU\n    segment_sec=5.0,                         # window length; default is 5.0, not the full 30 s\n    montage=\"standard_1020\",                 # fallback, used only if the file has no positions\n    repair_channels=[\"Cz\"],                  # channel(s) to fully reconstruct\n    target_channel_count=[\"Fz\", \"Pz\"],       # add/upsample new channels by name (or an int for auto)\n    bad_segments=[(5, 6), (10, 11, \"C3\")],   # mark time spans bad (all channels, or one)\n    sample_steps=50,                         # diffusion steps; note: not \"diffusion_sample_steps\"\n)\n```\n\nNote the defaults. `segment_sec`\n\nis 5.0, so the 0.5–30 s range needs setting explicitly. Electrode positions are read from the file itself. The `montage`\n\nargument is only a fallback when positions are absent, and channels without 3D coordinates are dropped.\n\nThe reconstruction target is a union. It combines the file’s own MNE bad channels and `BAD_`\n\nannotations with anything requested above. Two directories are written. `full_reconstruction/`\n\nholds model output everywhere. `hybrid/`\n\nkeeps the original and infills only inferred cells, plus a `_mask.npz`\n\n.\n\n**Use Cases With Examples**\n\nBecause masking is now flexible, several practical patterns open up.\n\n**Dead electrode**: Mark`repair_channels=[\"Cz\"]`\n\nto rebuild the channel from its neighbours.**Motion artifact in a trial**: Pass`bad_segments=[(10, 11, \"C3\")]`\n\nto clean one span on one channel.**Headband upsampling**: Feed four electrodes, then request extra`standard_1005`\n\npositions.**UI-driven cleaning**: Supply per-file masks via`mask_dir`\n\n, unioned into the target.\n\nCheck out the ** Model weight**,\n\n[and](https://github.com/Zyphra/zuna)\n\n**GitHub Repo****Also, feel free to follow us on**\n\n[Technical details](https://www.zyphra.com/our-work/zuna1.1).**and don’t forget to join our**[Twitter](https://x.com/intent/follow?screen_name=marktechpost)\n\n**and Subscribe to**\n\n[150k+ML SubReddit](https://www.reddit.com/r/machinelearningnews/)**. Wait! are you on telegram?**\n\n[our Newsletter](https://www.aidevsignals.com/)\n\n[now you can join us on telegram as well.](https://t.me/machinelearningresearchnews)Need to partner with us for promoting your GitHub Repo OR Hugging Face Page OR Product Release OR Webinar etc.? [Connect with us](https://forms.gle/wbash1wF6efRj8G58)\n\nAsif Razzaq is the CEO of Marktechpost Media Inc.. As a visionary entrepreneur and engineer, Asif is committed to harnessing the potential of Artificial Intelligence for social good. His most recent endeavor is the launch of an Artificial Intelligence Media Platform, Marktechpost, which stands out for its in-depth coverage of machine learning and deep learning news that is both technically sound and easily understandable by a wide audience. The platform boasts of over 2 million monthly views, illustrating its popularity among audiences.", "url": "https://wpnews.pro/news/zyphra-releases-zuna1-1-an-apache-2-0-eeg-foundation-model-with-variable-length", "canonical_source": "https://www.marktechpost.com/2026/07/17/zyphra-releases-zuna1-1-an-apache-2-0-eeg-foundation-model-with-variable-length-inputs-from-0-5-to-30-seconds/", "published_at": "2026-07-17 21:35:27+00:00", "updated_at": "2026-07-17 22:05:11.070765+00:00", "lang": "en", "topics": ["artificial-intelligence", "machine-learning", "ai-research", "ai-products"], "entities": ["Zyphra", "ZUNA1.1", "ZUNA1", "Hugging Face", "GitHub"], "alternates": {"html": "https://wpnews.pro/news/zyphra-releases-zuna1-1-an-apache-2-0-eeg-foundation-model-with-variable-length", "markdown": "https://wpnews.pro/news/zyphra-releases-zuna1-1-an-apache-2-0-eeg-foundation-model-with-variable-length.md", "text": "https://wpnews.pro/news/zyphra-releases-zuna1-1-an-apache-2-0-eeg-foundation-model-with-variable-length.txt", "jsonld": "https://wpnews.pro/news/zyphra-releases-zuna1-1-an-apache-2-0-eeg-foundation-model-with-variable-length.jsonld"}}