Fine-Tuning scVI Model

Can you in effect drop genes to a subset of interest when fine-tuning a pre-trained scVI model?

I’m curious if this could be accomplished maybe by setting the contribution to the reconstruction error to zero for dropped genes? Or maybe create a new model for the gene subset and then pre-initialize the model weights using the matched dimensions in prior models’ module.state_dict()?

For some background, I’m using scVI to help model a single-cell atlas I’m working with and it has worked very well to remove technical variation from batch and cell quality. I think this is in part due to the large number of cells included in the atlas. Now I’d like to build scVI models for tailored subsets of celltypes (e.g. macrophages and monocytes) and filter to relevant genes, but I’d like to still leverage the learning from the full model.

We train models from scratch in this scenario. It is usually helpful to also include genes that weren’t included in the full model.

Thanks for the clarification, I was just curious if there was a validated approach for this use-case.

In case anyone’s interested I gave it a shot fine-tuning my model to my compartments of interest while retaining all genes and making no modification to my scANVI model architecture. Here are the loss curves

Major Compartment


Minor Compartment