WHY MATHEMATICS?
Why Mathematics? | PASTE2 for Partial Tissue Overlap: Partial Fused Transport, Overlap Fractions, Frank–Wolfe Optimization and Generalized Procrustes
How PASTE2 aligns only the overlapping mass of adjacent tissue slices, estimates overlap and reconstructs 3D structure without forcing slice-specific regions to match.
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
- Allow unmatched spots through partial optimal transport
- Estimate and stress-test the overlap fraction
- Solve the partial fused objective with conditional gradients
- Reconstruct several slices with generalized Procrustes
Chapter map
- 1. Unequal slice coverage
- 2. Expression cost
- 3. Spatial structure cost
- 4. Partial mass constraint
- 5. Unmatched rows and columns
- 6. Partial fused objective
- 7. Overlap model selection
- 8. Conditional-gradient linearization
- 9. Linear transport direction
- 10. Frank–Wolfe step size
- 11. Optional histology cost
- 12. Partial correspondence map
- 13. Pairwise coordinate alignment
- 14. Generalized Procrustes
- 15. 3D reconstruction
- 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. Unequal slice coverage
Here the geometry becomes operational. Adjacent sections may contain different tissue footprints.
A concrete situation
One slice includes a lobe absent from the next.
What the mathematics does not license
Full matching invents correspondences. The habit of checking assumptions is one of the practical benefits of learning mathematics.
Try it, check it, transfer it
Map observed overlap first. 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. Expression cost
This step deserves a careful pause. Shared genes define cross-slice molecular dissimilarity.
A concrete situation
Similar neuronal spots receive low feature cost.
What the mathematics does not license
Batch effects mimic difference. The same reasoning helps students move from an exercise to a real dataset.
Try it, check it, transfer it
Harmonize and challenge features. 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. Spatial structure cost
The useful question is not only how to calculate, but what the calculation assumes. Within-slice distances describe relative tissue geometry.
A concrete situation
A triangular region is compared across sections.
What the mathematics does not license
Local tearing violates geometry. That distinction matters because a correct formula can still answer the wrong operational question.
Try it, check it, transfer it
Use regional residuals. 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. Partial mass constraint
A small example makes the mechanism visible. Only s units of normalized mass may move.
A concrete situation
s equals 0.7 leaves 30 per cent unmatched.
What the mathematics does not license
s directly changes the answer. The habit of checking assumptions is one of the practical benefits of learning mathematics.
Try it, check it, transfer it
Report several plausible values. 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. Unmatched rows and columns
This is where modelling choices begin to affect evidence. Coupling marginals are inequalities rather than full equalities.
A concrete situation
A slice-specific spot receives zero transported mass.
What the mathematics does not license
Zeros may reflect poor cost scaling. The same reasoning helps students move from an exercise to a real dataset.
Try it, check it, transfer it
Inspect unmatched 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.
6. Partial fused objective
The central mathematical idea is concrete. Feature and geometry terms are optimized over partial couplings.
A concrete situation
A correct overlap has low joint cost.
What the mathematics does not license
Cost cannot identify overlap perfectly alone. That distinction matters because a correct formula can still answer the wrong operational question.
Try it, check it, transfer it
Use anatomy and model selection. 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. Overlap model selection
Here the geometry becomes operational. Candidate s values are compared using the declared criterion.
A concrete situation
A grid from 0.3 to 1.0 is evaluated.
What the mathematics does not license
No criterion guarantees truth. The habit of checking assumptions is one of the practical benefits of learning mathematics.
Try it, check it, transfer it
Show the whole score curve. 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. Conditional-gradient linearization
This step deserves a careful pause. The nonlinear objective is approximated by its current gradient.
A concrete situation
A gradient matrix defines the next transport subproblem.
What the mathematics does not license
Poor conditioning slows progress. The same reasoning helps students move from an exercise to a real dataset.
Try it, check it, transfer it
Scale costs and report gaps. 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. Linear transport direction
The useful question is not only how to calculate, but what the calculation assumes. A feasible partial coupling minimizes the linearized cost.
A concrete situation
Mass moves toward lower-gradient pairs.
What the mathematics does not license
The direction depends on current Pi. That distinction matters because a correct formula can still answer the wrong operational question.
Try it, check it, transfer it
Repeat initializations. 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. Frank–Wolfe step size
A small example makes the mechanism visible. The new coupling mixes old and candidate directions.
A concrete situation
Gamma 0.2 moves one fifth of the way.
What the mathematics does not license
Aggressive steps can oscillate. The habit of checking assumptions is one of the practical benefits of learning mathematics.
Try it, check it, transfer it
Record line search and stopping. 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. Optional histology cost
This is where modelling choices begin to affect evidence. Image features can supplement molecular dissimilarity.
A concrete situation
H-and-E colour and texture support a match.
What the mathematics does not license
Stain batches create shortcuts. The same reasoning helps students move from an exercise to a real dataset.
Try it, check it, transfer it
Normalize and ablate images. 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. Partial correspondence map
The central mathematical idea is concrete. Rows show matched and unmatched probability mass.
A concrete situation
A boundary spot spreads mass over two partners.
What the mathematics does not license
Diffuse mass signals ambiguity. That distinction matters because a correct formula can still answer the wrong operational question.
Try it, check it, transfer it
Report entropy and coverage. 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. Pairwise coordinate alignment
Here the geometry becomes operational. Matched mass weights a transformation between two slices.
A concrete situation
A partial region guides rotation and translation.
What the mathematics does not license
Asymmetric anchors bias the transform. The habit of checking assumptions is one of the practical benefits of learning mathematics.
Try it, check it, transfer it
Plot landmark residuals. 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. Generalized Procrustes
This step deserves a careful pause. Several sections are aligned jointly to a common frame.
A concrete situation
Six slices update transforms around a consensus.
What the mathematics does not license
Reference and overlap affect convergence. The same reasoning helps students move from an exercise to a real dataset.
Try it, check it, transfer it
Run alternative references. 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. 3D reconstruction
The useful question is not only how to calculate, but what the calculation assumes. Aligned 2D sections form a partial tissue volume.
A concrete situation
Sixteen embryo slices reconstruct gene patterns.
What the mathematics does not license
Slice spacing and orientation matter. That distinction matters because a correct formula can still answer the wrong operational question.
Try it, check it, transfer it
Record physical z distances. 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
A small example makes the mechanism visible. Version s, alpha, costs, image features, solver and transforms.
A concrete situation
A student solves a 3-by-3 partial plan.
What the mathematics does not license
Unmatched is a model outcome. The habit of checking assumptions is one of the practical benefits of learning mathematics.
Try it, check it, transfer it
Write an overlap audit 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
- Day 1: define the decision, observation unit, X variables and Y or reference condition.
- Day 2: reproduce the smallest worked example and check every dimension, unit and sign.
- Day 3: build a transparent baseline and write what it assumes.
- Day 4: fit the main method inside a training-only pipeline; record every parameter.
- Day 5: challenge one assumption with a deliberately difficult dataset or operating regime.
- Day 6: compare validation metrics with the practical workload created by errors.
- 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
PASTE2 extends optimal-transport alignment to adjacent slices that overlap only partly. Instead of forcing all probability mass to move between two sections, partial fused Gromov–Wasserstein transport allows a declared fraction to remain unmatched. This is important when dissection, tissue damage, developmental change or technology creates slice-specific regions.
Two parameters make the scientific assumptions visible. Alpha balances feature dissimilarity against preservation of within-slice spatial relationships. The overlap fraction s states how much mass may be transported. A conditional-gradient, or Frank–Wolfe, algorithm repeatedly solves a linearized transport subproblem and moves the current coupling toward the new feasible direction.
PASTE2 also provides a model-selection procedure for overlap, optional histology information and generalized Procrustes reconstruction across several slices. These additions do not remove uncertainty. Alignment quality can change sharply with s, image normalization and asymmetrical missing regions, so report overlap sensitivity, unmatched spots, landmark residuals and independent anatomical checks.
Frequently asked questions
What problem does PASTE2 solve?
PASTE2 aligns adjacent spatial transcriptomics slices that may overlap only partly or contain slice-specific regions and cell types.
What is partial optimal transport?
It moves only a specified fraction of total mass between distributions, leaving the rest unmatched rather than forcing a questionable correspondence.
What is partial fused Gromov–Wasserstein transport?
It combines partial-mass constraints with feature and within-slice geometry costs in a fused-GW objective.
What is the overlap parameter s?
It is the fraction of mass allowed or required to be transported. The paper includes a model-selection procedure, but sensitivity still needs to be reported.
Why use Frank–Wolfe optimization?
The algorithm linearizes the objective at the current coupling, solves a feasible linear transport direction and chooses a step toward it.
Does an unmatched spot mean it has no biological counterpart?
No. It means the model did not assign transported mass under the chosen costs, overlap fraction and constraints.
Primary source and fact-check note
Max Land, Ron Zeira, Swati Mukherjee et al., “Partial alignment of multislice spatially resolved transcriptomics data,” Genome Research 33, 1125–1138 (2023), DOI 10.1101/gr.277670.123. 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
- PASTE full-overlap transport
- STAligner cross-slice anchors
- DeepST image integration
- How Mathematics Works
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
Coverage audit
Map real and expected overlap.
s audit
Show results across plausible mass fractions.
Cost audit
Scale expression, geometry and optional image terms.
Solver audit
Report Frank-Wolfe gaps and starts.
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.
Unmatched audit
Characterize zero-mass regions biologically.
Transform audit
Check anchor balance and residuals.
3D audit
Record z spacing and generalized-Procrustes reference.
Final claim
Unmatched mass is model-dependent.
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: Unequal slice coverage
Begin with this mechanism: Adjacent sections may contain different tissue footprints. Work through the concrete case: One slice includes a lobe absent from the next. Make the limitation visible: Full matching invents correspondences. Complete the evidence step: Map observed overlap first. Write the matrices, masses, kernels, costs, couplings, gradients, variational terms, critic scores or transformations with named dimensions and units. Calculate one small example by hand, then change one assumption and explain which output moves and why. Use complete tissue slices, donors, regions, modalities or gene panels outside tuning when testing transfer. Keep measurement, fitted representation, statistical evidence, biological interpretation and decision on separate notebook lines so a student, parent or reviewer can audit the mathematics.
Workshop 2: Expression cost
Begin with this mechanism: Shared genes define cross-slice molecular dissimilarity. Work through the concrete case: Similar neuronal spots receive low feature cost. Make the limitation visible: Batch effects mimic difference. Complete the evidence step: Harmonize and challenge features. Write the matrices, masses, kernels, costs, couplings, gradients, variational terms, critic scores or transformations with named dimensions and units. Calculate one small example by hand, then change one assumption and explain which output moves and why. Use complete tissue slices, donors, regions, modalities or gene panels outside tuning when testing transfer. Keep measurement, fitted representation, statistical evidence, biological interpretation and decision on separate notebook lines so a student, parent or reviewer can audit the mathematics.
Workshop 3: Spatial structure cost
Begin with this mechanism: Within-slice distances describe relative tissue geometry. Work through the concrete case: A triangular region is compared across sections. Make the limitation visible: Local tearing violates geometry. Complete the evidence step: Use regional residuals. Write the matrices, masses, kernels, costs, couplings, gradients, variational terms, critic scores or transformations with named dimensions and units. Calculate one small example by hand, then change one assumption and explain which output moves and why. Use complete tissue slices, donors, regions, modalities or gene panels outside tuning when testing transfer. Keep measurement, fitted representation, statistical evidence, biological interpretation and decision on separate notebook lines so a student, parent or reviewer can audit the mathematics.
Workshop 4: Partial mass constraint
Begin with this mechanism: Only s units of normalized mass may move. Work through the concrete case: s equals 0.7 leaves 30 per cent unmatched. Make the limitation visible: s directly changes the answer. Complete the evidence step: Report several plausible values. Write the matrices, masses, kernels, costs, couplings, gradients, variational terms, critic scores or transformations with named dimensions and units. Calculate one small example by hand, then change one assumption and explain which output moves and why. Use complete tissue slices, donors, regions, modalities or gene panels outside tuning when testing transfer. Keep measurement, fitted representation, statistical evidence, biological interpretation and decision on separate notebook lines so a student, parent or reviewer can audit the mathematics.
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: Unmatched rows and columns
Begin with this mechanism: Coupling marginals are inequalities rather than full equalities. Work through the concrete case: A slice-specific spot receives zero transported mass. Make the limitation visible: Zeros may reflect poor cost scaling. Complete the evidence step: Inspect unmatched biology. Write the matrices, masses, kernels, costs, couplings, gradients, variational terms, critic scores or transformations with named dimensions and units. Calculate one small example by hand, then change one assumption and explain which output moves and why. Use complete tissue slices, donors, regions, modalities or gene panels outside tuning when testing transfer. Keep measurement, fitted representation, statistical evidence, biological interpretation and decision on separate notebook lines so a student, parent or reviewer can audit the mathematics.
Workshop 6: Partial fused objective
Begin with this mechanism: Feature and geometry terms are optimized over partial couplings. Work through the concrete case: A correct overlap has low joint cost. Make the limitation visible: Cost cannot identify overlap perfectly alone. Complete the evidence step: Use anatomy and model selection. Write the matrices, masses, kernels, costs, couplings, gradients, variational terms, critic scores or transformations with named dimensions and units. Calculate one small example by hand, then change one assumption and explain which output moves and why. Use complete tissue slices, donors, regions, modalities or gene panels outside tuning when testing transfer. Keep measurement, fitted representation, statistical evidence, biological interpretation and decision on separate notebook lines so a student, parent or reviewer can audit the mathematics.
Workshop 7: Overlap model selection
Begin with this mechanism: Candidate s values are compared using the declared criterion. Work through the concrete case: A grid from 0.3 to 1.0 is evaluated. Make the limitation visible: No criterion guarantees truth. Complete the evidence step: Show the whole score curve. Write the matrices, masses, kernels, costs, couplings, gradients, variational terms, critic scores or transformations with named dimensions and units. Calculate one small example by hand, then change one assumption and explain which output moves and why. Use complete tissue slices, donors, regions, modalities or gene panels outside tuning when testing transfer. Keep measurement, fitted representation, statistical evidence, biological interpretation and decision on separate notebook lines so a student, parent or reviewer can audit the mathematics.
Workshop 8: Conditional-gradient linearization
Begin with this mechanism: The nonlinear objective is approximated by its current gradient. Work through the concrete case: A gradient matrix defines the next transport subproblem. Make the limitation visible: Poor conditioning slows progress. Complete the evidence step: Scale costs and report gaps. Write the matrices, masses, kernels, costs, couplings, gradients, variational terms, critic scores or transformations with named dimensions and units. Calculate one small example by hand, then change one assumption and explain which output moves and why. Use complete tissue slices, donors, regions, modalities or gene panels outside tuning when testing transfer. Keep measurement, fitted representation, statistical evidence, biological interpretation and decision on separate notebook lines so a student, parent or reviewer can audit the mathematics.
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: Linear transport direction
Begin with this mechanism: A feasible partial coupling minimizes the linearized cost. Work through the concrete case: Mass moves toward lower-gradient pairs. Make the limitation visible: The direction depends on current Pi. Complete the evidence step: Repeat initializations. Write the matrices, masses, kernels, costs, couplings, gradients, variational terms, critic scores or transformations with named dimensions and units. Calculate one small example by hand, then change one assumption and explain which output moves and why. Use complete tissue slices, donors, regions, modalities or gene panels outside tuning when testing transfer. Keep measurement, fitted representation, statistical evidence, biological interpretation and decision on separate notebook lines so a student, parent or reviewer can audit the mathematics.
Workshop 10: Frank–Wolfe step size
Begin with this mechanism: The new coupling mixes old and candidate directions. Work through the concrete case: Gamma 0.2 moves one fifth of the way. Make the limitation visible: Aggressive steps can oscillate. Complete the evidence step: Record line search and stopping. Write the matrices, masses, kernels, costs, couplings, gradients, variational terms, critic scores or transformations with named dimensions and units. Calculate one small example by hand, then change one assumption and explain which output moves and why. Use complete tissue slices, donors, regions, modalities or gene panels outside tuning when testing transfer. Keep measurement, fitted representation, statistical evidence, biological interpretation and decision on separate notebook lines so a student, parent or reviewer can audit the mathematics.
Workshop 11: Optional histology cost
Begin with this mechanism: Image features can supplement molecular dissimilarity. Work through the concrete case: H-and-E colour and texture support a match. Make the limitation visible: Stain batches create shortcuts. Complete the evidence step: Normalize and ablate images. Write the matrices, masses, kernels, costs, couplings, gradients, variational terms, critic scores or transformations with named dimensions and units. Calculate one small example by hand, then change one assumption and explain which output moves and why. Use complete tissue slices, donors, regions, modalities or gene panels outside tuning when testing transfer. Keep measurement, fitted representation, statistical evidence, biological interpretation and decision on separate notebook lines so a student, parent or reviewer can audit the mathematics.
Workshop 12: Partial correspondence map
Begin with this mechanism: Rows show matched and unmatched probability mass. Work through the concrete case: A boundary spot spreads mass over two partners. Make the limitation visible: Diffuse mass signals ambiguity. Complete the evidence step: Report entropy and coverage. Write the matrices, masses, kernels, costs, couplings, gradients, variational terms, critic scores or transformations with named dimensions and units. Calculate one small example by hand, then change one assumption and explain which output moves and why. Use complete tissue slices, donors, regions, modalities or gene panels outside tuning when testing transfer. Keep measurement, fitted representation, statistical evidence, biological interpretation and decision on separate notebook lines so a student, parent or reviewer can audit the mathematics.
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: Pairwise coordinate alignment
Begin with this mechanism: Matched mass weights a transformation between two slices. Work through the concrete case: A partial region guides rotation and translation. Make the limitation visible: Asymmetric anchors bias the transform. Complete the evidence step: Plot landmark residuals. Write the matrices, masses, kernels, costs, couplings, gradients, variational terms, critic scores or transformations with named dimensions and units. Calculate one small example by hand, then change one assumption and explain which output moves and why. Use complete tissue slices, donors, regions, modalities or gene panels outside tuning when testing transfer. Keep measurement, fitted representation, statistical evidence, biological interpretation and decision on separate notebook lines so a student, parent or reviewer can audit the mathematics.
Workshop 14: Generalized Procrustes
Begin with this mechanism: Several sections are aligned jointly to a common frame. Work through the concrete case: Six slices update transforms around a consensus. Make the limitation visible: Reference and overlap affect convergence. Complete the evidence step: Run alternative references. Write the matrices, masses, kernels, costs, couplings, gradients, variational terms, critic scores or transformations with named dimensions and units. Calculate one small example by hand, then change one assumption and explain which output moves and why. Use complete tissue slices, donors, regions, modalities or gene panels outside tuning when testing transfer. Keep measurement, fitted representation, statistical evidence, biological interpretation and decision on separate notebook lines so a student, parent or reviewer can audit the mathematics.
Workshop 15: 3D reconstruction
Begin with this mechanism: Aligned 2D sections form a partial tissue volume. Work through the concrete case: Sixteen embryo slices reconstruct gene patterns. Make the limitation visible: Slice spacing and orientation matter. Complete the evidence step: Record physical z distances. Write the matrices, masses, kernels, costs, couplings, gradients, variational terms, critic scores or transformations with named dimensions and units. Calculate one small example by hand, then change one assumption and explain which output moves and why. Use complete tissue slices, donors, regions, modalities or gene panels outside tuning when testing transfer. Keep measurement, fitted representation, statistical evidence, biological interpretation and decision on separate notebook lines so a student, parent or reviewer can audit the mathematics.
Workshop 16: Governance and learning
Begin with this mechanism: Version s, alpha, costs, image features, solver and transforms. Work through the concrete case: A student solves a 3-by-3 partial plan. Make the limitation visible: Unmatched is a model outcome. Complete the evidence step: Write an overlap audit card. Write the matrices, masses, kernels, costs, couplings, gradients, variational terms, critic scores or transformations with named dimensions and units. Calculate one small example by hand, then change one assumption and explain which output moves and why. Use complete tissue slices, donors, regions, modalities or gene panels outside tuning when testing transfer. Keep measurement, fitted representation, statistical evidence, biological interpretation and decision on separate notebook lines so a student, parent or reviewer can audit the mathematics.
