> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nimbusbci.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Changelog

> Release notes and upgrade notes for nimbus-bci: 0.10.0, 0.9.0, 0.8.x and 0.7.x, 0.6.0 — what changed, what breaks, and what to change in your code.

Release notes for the Python SDK, newest first. **The current release is 0.10.0** (2026-12-01) and **it is not additive** — if you are upgrading from 0.8 or 0.9, read the upgrade table under 0.10.0 before you upgrade. The topbar link to the package's PyPI history lists every file of every release.

> [!NOTE]
>
> A release's notes are kept as they were written. Where a later release corrected a figure, the correction is on the later release's entry, and the older entry says so.

***

## 0.10.0 — 2026-12-01

The trust layer is the default, SSVEP is fixed, and two Bayesian heads join the SDK.

### Upgrading from 0.8 or 0.9

Profiles saved by 0.8 or 0.9 still load. One default changed, and two behaviours you may rely on are different.

| Change | From | Impact | Action required |
| - | - | - | - |
| **`fit_calibrated` fits a certificate on four heads** | 0.8, 0.9 | **Unconditional** on `NimbusProbit`, `NimbusLDA`, `NimbusQDA`, `NimbusSoftmax` | Pass `method="accept_rate"` to keep the pinned rate |
| **SSVEP encoder defaults changed** | 0.9 | Profiles saved under the 0.9.0 defaults | Refit, or re-attach with `filter_bank="legacy", n_harmonics=2` |
| **Conformal gate under exact ties** | 0.9 | Posteriors without exact ties unchanged to the bit | Re-calibrate a gate calibrated on tied posteriors |
| **Conformal gate in a live loop** | 0.9 | Same trial scored twice can differ; accept rate moves to the batch's | None, if you read a loop's accept rate as what a batch reports |
| **Default head with more features than trials** | 0.8, 0.9 | No longer uniform | None; identity-prior heads are bit-identical |
| **Softmax models reload; settings survive reload** | 0.8, 0.9 | A softmax profile saved under 0.9.0 cannot be updated | Refit it |
| **Wheels only** | all | No sdist from 0.10.0 on | Check your platform has a wheel |

**`fit_calibrated`.** In 0.8 and 0.9 it pinned an accept rate: it tuned the confidence floor so that the target share of held-out trials passed. From 0.10.0, on the four heads above, it fits the risk gate at alpha 0.1 — a certificate that at most 10 % of all trials end in a wrong command being sent. `method` now defaults to `None` (the head's own gate) and accepts `"risk"`; `method="accept_rate"` is what 0.8 and 0.9 did; `method="conformal"` fits the conformal gate instead. Without a certificate nothing changes: the fixed gate stays, every `BrainState` carries `extras["gate_calibrated"] = False`, and a warning says so once per process. `NimbusFusion` is unchanged: `fit_calibrated` still pins an accept rate on it. A certificate costs labelled trials the head has not seen — at least nine for alpha 0.1, in practice 8–12 per class — and is void after any update of the head. Why the default changed: [Trust & calibration](https://docs.nimbusbci.com/personalizer/trust-and-calibration.md).

**SSVEP encoder defaults.** FBCCA now builds the cumulative Chebyshev sub-band bank of Nakanishi et al. (2018), with one reference harmonic per sub-band; TRCA keeps the band-limited three-band bank. **A profile saved under the 0.9.0 defaults must be refit** — re-attaching a new-default encoder to it fails loudly on the feature count. To keep using such a profile, re-attach with `make_fbcca_encoder(stim_freqs, sfreq=sfreq, filter_bank="legacy", n_harmonics=2)`. Encoder `state_dict`s written by 0.9.0 still load: FBCCA silently, TRCA with a warning that its stored geometry predates the per-sub-band fix.

**In a live loop.** `predict_one` — and any `predict` call that holds exactly one trial — now takes the next draw of the gate's deployment stream, exactly as each row of a batch takes its own. Before, a loop re-seeded on every call and the gate turned into a fixed one: on one decoder a loop certified 100 % of the trials where a batch certifies 84 %. The stream position is saved with the profile (`live_draws`); profiles written earlier load unchanged and start at the first draw.

### Added

* **`Personalizer.calibrate_risk_gate` — a confidence bar that bounds wrong commands.** Promises that at most `alpha` of **all** trials end in a wrong command being sent, by conformal risk control. Deterministic; composes with the conformal gate; saved with the model and the profile. `nimbus_bci.metrics.risk_gate` exports `RiskGate`, `risk_control_bar` and `evaluate_risk_gate`.
* **`NimbusProbit` — a Bayesian probit head with honest confidence on few trials.** `Personalizer(..., head="probit")`. Read by expectation propagation on the trials, so features may outnumber trials many times over. As accurate as a plain logistic regression and better calibrated; a calibration claim, not a decoding one. [Model page](https://docs.nimbusbci.com/models/nimbusprobit-python.md).
* **A certificate decides on four heads.** On `NimbusProbit`, `NimbusLDA`, `NimbusQDA` and `NimbusSoftmax` a fresh conformal or risk gate replaces the confidence floor and entropy ceiling.
* **SSVEP: TDCA and `NimbusFusion`.** `SsvepTdcaEncoder` reaches 0.97 at 1 s on the 40-class Wang2016 grid. `NimbusFusion` makes the classic decision a head whose accuracy is the rule's. The README's recipe reaches 0.966 at 1 s on Nakanishi 2015. [SSVEP](https://docs.nimbusbci.com/personalizer/ssvep.md) · [NimbusFusion](https://docs.nimbusbci.com/models/nimbusfusion.md).
* **Deciding inside a certified set.** `choose_within_sets` / `spell_with_prior` pick, in each certified prediction set, the member a language prior finds most plausible. Raises the information rate, not the guarantee.
* **Each gate's own verdict on every `BrainState`.** `extras["conformal_set"]` and `extras["risk_passed"]` let a loop running both gates audit each promise on its own.
* **`NimbusLDA(kappa0=...)`** — the prior weight on the class means, as a number or chosen by cross-validation. Better calibrated than the default head when features outnumber trials; a plain `LogisticRegression` is still more accurate.
* **Certified typing over LSL.** `examples/certified_typing_live.py` runs the deployed SSVEP path one trial at a time; `examples/lsl_speller_standin.py` stands in for a speller application.
* **Research previews.** `nimbus_bci.sleep` — sleep staging over any frozen encoder; the API is buildable, accuracy on real nights is not a measured claim. `Personalizer.for_errp(...)` — an error-potential recipe with no certified cell.

### Changed

* **The pinned-rate gate can let the entropy ceiling yield.** On three or more classes `calibrate_decision_gate(..., entropy="keep")` is the unchanged default and now says so; `entropy="yield"` raises the ceiling to the smallest value that lets the target share through. The ceiling is a config value as well: `DecisionConfig(entropy_threshold=...)`.
* **No sdist is published.** It carried the plaintext of the compiled modules, which undid the compilation. Wheels: macOS (x86\_64, Apple Silicon), Linux x86\_64 (`manylinux_2_28`), Windows AMD64, CPython 3.11 to 3.13. See [Installation](https://docs.nimbusbci.com/python-sdk/installation.md).

### Fixed

* **The conformal gate lost its coverage under tied posteriors.** A classifier that emits exactly tied posteriors was certified when it should have abstained: with every posterior flat, realized coverage was 0.025 against a nominal 0.90. Calibration now uses the same rank order as prediction; on Wang2016's TRCA head coverage moves from −0.142 below nominal to +0.007 above it. Posteriors without exact ties are unchanged to the bit.
* **The conformal gate froze its randomization in a live loop** — see *Upgrading* above.
* **The SSVEP encoders.** TRCA now learns one spatial filter per class per sub-band; TRCA no longer depends on the units of the data; FBCCA no longer reads noise from rank-deficient trials such as an average reference; the default FBCCA reference gets one harmonic per sub-band.
* **The head contract.** A softmax model now reloads — 0.9.0 refused its own artifact — and its labelled history is saved with it. `evaluate_cv` scores the head it was given, and a head's constructor settings survive `load` and `from_profile`.
* **The default head when features outnumber the trials** no longer returns a uniform distribution for every trial. `Personalizer(head="lda")` is `NimbusLDA(prior_fraction=0.05)`; its scatter is now the OAS-shrunk pooled covariance in that case.

### Corrected

* **The 0.9.0 figure for classic FBCCA — 0.668 at 4 s on Wang2016 — measured the encoder defects and is withdrawn.** With the fixes it reads 0.936 \[0.882, 0.978] at 4 s and 0.723 at 2 s.

***

## 0.9.0 — 2026-11-17

The certified decision layer, and the third paradigm. The upgrade from 0.8 is additive — defaults are byte-identical, test-pinned.

> [!NOTE]
>
> 0.10.0 corrected two SSVEP figures of this release: its encoders carried defects that held them far below the published decoders.

### Added

* **Conformal prediction-set gating — a certified bound, not a pinned rate.** `Personalizer.calibrate_conformal_gate(X_val, y_val, alpha=0.1)` fits adaptive prediction sets on held-out trials: distribution-free under exchangeability, the true label is in the set at least `1 − alpha` of the time. With the default singleton gate, the probability that an emitted command should have been rejected is at most `alpha`. Also as the one-call recipe, `fit_calibrated(..., method="conformal")`.
* **Mechanical certificate staleness.** The certification is stamped with the head revision and geometry it was calibrated at. Any online adaptation flips `Personalizer.conformal_stale` to `True` and stamps every trial with `BrainState.extras["conformal_stale"]`. The flag survives `restore_head`, deliberately.
* **SSVEP — the third paradigm.** `nimbus_bci.ssvep` with filter-bank CCA and TRCA, `Personalizer.for_ssvep(classes, stim_freqs, sfreq=...)`, and the Bayesian head on top. numpy and scipy only; no new extra.
* **Guards.** A reference harmonic past Nyquist raises rather than aliasing; an under-resolved stimulus grid warns; `sfreq` is mandatory; a changed epoch length is refused.

### Readings recorded as they came

* **On a low-SNR corpus.** On MAMEM3's single-trial SNR the prediction sets were the full class list for 9 of 11 subjects: the gate refused to certify single decisions, and said so.
* **The SSVEP encoders underperformed the literature.** In 0.9.0's encoders, classic FBCCA read 0.668 at 4 s on Wang2016 and TRCA failed to replicate. 0.10.0 traced both to encoder defects and corrected them.

***

## 0.8.x and 0.7.x — 2026-09 to 2026-10

### Upgrading from 0.6 or 0.7

Nothing in 0.7 or 0.8 breaks existing saved profiles or bundles from 0.6. The upgrade introduces new guardrails, deployment contracts, and an opt-in safety layer:

| Change | Version | Impact | Action required |
| - | - | - | - |
| **`adapt_pseudo` hardened** | 0.8.0 | **Unconditional** behavioural change | Heads without MC sampling now fail closed; epistemic threshold defaults to 0.45; cap at 200 updates |
| **Online Safety Layer** | 0.8.0 | Opt-in | Wrap adaptation loops with `SafetyConfig` and `LabelBudget` |
| **Head Snapshot & Rollback** | 0.8.0 | New capability | Use `snapshot_head()` and `restore_head()` to revert degraded adaptations |
| **Precomputed Embeddings** | 0.7.0 | New contract | Pass `x_kind="embeddings"` when serving pre-extracted feature vectors |
| **Joint Gate Calibration** | 0.7.2 | Calibration fix | `fit_calibrated` now pins realized accept rates accurately for multiclass ($K > 2$) |
| **Balanced Accuracy** | 0.7.3 | Metric addition | Available on `EvaluationResult` and `nimbus_bci.metrics.balanced_accuracy` |
| **Format-2 Session Bundles** | 0.7.1 | Integrity check | Bundles verify SHA-256 digests; post-save metadata edits are refused by design |

**`adapt_pseudo`.** In 0.6 its entropy and epistemic gates were disabled by default (`None`). In 0.8.0+ the entropy gate defaults to $0.60 \cdot \log_2(K)$ bits (class-count-aware), the epistemic gate to $0.45$ (normalized scale), the cumulative update cap to `max_pseudo_updates=200` per session, and a model without Monte Carlo sampling **refuses** with `AdaptationRefusedError` rather than self-training unguided. Either enable MC sampling (`mc=MCSamplingConfig.head_only(32)`) or pass `epistemic=1.0` if you accept unguided self-training. For multiclass problems ($K \ge 4$), the default epistemic threshold may need re-tuning for your uncertainty scale.

**Precomputed embeddings (`x_kind="embeddings"`).** If your pipeline serves precomputed embeddings, declare it at construction (`Personalizer(x_kind="embeddings", classes=...)`); `encoder.encode()` is never called. Trunk adaptation (`adapt_trunk`, `adapt_async`, `fit_tent`) and Riemannian reference tracking cannot operate on precomputed embeddings and raise `PersonalizerInputError`. The contract round-trips through profile metadata (`export_profile()` / `from_profile()`).

**Head snapshot and rollback.** `snapshot = p.snapshot_head()` before adapting; `p.restore_head(snapshot)` to undo an update that failed verification. Enforcement is session-scoped: `save()` and `load()` do not persist safety counters — attach a fresh `SafetyConfig` when loading a profile. Details: [Online Safety Layer](https://docs.nimbusbci.com/personalizer/safety.md).

***

## 0.6.0 — 2026-09-13

The personalization release: factories, portable profiles, paradigm recipes, cheaper online adaptation.

### Upgrading from 0.5

| Change | Impact | Action required |
| - | - | - |
| **Decision presets renamed** | **Breaking** — old strings raise `ValueError` | `"research"` → `"strict"`, `"consumer"` → `"permissive"` (also available: `"aggressive"`) |
| **Middleware imports regrouped** | **Breaking** — no compatibility shims | `middleware.adapt_gate` / `decision` → `middleware.policies.…`; transforms → `middleware.alignment`; PEFT / TTA → `middleware.techniques` |
| **Dependency floors** | `scikit-learn >= 1.6`, Python `>=3.11,<3.14`, `[train]` torch `>=2.14` | Upgrade if pinned lower |
| **Compiled extensions** | A stale `learning.*.so` can shadow new source | Rebuild after upgrading from source (`scripts/build_extensions.py`) |

The public top-level API (`from nimbus_bci import Personalizer, …`) is unchanged. Prefer factories over preset strings: `Personalizer.for_deployment(enc, classes)` is the strict gate, `for_research` the permissive one with the knobs.

### Added

* Factories `for_deployment`, `for_research`, `for_features`, `for_riemann`, `for_p300`, `for_balora`; `fit_calibrated(...)`; the adaptation gateway `adapt(...)` / `adapt_async(...)` with `BrainStateBatch`.
* Portable profiles `export_profile` / `from_profile` / `UserProfile`, and the MI / P300 session bundles. Session-bundle sidecars require `trusted=True` on load; `save` records `sidecar_sha256`, verified before unpickle.
* P300 / Riemann / MI recipes — see [Paradigms & profiles](https://docs.nimbusbci.com/personalizer/paradigms.md). Embedding transforms and opt-in `[train]` PEFT / BaLoRA — see [Research](https://docs.nimbusbci.com/personalizer/research.md).
* `calibration_status` / `suggest_calibration_trials`; optional forgetting `λ<1` and `prior_fraction=` on LDA/QDA; metrics `cohen_kappa`, `roc_auc_score`, `brier_score`, `temperature_scale_logits`; `adapt_errp`, `adapt_pseudo`, `fit_tent`, T3A, `fit_population` (research).
* Update **cost** is the robust claim (held even where accuracy gates failed) — cite wall-time ratios, details on [Evidence](https://docs.nimbusbci.com/personalizer/evidence.md).

## Next read

> [card] [Installation](https://docs.nimbusbci.com/python-sdk/installation.md)
>
> Wheels, platforms and the optional extras.

> [card] [Trust & calibration](https://docs.nimbusbci.com/personalizer/trust-and-calibration.md)
>
> The risk gate, the conformal gate, and the certificate default.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.