VIEW THIS AS

Auto mode follows the Route Engine until you choose a viewpoint.

YOU ARE HERE

ROUTE CHECK

CONNECTED TO

WHAT NEXT

Use the canonical route for this room, or HELP if you are unsure.

Why Mathematics? | gimVI for Missing Spatial Genes: Shared Latent Spaces, Masked Likelihoods, Adversarial Alignment and Imputation

WHY MATHEMATICS?

Why Mathematics? | gimVI for Missing Spatial Genes: Shared Latent Spaces, Masked Likelihoods, Adversarial Alignment and Imputation

How gimVI integrates genome-wide single-cell RNA counts with a smaller spatial gene panel, learns a shared latent representation and predicts unmeasured spatial genes with explicit count likelihoods and validation limits.

Why mathematics is important becomes easier to see when a real decision depends on it. This guide follows the mechanism from definitions and dimensions to a worked calculation, validation, practical learning and responsible use. It keeps factual evidence separate from interpretation and treats every illustrative scenario as an example rather than a promise of results.

Choose a reading route

  • Align sequencing and spatial cells in one latent probability space
  • Mask reconstruction losses to genes each assay truly measured
  • Use adversarial learning to reduce modality information in the latent code
  • Evaluate missing-gene predictions with held-out measurements and mismatched references

Chapter map

  1. 1. Two unpaired datasets
  2. 2. Gene-index mapping
  3. 3. Shared latent prior
  4. 4. Modality-aware encoder heads
  5. 5. Shared full-gene decoder
  6. 6. Per-modality gene renormalization
  7. 7. Count observation choices
  8. 8. Library-size variable
  9. 9. Masked reconstruction
  10. 10. KL regularization
  11. 11. Adversarial modality classifier
  12. 12. Alternating optimization
  13. 13. Worked masked example
  14. 14. Held-out-gene validation
  15. 15. Reference-mismatch challenge
  16. 16. Governance and learning

Visit the How Mathematics Works hub for the wider series and its connections to education, reasoning, science, computing, design and careers.


1. Two unpaired datasets

The central mathematical idea is concrete. One dataset measures many genes without location; the other measures a subset with location.

A concrete situation

scRNA has 10,000 genes while the spatial panel has 300.

What the mathematics does not license

Different donors can create domain shift. Keeping this boundary clear makes the result easier to audit and transfer.

Try it, check it, transfer it

Record tissue and condition match. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.


2. Gene-index mapping

Here the geometry becomes operational. A fixed mapping locates each spatial panel gene inside the full sequencing gene space.

A concrete situation

Spatial column 12 corresponds to sequencing gene index 843.

What the mathematics does not license

Identifier errors silently corrupt training. A trustworthy workflow records the choice before seeing the final test result.

Try it, check it, transfer it

Validate symbols and stable IDs. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.


3. Shared latent prior

This step deserves a careful pause. Every cell or spatial observation receives z drawn from a standard multivariate normal prior.

A concrete situation

A ten-dimensional z represents common biological variation.

What the mathematics does not license

Shared geometry is a model assumption. Evidence becomes stronger when the limitation is tested instead of hidden.

Try it, check it, transfer it

Test modality mixing and biology. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.


4. Modality-aware encoder heads

The useful question is not only how to calculate, but what the calculation assumes. Input heads accommodate different feature dimensions before producing a posterior mean and variance for z.

A concrete situation

A 300-gene spatial vector and 10,000-gene cell vector enter compatible latent space.

What the mathematics does not license

Small panels may weakly identify z. Keeping this boundary clear makes the result easier to audit and transfer.

Try it, check it, transfer it

Measure posterior uncertainty. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.

Did You Know? In this chapter, the most important number is useful only together with its construction rule. Changing scaling, sample membership or validation design can change the numerical answer without changing the arithmetic.


5. Shared full-gene decoder

A small example makes the mechanism visible. A single decoder maps z and batch covariates to normalized expression over the full sequencing gene set.

A concrete situation

A spatial z produces rates for measured and unmeasured genes.

What the mathematics does not license

Decoder output extrapolates beyond the panel. A trustworthy workflow records the choice before seeing the final test result.

Try it, check it, transfer it

Validate every target class. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.


6. Per-modality gene renormalization

This is where modelling choices begin to affect evidence. Decoded expression is renormalized over the genes observed in the current modality for its likelihood.

A concrete situation

Spatial probabilities sum across 300 panel genes.

What the mathematics does not license

Panel composition affects scale. Evidence becomes stronger when the limitation is tested instead of hidden.

Try it, check it, transfer it

Report exact panel. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.


7. Count observation choices

The central mathematical idea is concrete. Sequencing and spatial modalities can use ZINB, negative binomial or Poisson laws independently.

A concrete situation

Defaults may use ZINB for sequencing and NB for spatial counts.

What the mathematics does not license

Defaults change across implementations. Keeping this boundary clear makes the result easier to audit and transfer.

Try it, check it, transfer it

Record deployed configuration. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.


8. Library-size variable

Here the geometry becomes operational. Library size can be latent with a log-normal prior or fixed from observed total counts by modality.

A concrete situation

Sequencing models depth while spatial uses observed depth.

What the mathematics does not license

Depth and biology can be confounded. A trustworthy workflow records the choice before seeing the final test result.

Try it, check it, transfer it

Audit depth correlations. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.

Did You Know? In this chapter, the most important number is useful only together with its construction rule. Changing scaling, sample membership or validation design can change the numerical answer without changing the arithmetic.


9. Masked reconstruction

This step deserves a careful pause. Each modality contributes log likelihood only on its measured gene set.

A concrete situation

Spatial cells incur no loss for 9,700 unmeasured genes.

What the mathematics does not license

No loss means no direct spatial evidence. Evidence becomes stronger when the limitation is tested instead of hidden.

Try it, check it, transfer it

Mark predictions as transferred. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.


10. KL regularization

The useful question is not only how to calculate, but what the calculation assumes. KL divergence keeps approximate z and optional library posteriors near their priors.

A concrete situation

A complex encoding pays a larger KL cost.

What the mathematics does not license

Strong KL can blur rare states. Keeping this boundary clear makes the result easier to audit and transfer.

Try it, check it, transfer it

Inspect each loss term. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.


11. Adversarial modality classifier

A small example makes the mechanism visible. A classifier predicts sequencing versus spatial origin from z while the model learns to confuse it.

A concrete situation

Chance-level classifier accuracy suggests less modality signal.

What the mathematics does not license

Confusion can erase real condition differences. A trustworthy workflow records the choice before seeing the final test result.

Try it, check it, transfer it

Use matched-condition controls. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.


12. Alternating optimization

This is where modelling choices begin to affect evidence. Generative and classifier objectives update in alternating steps with a chosen adversarial weight.

A concrete situation

One step fits counts and the next fits domain prediction.

What the mathematics does not license

Training balance can oscillate. Evidence becomes stronger when the limitation is tested instead of hidden.

Try it, check it, transfer it

Publish curves and kappa. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.

Did You Know? In this chapter, the most important number is useful only together with its construction rule. Changing scaling, sample membership or validation design can change the numerical answer without changing the arithmetic.


13. Worked masked example

The central mathematical idea is concrete. Use four full genes and a two-gene spatial panel; compute which likelihood terms are present and which decoder values are predictions.

A concrete situation

Genes three and four receive no spatial reconstruction score.

What the mathematics does not license

The toy decoder is assumed correct. Keeping this boundary clear makes the result easier to audit and transfer.

Try it, check it, transfer it

Hide a measured gene and test it. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.


14. Held-out-gene validation

Here the geometry becomes operational. Remove measured spatial genes from training, impute them and compare against their untouched observations.

A concrete situation

Twenty panel genes are reserved before model fitting.

What the mathematics does not license

Random genes may be easier than pathways. A trustworthy workflow records the choice before seeing the final test result.

Try it, check it, transfer it

Stratify by abundance and function. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.


15. Reference-mismatch challenge

This step deserves a careful pause. Train on one donor or condition and test spatial data from another to measure failed transfer.

A concrete situation

A disease-specific programme absent from scRNA is smoothed toward healthy states.

What the mathematics does not license

Good latent mixing can mask error. Evidence becomes stronger when the limitation is tested instead of hidden.

Try it, check it, transfer it

Use complete-condition holdouts. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.


16. Governance and learning

The useful question is not only how to calculate, but what the calculation assumes. Version matrices, gene maps, likelihoods, masks, latent width, adversary and tests. This joins probability, AI and experimental design.

A concrete situation

Students can start with missing-data masks and KL.

What the mathematics does not license

An imputed gene is a prediction. Keeping this boundary clear makes the result easier to audit and transfer.

Try it, check it, transfer it

Write a spatial-imputation evidence card. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.

Did You Know? In this chapter, the most important number is useful only together with its construction rule. Changing scaling, sample membership or validation design can change the numerical answer without changing the arithmetic.


A seven-day practice lab

  1. Day 1: define the decision, observation unit, X variables and Y or reference condition.
  2. Day 2: reproduce the smallest worked example and check every dimension, unit and sign.
  3. Day 3: build a transparent baseline and write what it assumes.
  4. Day 4: fit the main method inside a training-only pipeline; record every parameter.
  5. Day 5: challenge one assumption with a deliberately difficult dataset or operating regime.
  6. Day 6: compare validation metrics with the practical workload created by errors.
  7. Day 7: present one supported conclusion, one unresolved uncertainty and one safe next experiment.

Questions for a student, parent or mentor

  • Which part of the model is a mathematical definition, and which part is a choice?
  • What small calculation would catch a sign, scale or dimension error?
  • What evidence comes from training, validation and the untouched test?
  • What benign condition could look like a fault or prediction failure?
  • How would the answer change for another response, asset, school project or time period?
  • What should a human review before acting on the score?

A method-specific audit before deployment

A gimVI audit links genome-wide scRNA-seq with a spatial assay that measures a subset of those genes. Both datasets use a shared latent variable and decoder over the full sequencing gene space. Each modality contributes a count likelihood only for genes it actually observes, and an adversarial classifier encourages the latent code to hide modality identity. Missing spatial genes are decoded predictions, not newly measured counts.

Record both raw count matrices, exact gene mappings, batches, spatial panel, likelihood family for each modality, library-size rule, latent width, encoder heads, shared decoder, masked reconstruction terms, KL terms, adversarial weight, minibatch cycling, training seeds and imputation summary. Current official documentation notes exactly two datasets and requires spatial genes to be a subset of sequencing genes.

Validate by hiding measured spatial genes before training, preserving complete tissue sections or donors as test data, comparing simple neighbourhood and mean baselines, checking modality leakage and testing reference mismatch. Prediction error must be reported by gene abundance and biological programme. A smooth imputed map can be plausible while still being wrong for a condition absent from the reference.


Frequently asked questions

What is gimVI?

gimVI is a joint variational autoencoder for one scRNA-seq dataset and one spatial transcriptomics dataset whose measured genes are a subset of the sequencing genes.

What is shared between modalities?

Both modalities use the same latent prior and shared decoder over the full sequencing gene space, while modality-aware input heads encode their different observed features.

What is a masked likelihood?

The reconstruction objective scores only genes actually measured by a modality. The spatial loss therefore ignores unmeasured genes rather than treating them as zeros.

Why use an adversarial classifier?

A classifier tries to predict modality from latent codes while the generative model tries to fool it, encouraging the two latent distributions to overlap.

How are missing spatial genes imputed?

A spatial profile is encoded from its measured panel and decoded through the full gene decoder. Values outside the panel are posterior model predictions transferred from shared structure.

Are imputed genes measurements?

No. They are conditional predictions whose accuracy depends on shared genes, reference match, training and model assumptions. Strong claims require held-out measured genes or another spatial assay.


Primary source and fact-check note

Romain Lopez, Achille Nazaret, Maxime Langevin et al., “A joint model of unpaired data from scRNA-seq and spatial transcriptomics for imputing missing gene expression measurements,” arXiv:1905.02269 (2019), DOI 10.48550/arXiv.1905.02269. Definitions and core claims in this article were checked against this primary publication. Calculations shown here were independently recomputed. Examples are educational illustrations; they are not reported industrial performance results.

Useful next reading

Keep the options open. Mathematics education supports clearer questions, transferable problem-solving skills and informed choices across science, engineering, computing, AI, statistics, design and many other careers. It does not guarantee intelligence, income, admission or employment; those outcomes depend on far more than one subject or model.

Extended laboratory: topic-specific validation and responsible use

Gene-map audit

Validate stable gene IDs, panel subset relation and duplicate handling.

Likelihood audit

Record each modality likelihood, dispersion and library rule.

Mask audit

Verify unmeasured spatial genes contribute no reconstruction loss.

Adversary audit

Track classifier and generative losses plus biological conservation.

Did You Know? A sophisticated adjustment can be algebraically correct and still answer the wrong scientific question when samples, labels, batches or validation boundaries are wrong.

Holdout audit

Hide measured spatial genes, donors and conditions before fitting.

Baseline audit

Compare mean, nearest-neighbour and simple regression predictions.

Reference mismatch

Test absent states and programme-specific error.

Final claim

Name panel, decoder and validation. Imputed expression is transferred prediction, not measurement.

Did You Know? A sophisticated adjustment can be algebraically correct and still answer the wrong scientific question when samples, labels, batches or validation boundaries are wrong.

Mechanism workshop: calculate, challenge and transfer

Workshop 1: Two unpaired datasets

Begin with this mechanism: One dataset measures many genes without location; the other measures a subset with location. Work through the concrete case: scRNA has 10,000 genes while the spatial panel has 300. Make the limitation visible: Different donors can create domain shift. Complete the evidence step: Record tissue and condition match. Write the matrices, count distribution, mixture, prior, loss function or mapping rule with named dimensions and units. Calculate one small example by hand, then change one assumption and explain which output moves and why. Use complete donors, tissue sections, spatial locations or gene panels outside tuning when testing transfer, because random rows from one specimen are not independent biological evidence. Keep observation, fitted parameter, prediction, interpretation and decision on separate notebook lines so a student, parent or reviewer can see exactly what the mathematics establishes.

Workshop 2: Gene-index mapping

Begin with this mechanism: A fixed mapping locates each spatial panel gene inside the full sequencing gene space. Work through the concrete case: Spatial column 12 corresponds to sequencing gene index 843. Make the limitation visible: Identifier errors silently corrupt training. Complete the evidence step: Validate symbols and stable IDs. Write the matrices, count distribution, mixture, prior, loss function or mapping rule with named dimensions and units. Calculate one small example by hand, then change one assumption and explain which output moves and why. Use complete donors, tissue sections, spatial locations or gene panels outside tuning when testing transfer, because random rows from one specimen are not independent biological evidence. Keep observation, fitted parameter, prediction, interpretation and decision on separate notebook lines so a student, parent or reviewer can see exactly what the mathematics establishes.

Workshop 3: Shared latent prior

Begin with this mechanism: Every cell or spatial observation receives z drawn from a standard multivariate normal prior. Work through the concrete case: A ten-dimensional z represents common biological variation. Make the limitation visible: Shared geometry is a model assumption. Complete the evidence step: Test modality mixing and biology. Write the matrices, count distribution, mixture, prior, loss function or mapping rule with named dimensions and units. Calculate one small example by hand, then change one assumption and explain which output moves and why. Use complete donors, tissue sections, spatial locations or gene panels outside tuning when testing transfer, because random rows from one specimen are not independent biological evidence. Keep observation, fitted parameter, prediction, interpretation and decision on separate notebook lines so a student, parent or reviewer can see exactly what the mathematics establishes.

Workshop 4: Modality-aware encoder heads

Begin with this mechanism: Input heads accommodate different feature dimensions before producing a posterior mean and variance for z. Work through the concrete case: A 300-gene spatial vector and 10,000-gene cell vector enter compatible latent space. Make the limitation visible: Small panels may weakly identify z. Complete the evidence step: Measure posterior uncertainty. Write the matrices, count distribution, mixture, prior, loss function or mapping rule with named dimensions and units. Calculate one small example by hand, then change one assumption and explain which output moves and why. Use complete donors, tissue sections, spatial locations or gene panels outside tuning when testing transfer, because random rows from one specimen are not independent biological evidence. Keep observation, fitted parameter, prediction, interpretation and decision on separate notebook lines so a student, parent or reviewer can see exactly what the mathematics establishes.

Did You Know? A sophisticated adjustment can be algebraically correct and still answer the wrong scientific question when samples, labels, batches or validation boundaries are wrong.

Workshop 5: Shared full-gene decoder

Begin with this mechanism: A single decoder maps z and batch covariates to normalized expression over the full sequencing gene set. Work through the concrete case: A spatial z produces rates for measured and unmeasured genes. Make the limitation visible: Decoder output extrapolates beyond the panel. Complete the evidence step: Validate every target class. Write the matrices, count distribution, mixture, prior, loss function or mapping rule with named dimensions and units. Calculate one small example by hand, then change one assumption and explain which output moves and why. Use complete donors, tissue sections, spatial locations or gene panels outside tuning when testing transfer, because random rows from one specimen are not independent biological evidence. Keep observation, fitted parameter, prediction, interpretation and decision on separate notebook lines so a student, parent or reviewer can see exactly what the mathematics establishes.

Workshop 6: Per-modality gene renormalization

Begin with this mechanism: Decoded expression is renormalized over the genes observed in the current modality for its likelihood. Work through the concrete case: Spatial probabilities sum across 300 panel genes. Make the limitation visible: Panel composition affects scale. Complete the evidence step: Report exact panel. Write the matrices, count distribution, mixture, prior, loss function or mapping rule with named dimensions and units. Calculate one small example by hand, then change one assumption and explain which output moves and why. Use complete donors, tissue sections, spatial locations or gene panels outside tuning when testing transfer, because random rows from one specimen are not independent biological evidence. Keep observation, fitted parameter, prediction, interpretation and decision on separate notebook lines so a student, parent or reviewer can see exactly what the mathematics establishes.

Workshop 7: Count observation choices

Begin with this mechanism: Sequencing and spatial modalities can use ZINB, negative binomial or Poisson laws independently. Work through the concrete case: Defaults may use ZINB for sequencing and NB for spatial counts. Make the limitation visible: Defaults change across implementations. Complete the evidence step: Record deployed configuration. Write the matrices, count distribution, mixture, prior, loss function or mapping rule with named dimensions and units. Calculate one small example by hand, then change one assumption and explain which output moves and why. Use complete donors, tissue sections, spatial locations or gene panels outside tuning when testing transfer, because random rows from one specimen are not independent biological evidence. Keep observation, fitted parameter, prediction, interpretation and decision on separate notebook lines so a student, parent or reviewer can see exactly what the mathematics establishes.

Workshop 8: Library-size variable

Begin with this mechanism: Library size can be latent with a log-normal prior or fixed from observed total counts by modality. Work through the concrete case: Sequencing models depth while spatial uses observed depth. Make the limitation visible: Depth and biology can be confounded. Complete the evidence step: Audit depth correlations. Write the matrices, count distribution, mixture, prior, loss function or mapping rule with named dimensions and units. Calculate one small example by hand, then change one assumption and explain which output moves and why. Use complete donors, tissue sections, spatial locations or gene panels outside tuning when testing transfer, because random rows from one specimen are not independent biological evidence. Keep observation, fitted parameter, prediction, interpretation and decision on separate notebook lines so a student, parent or reviewer can see exactly what the mathematics establishes.

Did You Know? A sophisticated adjustment can be algebraically correct and still answer the wrong scientific question when samples, labels, batches or validation boundaries are wrong.

Workshop 9: Masked reconstruction

Begin with this mechanism: Each modality contributes log likelihood only on its measured gene set. Work through the concrete case: Spatial cells incur no loss for 9,700 unmeasured genes. Make the limitation visible: No loss means no direct spatial evidence. Complete the evidence step: Mark predictions as transferred. Write the matrices, count distribution, mixture, prior, loss function or mapping rule with named dimensions and units. Calculate one small example by hand, then change one assumption and explain which output moves and why. Use complete donors, tissue sections, spatial locations or gene panels outside tuning when testing transfer, because random rows from one specimen are not independent biological evidence. Keep observation, fitted parameter, prediction, interpretation and decision on separate notebook lines so a student, parent or reviewer can see exactly what the mathematics establishes.

Workshop 10: KL regularization

Begin with this mechanism: KL divergence keeps approximate z and optional library posteriors near their priors. Work through the concrete case: A complex encoding pays a larger KL cost. Make the limitation visible: Strong KL can blur rare states. Complete the evidence step: Inspect each loss term. Write the matrices, count distribution, mixture, prior, loss function or mapping rule with named dimensions and units. Calculate one small example by hand, then change one assumption and explain which output moves and why. Use complete donors, tissue sections, spatial locations or gene panels outside tuning when testing transfer, because random rows from one specimen are not independent biological evidence. Keep observation, fitted parameter, prediction, interpretation and decision on separate notebook lines so a student, parent or reviewer can see exactly what the mathematics establishes.

Workshop 11: Adversarial modality classifier

Begin with this mechanism: A classifier predicts sequencing versus spatial origin from z while the model learns to confuse it. Work through the concrete case: Chance-level classifier accuracy suggests less modality signal. Make the limitation visible: Confusion can erase real condition differences. Complete the evidence step: Use matched-condition controls. Write the matrices, count distribution, mixture, prior, loss function or mapping rule with named dimensions and units. Calculate one small example by hand, then change one assumption and explain which output moves and why. Use complete donors, tissue sections, spatial locations or gene panels outside tuning when testing transfer, because random rows from one specimen are not independent biological evidence. Keep observation, fitted parameter, prediction, interpretation and decision on separate notebook lines so a student, parent or reviewer can see exactly what the mathematics establishes.

Workshop 12: Alternating optimization

Begin with this mechanism: Generative and classifier objectives update in alternating steps with a chosen adversarial weight. Work through the concrete case: One step fits counts and the next fits domain prediction. Make the limitation visible: Training balance can oscillate. Complete the evidence step: Publish curves and kappa. Write the matrices, count distribution, mixture, prior, loss function or mapping rule with named dimensions and units. Calculate one small example by hand, then change one assumption and explain which output moves and why. Use complete donors, tissue sections, spatial locations or gene panels outside tuning when testing transfer, because random rows from one specimen are not independent biological evidence. Keep observation, fitted parameter, prediction, interpretation and decision on separate notebook lines so a student, parent or reviewer can see exactly what the mathematics establishes.

Did You Know? A sophisticated adjustment can be algebraically correct and still answer the wrong scientific question when samples, labels, batches or validation boundaries are wrong.

Workshop 13: Worked masked example

Begin with this mechanism: Use four full genes and a two-gene spatial panel; compute which likelihood terms are present and which decoder values are predictions. Work through the concrete case: Genes three and four receive no spatial reconstruction score. Make the limitation visible: The toy decoder is assumed correct. Complete the evidence step: Hide a measured gene and test it. Write the matrices, count distribution, mixture, prior, loss function or mapping rule with named dimensions and units. Calculate one small example by hand, then change one assumption and explain which output moves and why. Use complete donors, tissue sections, spatial locations or gene panels outside tuning when testing transfer, because random rows from one specimen are not independent biological evidence. Keep observation, fitted parameter, prediction, interpretation and decision on separate notebook lines so a student, parent or reviewer can see exactly what the mathematics establishes.

Workshop 14: Held-out-gene validation

Begin with this mechanism: Remove measured spatial genes from training, impute them and compare against their untouched observations. Work through the concrete case: Twenty panel genes are reserved before model fitting. Make the limitation visible: Random genes may be easier than pathways. Complete the evidence step: Stratify by abundance and function. Write the matrices, count distribution, mixture, prior, loss function or mapping rule with named dimensions and units. Calculate one small example by hand, then change one assumption and explain which output moves and why. Use complete donors, tissue sections, spatial locations or gene panels outside tuning when testing transfer, because random rows from one specimen are not independent biological evidence. Keep observation, fitted parameter, prediction, interpretation and decision on separate notebook lines so a student, parent or reviewer can see exactly what the mathematics establishes.

Workshop 15: Reference-mismatch challenge

Begin with this mechanism: Train on one donor or condition and test spatial data from another to measure failed transfer. Work through the concrete case: A disease-specific programme absent from scRNA is smoothed toward healthy states. Make the limitation visible: Good latent mixing can mask error. Complete the evidence step: Use complete-condition holdouts. Write the matrices, count distribution, mixture, prior, loss function or mapping rule with named dimensions and units. Calculate one small example by hand, then change one assumption and explain which output moves and why. Use complete donors, tissue sections, spatial locations or gene panels outside tuning when testing transfer, because random rows from one specimen are not independent biological evidence. Keep observation, fitted parameter, prediction, interpretation and decision on separate notebook lines so a student, parent or reviewer can see exactly what the mathematics establishes.

Workshop 16: Governance and learning

Begin with this mechanism: Version matrices, gene maps, likelihoods, masks, latent width, adversary and tests. This joins probability, AI and experimental design. Work through the concrete case: Students can start with missing-data masks and KL. Make the limitation visible: An imputed gene is a prediction. Complete the evidence step: Write a spatial-imputation evidence card. Write the matrices, count distribution, mixture, prior, loss function or mapping rule with named dimensions and units. Calculate one small example by hand, then change one assumption and explain which output moves and why. Use complete donors, tissue sections, spatial locations or gene panels outside tuning when testing transfer, because random rows from one specimen are not independent biological evidence. Keep observation, fitted parameter, prediction, interpretation and decision on separate notebook lines so a student, parent or reviewer can see exactly what the mathematics establishes.