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 Science? | nnSVG, Nearest-Neighbour Gaussian Processes and Scalable Spatial-Gene Evidence

Three students sit around open books and worksheets at a classroom table, reading, writing and discussing the work together.

eduKateSG · Why Science?

Approximate Gaussian-process spatial covariance through local neighbour structure, rank spatially variable genes at scale, and retain effect sizes, uncertainty, covariates and tissue validation

Full section index · Science Learning Hub

Science learning becomes useful when a familiar object or observation is turned into a system of quantities, mechanisms and claim limits. This guide owns one applied evidence-reading job inside eduKateSG’s wider Science estate. It connects naturally to Why Science Spatial Transcriptomics Tissue Coordinates Gene Expression Evidence; Why Science Spatialde Spatially Variable Genes Tissue Pattern Evidence; Why Science Squidpy Spatial Neighbourhoods Omics Image Analysis Evidence; Why Science Spagcn Graph Convolution Spatial Domains Histology Evidence; Education Hub; Singapore Secondary School Directory; Career Adulthood Hub. It also keeps current school and public claims traceable to visible primary sources: nnSVG primary study; nnSVG full text; Bioconductor nnSVG package; Official nnSVG repository; 2026 Singapore–Cambridge O-Level Biology syllabus; 2026 MOE G2 Computing syllabus. The sources describe the scientific scope; this article translates that scope into a calm route for Primary Science, PSLE Science, Secondary Science, O-Level Science, STEM exploration, school choices and career pathways without inventing admission or employment outcomes.

nnSVG identifies spatially variable genes using nearest-neighbour Gaussian processes. Its 2023 Nature Communications paper replaces dense Gaussian-process calculations with a scalable nearest-neighbour approximation while retaining gene-specific spatial covariance and flexible length scales. Current Bioconductor releases implement the method for large spatial datasets and covariate-adjusted analyses. Rankings remain model-based evidence: neighbour count, transformation, coordinates, covariates, approximation quality, multiple testing and independent specimens shape what they mean.

Section 1 of 36

1. Start from Gaussian-process spatial covariance

nnSVG models each gene with a spatial covariance component and non-spatial noise. The model asks whether expression changes with coordinates over a learnable length scale. A positive result is structured variation under the model, not an anatomical label or causal pathway.

Contents · Next section

Section 2 of 36

2. Approximate with nearest neighbours

Dense Gaussian-process calculations become expensive as locations grow. nnSVG uses a nearest-neighbour Gaussian-process approximation so each location depends on a limited set of nearby predecessors. This can make computation scale far more gently while preserving useful spatial covariance.

Contents · Previous section · Next section

Section 3 of 36

3. Understand neighbour ordering

Nearest-neighbour approximations depend on an ordering and neighbour set. Current implementations provide practical strategies, but approximation quality should still be audited. A result stable across reasonable neighbour counts is stronger than one produced only by a narrow setting.

Contents · Previous section · Next section

Section 4 of 36

4. Estimate gene-specific spatial parameters

The method estimates spatial variance and length scale for each gene. These quantities describe how much variation is spatial and over what modeled distance. They are more informative than rank alone, but they remain conditional on preprocessing and covariance assumptions.

Contents · Previous section · Next section

Section 5 of 36

5. Use flexible length scales

Genes can show broad gradients or local structure. Gene-specific covariance parameters let the model adapt rather than forcing one scale on the transcriptome. The chosen kernel family still bounds the shapes that can be represented.

Contents · Previous section · Next section

Section 6 of 36

6. Rank and test spatial genes

Likelihood-based evidence and estimated parameters support ranking and significance assessment. Apply multiple-testing correction across the screened genes and publish the complete table. A top rank should be paired with effect size, uncertainty and replicate evidence.

Contents · Previous section · Next section

Section 7 of 36

7. Keep the published scope specific

The 2023 Nature Communications paper presented nnSVG for scalable identification of spatially variable genes using nearest-neighbour Gaussian processes. Current Bioconductor releases implement the method with the BRISC fitting algorithm and support covariate adjustment and within-domain analyses.

Contents · Previous section · Next section

Section 8 of 36

8. Verify coordinates and distance units

Check identifiers, axes, tissue orientation, duplicates and coordinate scale. Length-scale estimates inherit the units supplied. Rescaling coordinates changes numerical parameters even when relative geometry is preserved, so publish physical conversions where available.

Contents · Previous section · Next section

Section 9 of 36

9. Quality-control expression and tissue

Map counts, detected genes, background, damaged regions, tissue edges and exclusions. Spatial covariance can reflect technical variation. Prespecify filters and keep quality layers beside gene maps so model fit does not replace experimental judgment.

Contents · Previous section · Next section

Section 10 of 36

10. Choose a suitable transformed layer

Document normalisation, log or variance-stabilising transformation, residualisation and gene filters. nnSVG’s Gaussian-process model typically works on continuous expression representations. Show raw counts for biological context and test one plausible alternative transformation.

Contents · Previous section · Next section

Section 11 of 36

11. Set the nearest-neighbour count

Neighbour count controls the computational approximation. Too few neighbours may lose covariance detail; more neighbours increase cost. Use recommended ranges, report the value and assess headline genes under at least one defensible alternative.

Contents · Previous section · Next section

Section 12 of 36

12. Include covariates thoughtfully

The model can adjust for known factors or define spatial domains through covariates. Use measured covariates with clear scientific justification. Adjustment can reduce confounding but also change the target from overall spatial variation to variation conditional on specified structure.

Contents · Previous section · Next section

Section 13 of 36

13. Inspect fitting and warnings

Keep convergence messages, parameter bounds, failed genes and runtime. Extreme length scales or variance estimates may signal weak identification. Do not silently remove difficult genes after looking at their maps; define quality rules before interpretation.

Contents · Previous section · Next section

Section 14 of 36

14. Record scalable computing conditions

Publish location and gene counts, software version, neighbour setting, algorithm, threads, hardware, runtime and memory. Linear-scaling claims are about computational complexity, but practical performance still depends on implementation and resources.

Contents · Previous section · Next section

Section 15 of 36

15. Practise with an invented parameter table

This fictional table is for interpretation, not benchmarking.

GeneSpatial variance fractionLength scaleq-valueNeighbour sensitivity
G10.68420 µm0.003low
G20.4490 µm0.018medium
G30.2135 µm0.047high
G40.05unresolved0.73low
Invented classroom data for comparison practice; not an operational, product-certification or safety dataset.

Contents · Previous section · Next section

Section 16 of 36

16. Read variance fraction and length scale together

A high spatial fraction with a broad length scale describes a different pattern from a small local effect. Map both, and compare estimated scale with spot spacing and tissue extent. A length scale smaller than measurement resolution deserves particular caution.

Contents · Previous section · Next section

Section 17 of 36

17. Use within-domain analysis carefully

Covariates can focus on spatial variation remaining after known regions are represented. This may reveal subtle within-region genes, but it depends on domain definitions. If domains came from the same expression matrix, discuss circularity and validate in independent tissue.

Contents · Previous section · Next section

Section 18 of 36

18. Distinguish approximation from biology

Nearest-neighbour structure is a computational device, not a claim that only those cells influence one another. Biological neighbourhoods may be useful for interpretation, but the NNGP neighbour set primarily approximates a covariance model.

Contents · Previous section · Next section

Section 19 of 36

19. Compare broad and fine patterns

Broad patterns generally have more support across neighbours, while fine patterns may challenge approximation and assay resolution. Validate fine candidates with higher-resolution imaging and show sensitivity to neighbour count and coordinate jitter.

Contents · Previous section · Next section

Section 20 of 36

20. Replicate across sections and donors

Locations within a tissue are correlated. Fit or summarise independent specimens and show heterogeneity. A spatial gene replicated in multiple sections is more general than one with an extremely small p-value from one large slide.

Contents · Previous section · Next section

Section 21 of 36

21. Validate selected genes orthogonally

Confirm representative broad, local, threshold-sensitive and negative genes using in-situ RNA, protein staining, known anatomy or another platform. Match the validation scale to the estimated length scale and include expected negative regions.

Contents · Previous section · Next section

Section 22 of 36

22. Audit neighbour-count stability

Refit a prespecified subset under smaller and larger neighbour counts. Compare rankings, variance fractions and length scales. Stable conclusions demonstrate that the scalable approximation is not driving the headline story.

Contents · Previous section · Next section

Section 23 of 36

23. Audit coordinate ordering

Where relevant, use recommended ordering strategies and verify that reorderings do not materially change important results. Approximation should not turn an arbitrary row order into a biological pattern. Record the ordering used so the analysis can be reproduced.

Contents · Previous section · Next section

Section 24 of 36

24. Audit covariance assumptions

Compare selected genes with an alternative kernel or method. Gaussian-process covariance is flexible but not universal. A sharp boundary, discontinuous island or periodic pattern may be represented differently across models.

Contents · Previous section · Next section

Section 25 of 36

25. Audit technical gradients

Test whether top genes correlate with depth, tissue damage, slide axes or batch. Include covariates or balanced specimens when justified. A well-fitted spatial covariance cannot decide whether its source is biological.

Contents · Previous section · Next section

Section 26 of 36

26. Compare nnSVG with SpatialDE

Both use Gaussian-process ideas, while nnSVG replaces dense calculations with a nearest-neighbour approximation and offers scalable fitting. Align preprocessing and kernels before comparison. Concordance supports robustness; differences help quantify the approximation and implementation effects.

Contents · Previous section · Next section

Section 27 of 36

27. Report negative genes with detection limits

A non-significant result may exclude strong, well-scaled structure while leaving rare or sub-resolution regions unresolved. Simulate patterns on the observed coordinate layout and expression noise to define what the study could have detected.

Contents · Previous section · Next section

Section 28 of 36

28. Let parameters guide experiments

Length scale and spatial fraction can help select probe density, imaging field and sampling strategy for validation. Use them as design clues rather than literal tissue dimensions. The next experiment should be capable of disproving the proposed spatial pattern.

Contents · Previous section · Next section

Section 29 of 36

29. Try a classroom model

Give students a large grid and ask each point to consult only several nearby predecessors when estimating a smooth pattern. Compare the approximation with using every point. Ask students to separate the measured values, the transformation, the model output and the final interpretation. That four-step audit makes uncertainty visible and transfers directly to practical reports and data-response questions.

Contents · Previous section · Next section

Section 30 of 36

30. Start the habit in Primary Science

Primary Science develops observation, comparison and fair testing. A child need not run nnSVG to practise its foundations: record consistently, look for a pattern, test another explanation and avoid claiming more than the evidence shows. Those habits support PSLE Science and later data science.

Contents · Previous section · Next section

Section 31 of 36

31. Strengthen PSLE Science reasoning

The useful PSLE connection is not memorising software names. It is reading tables and graphs, identifying variables, connecting cause and effect and explaining why evidence supports a conclusion. nnSVG shows how the same discipline matters when thousands of genes are tested at once.

Contents · Previous section · Next section

Section 32 of 36

32. Connect Secondary and O-Level Science

Secondary Science and O-Level Biology develop cells, organisation, variation, experimental design and evaluation. nnSVG adds a modern example where gene expression, tissue position and statistics meet. Students can practise controls, uncertainty and alternative explanations while keeping syllabus concepts—not jargon—central.

Contents · Previous section · Next section

Section 33 of 36

33. Use Computing as a partner

Computing contributes data structures, algorithms, scalable calculation, visualisation and reproducibility. Science contributes the question, specimen, control and interpretation. Code can test patterns efficiently, but it cannot repair a biased sample or convert an assumption into an observation. Both disciplines improve when that boundary stays explicit.

Contents · Previous section · Next section

Section 34 of 36

34. Choose schools by fit, not a buzzword

Families comparing Singapore schools should verify current subject combinations, laboratories, Applied Learning Programmes, CCAs, mentoring and timetable fit on official school and MOE pages. A mention of nnSVG, AI or genomics is not evidence of programme quality. Look for sustained inquiry, sound teaching and chances to explain results.

Contents · Previous section · Next section

Section 35 of 36

35. See the career pathways

The reasoning behind nnSVG appears in spatial statistics, computational genomics, biostatistics, pathology, bioinformatics and scalable scientific computing. Pathways may include polytechnic, junior college, university and continuing education, with different blends of biology, statistics, computing and communication. Check current entry requirements on official institutions; one school project cannot guarantee an occupation.

Contents · Previous section · Next section

Section 36 of 36

36. Finish with a bounded claim

A careful conclusion keeps the distinction visible: nnSVG provides scalable Gaussian-process evidence and spatial parameter estimates; nearest neighbours approximate covariance and are not direct biological interaction partners. Report the input, model, effect size, uncertainty, sensitivity and validation together. This measured language is how a computational pattern becomes evidence another person can reproduce, challenge and use.

A strong nnSVG analysis begins with a spatial covariance contract: platform, tissue, specimens, coordinate units, raw and processed expression layers, covariates, kernel, neighbour count and ordering strategy. Preserve the original location identifiers. Length-scale parameters are interpretable only when coordinate units and assay spacing are known.

Pre-register filters, transformation, covariates, tested genes, nearest-neighbour setting, parameter thresholds, multiple-testing rule, primary contrasts and validation. Define which analyses are overall spatial variation and which are conditional on domains or other covariates. This prevents a later switch of statistical target from being presented as one continuous test.

Publish a funnel from raw spots and genes to fitted observations. Map count depth, detected genes, background, tissue edges, damaged regions and exclusions. Spatial covariance can describe technical structure perfectly well. Quality layers must remain visible beside ranked genes and parameter maps.

The nearest-neighbour approximation deserves a sensitivity table. Refit a representative subset with smaller and larger neighbour counts and, where appropriate, an alternative ordering. Compare q-values, spatial variance fractions and length scales. Stable results show that computational approximation is not silently selecting the biological story.

Transformation and covariate choices need parallel checks. Show raw counts for context and repeat key genes under one defensible alternative processed layer. When domains enter as covariates, explain their source and whether they were discovered from the same expression matrix. Conditional spatial variation can be useful while still carrying circularity risk.

For every headline gene, report spatial variance, non-spatial variance, fraction of variance, length scale, likelihood evidence, adjusted significance, neighbour sensitivity and replicate status. A parameter at a boundary or below spot spacing should be flagged. Rank alone hides whether the signal is strong, broad, local or weakly identified.

Empirical calibration can use simulated or permuted data on the observed coordinate layout. Preserve realistic expression noise and zero frequency while removing spatial dependence. Examine false positives and parameter behaviour. Published validation of nnSVG is important, but new tissues and transformations can still strain assumptions.

Biological replication remains specimen-based. Fit or summarise independent sections separately and show heterogeneity. Thousands of spots and neighbour relationships from one tissue are not independent donors. A replicated broad signal with moderate significance can be more persuasive than one extreme single-section result.

Orthogonal validation should match the estimated length scale. A broad gene can be checked with regional staining; a local gene may need finer imaging or targeted sequencing. Include stable, approximation-sensitive and negative examples. Validation should challenge the method where it is most likely to fail.

Compare selected genes with dense Gaussian-process or alternative spatial methods when dataset size allows. Align preprocessing and kernels. Agreement supports the approximation; differences quantify where nearest-neighbour fitting or model implementation matters. Do not treat the comparator as automatic ground truth.

Negative findings need a spatial power statement. Simulate islands and gradients over plausible scales and effects. A non-significant gene may exclude a strong broad pattern while leaving a region smaller than the neighbour or assay resolution unresolved. State the detection boundary in physical units.

Reproducibility materials include matrices, coordinates, masks, transformations, covariates, neighbour and ordering settings, algorithm and package versions, threads, hardware, diagnostics, full parameter tables, figures, validation and checksums. Save the exact processed layer used for fitting, not only the visualisation object.

Reader-facing figures should connect parameters to tissue. Show the original grid, measured expression, fitted spatial surface, variance fraction, length scale and a replicate panel in one sequence. Use physical scale bars and mark tissue gaps. This makes it harder for a smooth fitted surface to imply measurements between capture locations or resolution beyond the assay.

Did you know? A nearest-neighbour Gaussian process uses local conditional relationships to approximate a much larger covariance calculation. The neighbours are chosen to preserve computation, not to declare which cells communicate. This distinction is a useful classroom example of how an algorithmic graph and a biological network can look similar while answering different questions.

For students, a paper-and-pencil approximation can make the idea friendly. Predict a point from three nearby observations, then compare with a prediction using every point on the grid. Discuss speed, local fidelity and what a distant trend may contribute. The exercise links spatial reasoning, graphs, algorithms and evidence without pretending that a classroom average is the full probabilistic model.

A useful checking question is: would the conclusion change if the neighbour set, ordering or coordinate scale changed slightly? If yes, the sensitivity is part of the result and should travel with the map.

A defensible final sentence might say: ‘Across independent tissue sections, nnSVG identified reproducible spatially variable genes with reported variance fractions and length scales that were stable to plausible neighbour settings and supported by matching-resolution validation.’ It should not interpret approximation neighbours as biological contacts or length scale as a measured anatomical diameter.

Contents · Previous section · Continue to the Science Learning Hub