WHY MATHEMATICS?
Why Mathematics? | SpaCell Multimodal Tissue Learning: Stain Normalization, ResNet50 Features, Dual Autoencoders and Patient-Level Validation
How SpaCell transforms histology tiles and gene counts into matched latent vectors for clustering and supervised disease prediction without hiding multimodal confounding.
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
- Normalize stain and centre image tiles on spatial spots
- Extract morphology features with a pretrained CNN
- Compress image and expression streams with dual autoencoders
- Split by patient and compare multimodal ablations
Chapter map
- 1. Whole-slide image
- 2. Colour-cast correction
- 3. Stain normalization
- 4. Spot-centred tiling
- 5. Image augmentation
- 6. ResNet50 feature extractor
- 7. Count preprocessing
- 8. Image autoencoder
- 9. Expression autoencoder
- 10. Latent concatenation
- 11. k-means objective
- 12. Pathology contour mapping
- 13. Two-stream classifier
- 14. Regularization
- 15. Cross-validation metrics
- 16. External and ablation validation
Visit the How Mathematics Works hub for the wider series and its connections to education, reasoning, science, computing, design and careers.
1. Whole-slide image
This step deserves a careful pause. Histology provides millions of pixel intensities.
A concrete situation
One H&E image covers 4,000 spots.
What the mathematics does not license
Stain and scanner batches confound biology. A trustworthy workflow records the choice before seeing the final test result.
Try it, check it, transfer it
Record acquisition metadata. 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. Colour-cast correction
The useful question is not only how to calculate, but what the calculation assumes. Background colour is adjusted toward a standard.
A concrete situation
White background channels are re-centred.
What the mathematics does not license
Overcorrection can alter tissue colour. Evidence becomes stronger when the limitation is tested instead of hidden.
Try it, check it, transfer it
Keep originals and transformations. 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. Stain normalization
A small example makes the mechanism visible. Optical density distributions are aligned.
A concrete situation
Hematoxylin and eosin vectors are standardized.
What the mathematics does not license
One template may be unrepresentative. Keeping this boundary clear makes the result easier to audit and transfer.
Try it, check it, transfer it
Validate across laboratories. 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. Spot-centred tiling
This is where modelling choices begin to affect evidence. The image is cut around each barcode location.
A concrete situation
Each tile is 299 by 299 pixels.
What the mathematics does not license
Tile size controls context and leakage. A trustworthy workflow records the choice before seeing the final test result.
Try it, check it, transfer it
Sweep field of view. 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. Image augmentation
The central mathematical idea is concrete. Rotations and standardization vary training inputs.
A concrete situation
A tile rotates by 90 degrees.
What the mathematics does not license
Some anatomy has meaningful orientation. Evidence becomes stronger when the limitation is tested instead of hidden.
Try it, check it, transfer it
Use label-preserving transforms. 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. ResNet50 feature extractor
Here the geometry becomes operational. A pretrained CNN maps tiles to morphology vectors.
A concrete situation
A tile yields 2,048 features.
What the mathematics does not license
ImageNet features may miss histology detail. Keeping this boundary clear makes the result easier to audit and transfer.
Try it, check it, transfer it
Compare frozen and tuned 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.
7. Count preprocessing
This step deserves a careful pause. Spatial gene counts are filtered and normalized.
A concrete situation
Library sizes scale to one target total.
What the mathematics does not license
Normalization can remove biology. A trustworthy workflow records the choice before seeing the final test result.
Try it, check it, transfer it
Audit raw and normalized counts. 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. Image autoencoder
The useful question is not only how to calculate, but what the calculation assumes. Morphology vectors compress into a latent code.
A concrete situation
2,048 inputs become 50 latent values.
What the mathematics does not license
Reconstruction does not guarantee useful phenotype. Evidence becomes stronger when the limitation is tested instead of hidden.
Try it, check it, transfer it
Inspect held-out tiles. 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. Expression autoencoder
A small example makes the mechanism visible. Gene features compress separately.
A concrete situation
Five thousand genes become 50 latent values.
What the mathematics does not license
Latent axes can encode batch. Keeping this boundary clear makes the result easier to audit and transfer.
Try it, check it, transfer it
Use donor-aware checks. 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. Latent concatenation
This is where modelling choices begin to affect evidence. Equal-dimensional codes are joined.
A concrete situation
Fifty image plus fifty expression values give 100.
What the mathematics does not license
Equal size does not imply equal influence. A trustworthy workflow records the choice before seeing the final test result.
Try it, check it, transfer it
Standardize and run ablations. 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. k-means objective
The central mathematical idea is concrete. Clusters minimize within-group squared distance.
A concrete situation
Ten centroids partition spots.
What the mathematics does not license
Spherical clusters are assumed. Evidence becomes stronger when the limitation is tested instead of hidden.
Try it, check it, transfer it
Compare Louvain and stability. 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. Pathology contour mapping
Here the geometry becomes operational. Annotations are registered to spatial coordinates.
A concrete situation
A tumour contour labels included spots.
What the mathematics does not license
Registration error blurs evaluation. Keeping this boundary clear makes the result easier to audit and transfer.
Try it, check it, transfer it
Quantify boundary 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.
13. Two-stream classifier
This step deserves a careful pause. Image and count branches feed a disease model.
A concrete situation
Logits combine both streams.
What the mathematics does not license
The model may learn slide identity. A trustworthy workflow records the choice before seeing the final test result.
Try it, check it, transfer it
Use patient-grouped splits. 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. Regularization
The useful question is not only how to calculate, but what the calculation assumes. Dropout and L2 penalties limit parameter growth.
A concrete situation
Twenty percent of hidden units drop per step.
What the mathematics does not license
Regularization does not cure leakage. Evidence becomes stronger when the limitation is tested instead of hidden.
Try it, check it, transfer it
Keep a clean test cohort. 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. Cross-validation metrics
A small example makes the mechanism visible. Five folds yield accuracy, precision, recall, F-score and AUC.
A concrete situation
Fold AUC is 0.82.
What the mathematics does not license
Spot-level folds are not independent. Keeping this boundary clear makes the result easier to audit and transfer.
Try it, check it, transfer it
Group by patient and slide. 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. External and ablation validation
This is where modelling choices begin to affect evidence. Multimodal results are compared with each single stream.
A concrete situation
Joint, image-only and expression-only models share a test set.
What the mathematics does not license
One cohort may share confounders. A trustworthy workflow records the choice before seeing the final test result.
Try it, check it, transfer it
Add external sites and calibration. 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
SpaCell joins two different measurement systems: histology image pixels and spatial gene counts. The tissue image is colour-corrected and stain-normalized, then divided into 299 by 299 pixel tiles centred on spatial spots. Random rotations and standardization can augment training data, but they must preserve label meaning and cannot correct a biased tissue sample.
A pretrained ResNet50 converts each tile into a high-dimensional morphology feature vector. A separate autoencoder compresses gene-count features, while an image-side representation is also compressed to the same latent dimension. Concatenating the two latent vectors produces a joint representation for clustering with k-means or Louvain. Equal dimensions do not guarantee equal information or equal influence.
SpaCell also supports supervised disease-stage classification. Image and count streams enter a fully connected model, with dropout, L2 penalization, stratified sampling and five-fold cross-validation used to limit overfitting. Accuracy, precision, F-score, ROC curves and confusion matrices describe different error aspects and must be calculated on tissue images unseen during training.
The mathematics is important because multimodal fusion can improve prediction while also importing confounding. Stain batch, scanner, tissue site or patient identity may become shortcuts. Patient-level splits, image-only and expression-only ablations, calibrated probabilities, external cohorts and pathologist comparisons are needed before a joint model is treated as evidence about disease biology.
Frequently asked questions
What is SpaCell?
SpaCell is a multimodal deep-learning workflow that combines histology image pixels and spatial gene expression for clustering or disease-stage prediction.
Why normalize stains?
Staining and scanner variation can shift pixel distributions for technical reasons unrelated to tissue biology.
What does ResNet50 contribute?
A pretrained convolutional network converts each image tile into a compact morphology feature vector.
Why use two autoencoders?
Image and gene-count inputs have different dimensions and scales; separate encoders create comparable latent representations before concatenation.
How are cell groups found?
The concatenated latent vectors can be clustered with k-means or Louvain and compared with independent annotations.
Why split by patient?
Random spots from one patient can leak patient- and slide-specific patterns into both training and testing, overstating generalization.
Primary source and fact-check note
Xiao Tan, Andrew Su, Minh Tran and Quan Nguyen, “SpaCell: integrating tissue morphology and spatial gene expression to predict disease cells,” Bioinformatics 36(7), 2293–2294 (2020), DOI 10.1093/bioinformatics/btz914. 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
Image audit
Version stains, scanners, templates and tiles.
Registration audit
Quantify spot-to-image uncertainty.
Feature audit
State pretrained weights and fine-tuning.
Fusion audit
Publish latent dimensions and scaling.
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.
Split audit
Group folds by patient and slide.
Ablation audit
Compare image-only, expression-only and joint models.
Calibration audit
Report probabilities and confusion matrices.
Final claim
Multimodal accuracy can still rely on technical shortcuts.
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: Whole-slide image
Begin with this mechanism: Histology provides millions of pixel intensities. Recreate the concrete case: One H&E image covers 4,000 spots. Write pixel intensities, stain vectors, tile coordinates, CNN features, latent codes, reconstruction errors, concatenated vectors, centroid distances, logits, probabilities, confusion counts and grouped-fold metrics with direction, units, denominators and assumptions. Calculate the smallest non-trivial example by hand, then reproduce it in a spreadsheet or short program. Challenge this limitation: Stain and scanner batches confound biology. Complete the transfer step: Record acquisition metadata. Change exactly one reference donor, gene panel, masking rule, sparsity weight, latent dimension, loss scale, epoch set, neighbour count, spatial radius, graph type, smoothness beta, domain number, permutation rule, graph-convolution depth, corruption function, clustering resolution, stain template, tile size, pretrained layer, fusion scale, patient split or random seed. Explain which mathematical object changes, which conclusion survives and which claim must weaken. Keep measurement, transformation, graph assumption, objective, optimization, prediction, interpretation and validation on separate notebook lines. Reserve whole donors, slides, tissues, patients or platforms outside tuning when testing transfer.
Workshop 2: Colour-cast correction
Begin with this mechanism: Background colour is adjusted toward a standard. Recreate the concrete case: White background channels are re-centred. Write pixel intensities, stain vectors, tile coordinates, CNN features, latent codes, reconstruction errors, concatenated vectors, centroid distances, logits, probabilities, confusion counts and grouped-fold metrics with direction, units, denominators and assumptions. Calculate the smallest non-trivial example by hand, then reproduce it in a spreadsheet or short program. Challenge this limitation: Overcorrection can alter tissue colour. Complete the transfer step: Keep originals and transformations. Change exactly one reference donor, gene panel, masking rule, sparsity weight, latent dimension, loss scale, epoch set, neighbour count, spatial radius, graph type, smoothness beta, domain number, permutation rule, graph-convolution depth, corruption function, clustering resolution, stain template, tile size, pretrained layer, fusion scale, patient split or random seed. Explain which mathematical object changes, which conclusion survives and which claim must weaken. Keep measurement, transformation, graph assumption, objective, optimization, prediction, interpretation and validation on separate notebook lines. Reserve whole donors, slides, tissues, patients or platforms outside tuning when testing transfer.
Workshop 3: Stain normalization
Begin with this mechanism: Optical density distributions are aligned. Recreate the concrete case: Hematoxylin and eosin vectors are standardized. Write pixel intensities, stain vectors, tile coordinates, CNN features, latent codes, reconstruction errors, concatenated vectors, centroid distances, logits, probabilities, confusion counts and grouped-fold metrics with direction, units, denominators and assumptions. Calculate the smallest non-trivial example by hand, then reproduce it in a spreadsheet or short program. Challenge this limitation: One template may be unrepresentative. Complete the transfer step: Validate across laboratories. Change exactly one reference donor, gene panel, masking rule, sparsity weight, latent dimension, loss scale, epoch set, neighbour count, spatial radius, graph type, smoothness beta, domain number, permutation rule, graph-convolution depth, corruption function, clustering resolution, stain template, tile size, pretrained layer, fusion scale, patient split or random seed. Explain which mathematical object changes, which conclusion survives and which claim must weaken. Keep measurement, transformation, graph assumption, objective, optimization, prediction, interpretation and validation on separate notebook lines. Reserve whole donors, slides, tissues, patients or platforms outside tuning when testing transfer.
Workshop 4: Spot-centred tiling
Begin with this mechanism: The image is cut around each barcode location. Recreate the concrete case: Each tile is 299 by 299 pixels. Write pixel intensities, stain vectors, tile coordinates, CNN features, latent codes, reconstruction errors, concatenated vectors, centroid distances, logits, probabilities, confusion counts and grouped-fold metrics with direction, units, denominators and assumptions. Calculate the smallest non-trivial example by hand, then reproduce it in a spreadsheet or short program. Challenge this limitation: Tile size controls context and leakage. Complete the transfer step: Sweep field of view. Change exactly one reference donor, gene panel, masking rule, sparsity weight, latent dimension, loss scale, epoch set, neighbour count, spatial radius, graph type, smoothness beta, domain number, permutation rule, graph-convolution depth, corruption function, clustering resolution, stain template, tile size, pretrained layer, fusion scale, patient split or random seed. Explain which mathematical object changes, which conclusion survives and which claim must weaken. Keep measurement, transformation, graph assumption, objective, optimization, prediction, interpretation and validation on separate notebook lines. Reserve whole donors, slides, tissues, patients or platforms outside tuning when testing transfer.
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: Image augmentation
Begin with this mechanism: Rotations and standardization vary training inputs. Recreate the concrete case: A tile rotates by 90 degrees. Write pixel intensities, stain vectors, tile coordinates, CNN features, latent codes, reconstruction errors, concatenated vectors, centroid distances, logits, probabilities, confusion counts and grouped-fold metrics with direction, units, denominators and assumptions. Calculate the smallest non-trivial example by hand, then reproduce it in a spreadsheet or short program. Challenge this limitation: Some anatomy has meaningful orientation. Complete the transfer step: Use label-preserving transforms. Change exactly one reference donor, gene panel, masking rule, sparsity weight, latent dimension, loss scale, epoch set, neighbour count, spatial radius, graph type, smoothness beta, domain number, permutation rule, graph-convolution depth, corruption function, clustering resolution, stain template, tile size, pretrained layer, fusion scale, patient split or random seed. Explain which mathematical object changes, which conclusion survives and which claim must weaken. Keep measurement, transformation, graph assumption, objective, optimization, prediction, interpretation and validation on separate notebook lines. Reserve whole donors, slides, tissues, patients or platforms outside tuning when testing transfer.
Workshop 6: ResNet50 feature extractor
Begin with this mechanism: A pretrained CNN maps tiles to morphology vectors. Recreate the concrete case: A tile yields 2,048 features. Write pixel intensities, stain vectors, tile coordinates, CNN features, latent codes, reconstruction errors, concatenated vectors, centroid distances, logits, probabilities, confusion counts and grouped-fold metrics with direction, units, denominators and assumptions. Calculate the smallest non-trivial example by hand, then reproduce it in a spreadsheet or short program. Challenge this limitation: ImageNet features may miss histology detail. Complete the transfer step: Compare frozen and tuned features. Change exactly one reference donor, gene panel, masking rule, sparsity weight, latent dimension, loss scale, epoch set, neighbour count, spatial radius, graph type, smoothness beta, domain number, permutation rule, graph-convolution depth, corruption function, clustering resolution, stain template, tile size, pretrained layer, fusion scale, patient split or random seed. Explain which mathematical object changes, which conclusion survives and which claim must weaken. Keep measurement, transformation, graph assumption, objective, optimization, prediction, interpretation and validation on separate notebook lines. Reserve whole donors, slides, tissues, patients or platforms outside tuning when testing transfer.
Workshop 7: Count preprocessing
Begin with this mechanism: Spatial gene counts are filtered and normalized. Recreate the concrete case: Library sizes scale to one target total. Write pixel intensities, stain vectors, tile coordinates, CNN features, latent codes, reconstruction errors, concatenated vectors, centroid distances, logits, probabilities, confusion counts and grouped-fold metrics with direction, units, denominators and assumptions. Calculate the smallest non-trivial example by hand, then reproduce it in a spreadsheet or short program. Challenge this limitation: Normalization can remove biology. Complete the transfer step: Audit raw and normalized counts. Change exactly one reference donor, gene panel, masking rule, sparsity weight, latent dimension, loss scale, epoch set, neighbour count, spatial radius, graph type, smoothness beta, domain number, permutation rule, graph-convolution depth, corruption function, clustering resolution, stain template, tile size, pretrained layer, fusion scale, patient split or random seed. Explain which mathematical object changes, which conclusion survives and which claim must weaken. Keep measurement, transformation, graph assumption, objective, optimization, prediction, interpretation and validation on separate notebook lines. Reserve whole donors, slides, tissues, patients or platforms outside tuning when testing transfer.
Workshop 8: Image autoencoder
Begin with this mechanism: Morphology vectors compress into a latent code. Recreate the concrete case: 2,048 inputs become 50 latent values. Write pixel intensities, stain vectors, tile coordinates, CNN features, latent codes, reconstruction errors, concatenated vectors, centroid distances, logits, probabilities, confusion counts and grouped-fold metrics with direction, units, denominators and assumptions. Calculate the smallest non-trivial example by hand, then reproduce it in a spreadsheet or short program. Challenge this limitation: Reconstruction does not guarantee useful phenotype. Complete the transfer step: Inspect held-out tiles. Change exactly one reference donor, gene panel, masking rule, sparsity weight, latent dimension, loss scale, epoch set, neighbour count, spatial radius, graph type, smoothness beta, domain number, permutation rule, graph-convolution depth, corruption function, clustering resolution, stain template, tile size, pretrained layer, fusion scale, patient split or random seed. Explain which mathematical object changes, which conclusion survives and which claim must weaken. Keep measurement, transformation, graph assumption, objective, optimization, prediction, interpretation and validation on separate notebook lines. Reserve whole donors, slides, tissues, patients or platforms outside tuning when testing transfer.
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: Expression autoencoder
Begin with this mechanism: Gene features compress separately. Recreate the concrete case: Five thousand genes become 50 latent values. Write pixel intensities, stain vectors, tile coordinates, CNN features, latent codes, reconstruction errors, concatenated vectors, centroid distances, logits, probabilities, confusion counts and grouped-fold metrics with direction, units, denominators and assumptions. Calculate the smallest non-trivial example by hand, then reproduce it in a spreadsheet or short program. Challenge this limitation: Latent axes can encode batch. Complete the transfer step: Use donor-aware checks. Change exactly one reference donor, gene panel, masking rule, sparsity weight, latent dimension, loss scale, epoch set, neighbour count, spatial radius, graph type, smoothness beta, domain number, permutation rule, graph-convolution depth, corruption function, clustering resolution, stain template, tile size, pretrained layer, fusion scale, patient split or random seed. Explain which mathematical object changes, which conclusion survives and which claim must weaken. Keep measurement, transformation, graph assumption, objective, optimization, prediction, interpretation and validation on separate notebook lines. Reserve whole donors, slides, tissues, patients or platforms outside tuning when testing transfer.
Workshop 10: Latent concatenation
Begin with this mechanism: Equal-dimensional codes are joined. Recreate the concrete case: Fifty image plus fifty expression values give 100. Write pixel intensities, stain vectors, tile coordinates, CNN features, latent codes, reconstruction errors, concatenated vectors, centroid distances, logits, probabilities, confusion counts and grouped-fold metrics with direction, units, denominators and assumptions. Calculate the smallest non-trivial example by hand, then reproduce it in a spreadsheet or short program. Challenge this limitation: Equal size does not imply equal influence. Complete the transfer step: Standardize and run ablations. Change exactly one reference donor, gene panel, masking rule, sparsity weight, latent dimension, loss scale, epoch set, neighbour count, spatial radius, graph type, smoothness beta, domain number, permutation rule, graph-convolution depth, corruption function, clustering resolution, stain template, tile size, pretrained layer, fusion scale, patient split or random seed. Explain which mathematical object changes, which conclusion survives and which claim must weaken. Keep measurement, transformation, graph assumption, objective, optimization, prediction, interpretation and validation on separate notebook lines. Reserve whole donors, slides, tissues, patients or platforms outside tuning when testing transfer.
Workshop 11: k-means objective
Begin with this mechanism: Clusters minimize within-group squared distance. Recreate the concrete case: Ten centroids partition spots. Write pixel intensities, stain vectors, tile coordinates, CNN features, latent codes, reconstruction errors, concatenated vectors, centroid distances, logits, probabilities, confusion counts and grouped-fold metrics with direction, units, denominators and assumptions. Calculate the smallest non-trivial example by hand, then reproduce it in a spreadsheet or short program. Challenge this limitation: Spherical clusters are assumed. Complete the transfer step: Compare Louvain and stability. Change exactly one reference donor, gene panel, masking rule, sparsity weight, latent dimension, loss scale, epoch set, neighbour count, spatial radius, graph type, smoothness beta, domain number, permutation rule, graph-convolution depth, corruption function, clustering resolution, stain template, tile size, pretrained layer, fusion scale, patient split or random seed. Explain which mathematical object changes, which conclusion survives and which claim must weaken. Keep measurement, transformation, graph assumption, objective, optimization, prediction, interpretation and validation on separate notebook lines. Reserve whole donors, slides, tissues, patients or platforms outside tuning when testing transfer.
Workshop 12: Pathology contour mapping
Begin with this mechanism: Annotations are registered to spatial coordinates. Recreate the concrete case: A tumour contour labels included spots. Write pixel intensities, stain vectors, tile coordinates, CNN features, latent codes, reconstruction errors, concatenated vectors, centroid distances, logits, probabilities, confusion counts and grouped-fold metrics with direction, units, denominators and assumptions. Calculate the smallest non-trivial example by hand, then reproduce it in a spreadsheet or short program. Challenge this limitation: Registration error blurs evaluation. Complete the transfer step: Quantify boundary uncertainty. Change exactly one reference donor, gene panel, masking rule, sparsity weight, latent dimension, loss scale, epoch set, neighbour count, spatial radius, graph type, smoothness beta, domain number, permutation rule, graph-convolution depth, corruption function, clustering resolution, stain template, tile size, pretrained layer, fusion scale, patient split or random seed. Explain which mathematical object changes, which conclusion survives and which claim must weaken. Keep measurement, transformation, graph assumption, objective, optimization, prediction, interpretation and validation on separate notebook lines. Reserve whole donors, slides, tissues, patients or platforms outside tuning when testing transfer.
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: Two-stream classifier
Begin with this mechanism: Image and count branches feed a disease model. Recreate the concrete case: Logits combine both streams. Write pixel intensities, stain vectors, tile coordinates, CNN features, latent codes, reconstruction errors, concatenated vectors, centroid distances, logits, probabilities, confusion counts and grouped-fold metrics with direction, units, denominators and assumptions. Calculate the smallest non-trivial example by hand, then reproduce it in a spreadsheet or short program. Challenge this limitation: The model may learn slide identity. Complete the transfer step: Use patient-grouped splits. Change exactly one reference donor, gene panel, masking rule, sparsity weight, latent dimension, loss scale, epoch set, neighbour count, spatial radius, graph type, smoothness beta, domain number, permutation rule, graph-convolution depth, corruption function, clustering resolution, stain template, tile size, pretrained layer, fusion scale, patient split or random seed. Explain which mathematical object changes, which conclusion survives and which claim must weaken. Keep measurement, transformation, graph assumption, objective, optimization, prediction, interpretation and validation on separate notebook lines. Reserve whole donors, slides, tissues, patients or platforms outside tuning when testing transfer.
Workshop 14: Regularization
Begin with this mechanism: Dropout and L2 penalties limit parameter growth. Recreate the concrete case: Twenty percent of hidden units drop per step. Write pixel intensities, stain vectors, tile coordinates, CNN features, latent codes, reconstruction errors, concatenated vectors, centroid distances, logits, probabilities, confusion counts and grouped-fold metrics with direction, units, denominators and assumptions. Calculate the smallest non-trivial example by hand, then reproduce it in a spreadsheet or short program. Challenge this limitation: Regularization does not cure leakage. Complete the transfer step: Keep a clean test cohort. Change exactly one reference donor, gene panel, masking rule, sparsity weight, latent dimension, loss scale, epoch set, neighbour count, spatial radius, graph type, smoothness beta, domain number, permutation rule, graph-convolution depth, corruption function, clustering resolution, stain template, tile size, pretrained layer, fusion scale, patient split or random seed. Explain which mathematical object changes, which conclusion survives and which claim must weaken. Keep measurement, transformation, graph assumption, objective, optimization, prediction, interpretation and validation on separate notebook lines. Reserve whole donors, slides, tissues, patients or platforms outside tuning when testing transfer.
Workshop 15: Cross-validation metrics
Begin with this mechanism: Five folds yield accuracy, precision, recall, F-score and AUC. Recreate the concrete case: Fold AUC is 0.82. Write pixel intensities, stain vectors, tile coordinates, CNN features, latent codes, reconstruction errors, concatenated vectors, centroid distances, logits, probabilities, confusion counts and grouped-fold metrics with direction, units, denominators and assumptions. Calculate the smallest non-trivial example by hand, then reproduce it in a spreadsheet or short program. Challenge this limitation: Spot-level folds are not independent. Complete the transfer step: Group by patient and slide. Change exactly one reference donor, gene panel, masking rule, sparsity weight, latent dimension, loss scale, epoch set, neighbour count, spatial radius, graph type, smoothness beta, domain number, permutation rule, graph-convolution depth, corruption function, clustering resolution, stain template, tile size, pretrained layer, fusion scale, patient split or random seed. Explain which mathematical object changes, which conclusion survives and which claim must weaken. Keep measurement, transformation, graph assumption, objective, optimization, prediction, interpretation and validation on separate notebook lines. Reserve whole donors, slides, tissues, patients or platforms outside tuning when testing transfer.
Workshop 16: External and ablation validation
Begin with this mechanism: Multimodal results are compared with each single stream. Recreate the concrete case: Joint, image-only and expression-only models share a test set. Write pixel intensities, stain vectors, tile coordinates, CNN features, latent codes, reconstruction errors, concatenated vectors, centroid distances, logits, probabilities, confusion counts and grouped-fold metrics with direction, units, denominators and assumptions. Calculate the smallest non-trivial example by hand, then reproduce it in a spreadsheet or short program. Challenge this limitation: One cohort may share confounders. Complete the transfer step: Add external sites and calibration. Change exactly one reference donor, gene panel, masking rule, sparsity weight, latent dimension, loss scale, epoch set, neighbour count, spatial radius, graph type, smoothness beta, domain number, permutation rule, graph-convolution depth, corruption function, clustering resolution, stain template, tile size, pretrained layer, fusion scale, patient split or random seed. Explain which mathematical object changes, which conclusion survives and which claim must weaken. Keep measurement, transformation, graph assumption, objective, optimization, prediction, interpretation and validation on separate notebook lines. Reserve whole donors, slides, tissues, patients or platforms outside tuning when testing transfer.
