SENA Discrepancy VAE implementation for scvi-tools
Details on the architecture and rationale can be found in the original paper: arXiv:2506.12439.
SENADVAE is a customized implementation of the SENA discrepancy variational autoencoder within the scvi-tools framework.
It is designed to handle the specific training dynamics and data structures required for perturb-seq transcriptomic experiments.
-
module.py
Defines the neural network architecture adapted to meetscvi-toolsrequirements.
Includes generative and inference functions. -
training_plan.py
Implements a custom training plan to handle SENA’s complex optimization scheme:- Dynamic scheduling of loss parameters.
- Separate reconstruction losses for control and perturbed transcriptomic profiles.
-
dataloader.py
Provides utilities for pre-processing perturb-seq.h5adfiles.
Ensures input data is structured according to SENADVAE’s requirements and scvi expectations. -
model.py
Contains the coreSENADVAEclass, responsible for:- Initializing model components.
- Wrapping the architecture into a
scvi-toolscompatible model. - Defining custom inference methods for pertubation prediction.
- Implementing metric generation utilities (e.g., reconstruction accuracy, discrepancy measures).
- Incudes key internal layer extraction.