Skip to content

feat: joint embedding scvi#3884

Closed
ori-kron-wis wants to merge 4 commits into
mainfrom
Ori_joint-embedding-scvi
Closed

feat: joint embedding scvi#3884
ori-kron-wis wants to merge 4 commits into
mainfrom
Ori_joint-embedding-scvi

Conversation

@ori-kron-wis

Copy link
Copy Markdown
Collaborator

Ori's revision

vals and others added 4 commits June 24, 2026 22:26
Add JointEmbeddingSCVI, a self-supervised SCVI variant that augments the
standard ELBO with a cross-correlation objective (CCO) between the embedding
of the data and a binomially-thinned view of it, encouraging embeddings that
are robust to count dropout/noise. A VICReg-style variance term guards against
dimension collapse.

The joint-embedding loss is active only during training; evaluation
(get_elbo / get_marginal_ll / get_reconstruction_error) falls back to the
standard reweighted ELBO, and so does any minibatch with fewer than two cells.

Contents:
- src/scvi/module/_joint_embedding_utils.py: binomial thinning, per-cell
  thinning-probability sampling, cross-correlation and variance losses
- src/scvi/module/_joint_embedding_vae.py: JointEmbeddingVAE module
- src/scvi/model/_joint_embedding_scvi.py: JointEmbeddingSCVI model
- tests/model/test_joint_embedding_scvi.py, tests/module/test_joint_embedding_utils.py
- docs/api (user + developer) and CHANGELOG entries

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ori-kron-wis ori-kron-wis added the on-merge: backport to 1.4.x on-merge: backport to 1.4.x label Jun 25, 2026
@codecov

codecov Bot commented Jun 25, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.94737% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 88.50%. Comparing base (451d963) to head (4c43efb).

Files with missing lines Patch % Lines
src/scvi/external/joint_embedding_scvi/_module.py 98.03% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3884      +/-   ##
==========================================
+ Coverage   88.45%   88.50%   +0.04%     
==========================================
  Files         227      231       +4     
  Lines       22940    23035      +95     
==========================================
+ Hits        20292    20386      +94     
- Misses       2648     2649       +1     
Flag Coverage Δ
integration 74.18% <98.94%> (+0.10%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/scvi/external/__init__.py 100.00% <100.00%> (ø)
src/scvi/external/joint_embedding_scvi/__init__.py 100.00% <100.00%> (ø)
src/scvi/external/joint_embedding_scvi/_model.py 100.00% <100.00%> (ø)
src/scvi/external/joint_embedding_scvi/_utils.py 100.00% <100.00%> (ø)
src/scvi/external/joint_embedding_scvi/_module.py 98.03% <98.03%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

on-merge: backport to 1.4.x on-merge: backport to 1.4.x

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants