Grail Computer · SGH synthetic histopathology research
Synthetic gastric tissue images: method, results and evidence
A research record for the challenge “Synthetic Histopathological Image Generation for Training Anomaly Detection AI Model”.
Submission preparation is in progress. This dated research snapshot includes ten selected candidates and the evidence available on 9 September 2026. Normal-tissue improvements and the 70-real / 70-synthetic package are being prepared separately. Images are experimental and have not been reviewed by a pathologist. This page is supporting material, not evidence of a completed challenge upload.
The method in plain language
We are developing a system to generate 4096 × 2048-pixel images of gastric H&E tissue, targeting approximately 40×-equivalent detail at 0.25 micrometres per pixel. It covers four requested categories: H. pylori with gastritis, intestinal metaplasia (IM), both together, and neither condition.
First, we build a computer-generated three-dimensional model of the stomach lining. It contains glands, pits, supporting tissue and cells, with different settings for inflammation and metaplasia. Taking a virtual slice creates a drawing and a map showing the tissue type at each pixel.
Next, a pathology-trained diffusion model, PixCell-1024 with UNI2-h image features, renders the cellular appearance. We have tested several ways to guide it. A structure adapter reads the tissue map directly; an alternative selects appearance features from public reference images, window by window. Each large image uses 21 overlapping 1024-pixel windows on a shared canvas. These windows are blended during generation, rather than pasted together as separate final images.
Finally, we measure the result against real public tissue. Checks cover nuclei, gland structure, supporting tissue, colour, texture, how well the intended layout was retained, and similarity to reference images. Each selected image has a record of its generation route, source fields, settings, measurements and checksum. H. pylori organisms in the current candidates are added procedurally; they are not learned or confirmed organisms in the reference material.
Where the layout comes from
Route
How it works
What the evidence allows us to say
Single reference
One real field supplies appearance features during repainting.
New pixels can retain that reference field’s arrangement.
Matched mosaic (A5)
Reference windows are selected to resemble the synthetic drawing.
Appearance improves, but the arrangement still draws on real windows. It is not a wholly independent synthetic layout.
Bag of patches (A4/A5)
Features are drawn from multiple reference fields with no intact donor grid.
Removes a single intact donor arrangement; early versions repeated themselves, and later versions remain less diverse than real tissue.
Structure adapter (F2/F3)
A trained attachment makes the frozen generator read the synthetic label map.
Rotation and adapter-off experiments show measurable layout control. Residual donor influence remains; complete independence is not established.
Only the last route is explicitly designed to impose a procedural tissue arrangement. We do not claim that every current candidate avoids inherited patient-slide architecture.
What the measurements mean
Realism distance (D): a distance from real reference fields using 54 measurements of nuclei, stroma, stain and texture. Lower means closer on these measurements. The envelope was fitted on 96 reference fields and compared with 22 held-out fields. Being inside this range is not a diagnosis or a clinical quality certificate.
Gland-hole score: the fraction of detected closed gland rings enclosing a pale lumen. Useful, but vulnerable to faded tissue and intercellular gaps being mistaken for lumens.
Layout overlap (IoU): the overlap between detected structures in the output and the intended tissue map. Different experiments used different mask definitions, so their raw scores must not be compared indiscriminately.
Embedding similarity: phikon-v2 compares candidate tiles with reference tiles. It is a similarity screen, not proof of privacy or novelty.
Pixel search (NCC): searches for locally matching image patches. The final-ten search was targeted using donor and nearest-neighbour references; it was not exhaustive over every possible reference pair.
What the experiments show
The principal finding is a trade-off between cellular appearance and control of tissue layout. A heavy repaint can improve appearance while discarding the starting drawing. Better drawings alone did not solve this. Direct structural conditioning made the strongest measurable difference to layout.
Experiment
Measured result
Interpretation and limitation
A4: remove intact donor layout
Layout overlap stayed around 0.041–0.051; several arms had within-arm similarity around 0.98.
Removing spatial donor information did not restore the drawing; repeated conditioning caused nearly repeated outputs.
A5: match reference windows to the drawing
D improved from 6.30 to 3.86 across 40 paired cartoons; 35/40 fell within the real held-out band versus 14/40 for the comparator.
Stronger measured appearance; layout overlap was still only 0.0835 versus 0.0452. Fine texture and stromal cellularity remained weak.
F2: read the map with an adapter
Rotating the map changed output geometry; overlap separated from the mismatched control in all four categories.
Layout control improved, but the fine-label adapter produced too many small nuclei and poorer realism on several categories.
F3: remove explicit nucleus channels
Coarse-adapter density was 6,655 nuclei/mm² versus 6,376 real; median nucleus area 24.2 µm² versus 23.1 real.
Improved count and size in this bounded evaluation. Median D was 4.60 and lumen IoU 0.395 for the from-noise arm; these are image metrics, not disease verification.
F3: adapter-off paired control
Keeping the adapter increased lumen IoU by a median 0.434 across 20 paired images.
Supports a causal role for the adapter in layout retention, with a realism cost in that comparison.
B1: search for organisms in HiESD
753 surface windows scanned; none of the top 60 candidates graded “likely organisms” in the recorded non-clinical inspection.
Chronic gastritis labels do not establish H. pylori positivity. This is also not proof that all source slides are organism-free.
The detailed reports below retain unsuccessful experiments and measurement corrections. A historical report’s conclusion applies to that experiment and its date; the qualifications on this page take precedence over earlier broad wording.
The ten current candidates
These are a frozen snapshot of the ten selected files after the two recorded swaps on 9 September. The later request to improve normal images 08–10 is not represented as complete here. Category names are intended challenge labels, not independently confirmed diagnoses.
All ten files were checked as 4096 × 2048 RGB PNGs and against their recorded SHA-256 hashes. Their 0.25 µm/px setting is generation metadata; it does not by itself establish authentic 40× cellular detail.
The selection used realism distance, gland-hole range, copy-screen margins, different drawing seeds, within-category diversity and visual inspection. One explicit exception remains: image 10’s hole score of about 0.985 exceeds the held-out normal maximum of about 0.976. Thus “every image passes every threshold” would be inaccurate.
The post-overlay similarity screen covered 80 candidate tiles against 944 reference tiles from 118 real fields: maximum cosine 0.8995, below the 0.95 flag line. Targeted pixel search covered 83 image/reference pairs and 10,568 windows: maximum NCC 0.7889, below the 0.92 flag line, with no flagged windows. These screens do not establish clinical validity, complete layout independence or privacy clearance.
Reduced preview. Open for the full 4096 × 2048 PNG.Selected detail crop, displayed to fit.
Recorded visual inspection and limitations
Groups of epithelial cells with pale granular cytoplasm and dark, mostly ovoid nuclei that in places form a single row along the edge of a cell group; small irregular clear spaces between the groups read as pit lumina rather than as open gland lumina. Between the groups a dense scatter of small round dark nuclei reads as inflamed lamina propria (stromal nuclear density 6229/mm2 against a real held-out 4588 - the only final that is above real on that axis). No surface epithelium in the crop; a wide pale lumen exists elsewhere on the canvas at (2475,0) and that is where the overlay put its rods. Spot-checked at (600,1300) and (3200,300): glands with granular pale cytoplasm, and a lymphocyte-rich field with small clear spaces. No tiling, no repeated motif, no seam (window-boundary column ratio 0.977 against an off-boundary null of 1.000). Against the real crop: the real field has one broad columnar band with a clean basal nuclear row, red cells in vessels and much finer fibrillar stroma; this one is more crowded and its epithelium is less polarised.
Reduced preview. Open for the full 4096 × 2048 PNG.Selected detail crop, displayed to fit.
Recorded visual inspection and limitations
Long parallel gland profiles running down the crop with foamy vacuolated pale cytoplasm and a border row of dark nuclei, a scatter of small dark nuclei between them, and a few red cells. The vacuolation is coarser and more regular than the real crop's mucin - a soap-bubble texture rather than mucin droplets. Spot-checked at (400,300) and (2600,300): parallel glands, and a lumen with adjacent epithelium and a dense infiltrate. A large open pale surface space in the lower right is where the overlay placed its rods. No seam (1.020 vs null 1.016), no tiling.
Reduced preview. Open for the full 4096 × 2048 PNG.Selected detail crop, displayed to fit.
Recorded visual inspection and limitations
Crowded epithelial cells with pale vacuolated cytoplasm and roughly one row of ovoid nuclei per group, a prominent cluster of red cells in the centre of the crop (a capillary or small haemorrhage), and small clear lumina at the lower edge. The stromal scatter is present but sparser than in images 01-02 (1637/mm2 against a real 4588), so the infiltrate that defines the category is thin. No seam (1.004 vs null 1.035) even though this canvas was assembled from many separate real donor fields.
Reduced preview. Open for the full 4096 × 2048 PNG.Selected detail crop, displayed to fit.
Recorded visual inspection and limitations
Gland profiles with an open lumen at centre-right, cells with pale vacuolated cytoplasm and large ovoid nuclei carrying a visible nuclear membrane and pale chromatin, basally placed around each gland. The nuclei are larger and more vesicular than the real crop's. No goblet cell with a crisp single apical mucin vacuole is identifiable - the vacuolation is diffuse cytoplasmic, so the field reads as metaplastic-looking glandular tissue rather than as unambiguous intestinal metaplasia. No seams, no tiling.
Reduced preview. Open for the full 4096 × 2048 PNG.Selected detail crop, displayed to fit.
Recorded visual inspection and limitations
Two or three gland cross-sections with a clear lumen, a wall about one cell thick with basally placed round-to-oval nuclei, and pale cytoplasm; a band of eosinophilic stroma crosses the middle of the crop; a small orange-brown clump at the left edge is either pigment or a red-cell aggregate. Reads clearly as glandular tissue rather than as sheets of cells. Same vesicular-nucleus criticism as image 04.
Reduced preview. Open for the full 4096 × 2048 PNG.Selected detail crop, displayed to fit.
Recorded visual inspection and limitations
Glandular clusters with pale cytoplasm and about one row of nuclei per cluster, and between them a dense scatter of small dark round nuclei. The lower half of the crop has larger pale vacuolated cells with clearer nuclei. Both a glandular component and an inflammatory component are present in the same field, which is what the mixed category asks for. The overlay placed rods in a gland lumen at (443,348). No seam (0.987 vs null 1.033).
Reduced preview. Open for the full 4096 × 2048 PNG.Selected detail crop, displayed to fit.
Recorded visual inspection and limitations
Glandular tissue with an inflammatory component. At 1024-px field scale the canvas has gland profiles with open lumina and columnar borders across the upper right and left, a broad pale mucus channel at the top centre with a columnar palisade along its left wall, a second pale channel at the bottom centre, and a red-cell (haemorrhagic) mass at the lower left. At 1:1 at (1664,640) the crop is solid cellular tissue: epithelial groups with pale vacuolated cytoplasm and dark ovoid nuclei, thin eosinophilic strands carrying spindle nuclei, small capillaries with red cells, and a scatter of small dark nuclei between the groups - a glandular and an inflammatory component in the same field, which is what the mixed category asks for. Unlike the a5 bag-diverse canvas this replaced, the field is not uniformly dense: (300,300) has a slit-like lumen and a dense nuclear cluster, (3100,1100) has pale vacuolated groups with clear spaces and a strong eosinophilic band, and the mosaic construction over 11 real fields shows as that variation. There is no clean columnar palisade in the (1664,640) crop itself and the nuclear membranes are softer than the real reference's, which carries crisp palisades and speckled chromatin. Detail 20.5 against a real mixed 22.8; infiltrate thin at 1603/mm2 against a real 3528. No seam, no tiling (boundary ratio 1.020 vs null 1.025).
Reduced preview. Open for the full 4096 × 2048 PNG.Selected detail crop, displayed to fit.
Recorded visual inspection and limitations
The best-organised of the three normals and the only final with a real mucosal surface: an eosinophilic surface strand with empty slide above it at (200,120), a columnar band below it at (900,200), and beneath that gland profiles with clean lumina, one row of basal nuclei each, and capillaries carrying red cells at (2600,1400). At the standard crop position the field is a mass of pale foveolar-type cells with a gland lumen at the right and a row of dark nuclei down its wall. Stromal nuclear density 4520/mm2, above the real normal median; image 09 is closer on this metric. No seam (1.012 vs null 1.035), no tiling. Its pale upper-left region is empty background above the tissue, not a mucus wash.
Reduced preview. Open for the full 4096 × 2048 PNG.Selected detail crop, displayed to fit.
Recorded visual inspection and limitations
A uniform field of polygonal cells with fine granular pink cytoplasm, one small round dark nucleus each, and small round clear holes; plausible as oxyntic mucosa cut transversely. Checked at 1:1 at (300,300), (1664,640) and (3100,1100) - the same everywhere. That uniformity is the criticism: the whole canvas carries one texture, with no gland outlines, no stromal bands and no surface, so at field scale it reads as an even scatter of cells rather than as tissue with architecture. It is not a lattice and not a tiling: the cell outlines are irregular and the spacing is not periodic (boundary ratio 0.983 vs null 1.012).
Reduced preview. Open for the full 4096 × 2048 PNG.Selected detail crop, displayed to fit.
Recorded visual inspection and limitations
Cohesive polygonal cells with granular pink-violet cytoplasm and one round-to-ovoid dark nucleus each, separated by thin eosinophilic strands carrying spindle nuclei, with frequent clusters of red cells reading as capillaries and very many small round clear holes spread evenly over the whole canvas. Those holes are the ring measurement: 0.985 of ring-detected objects have a lumen, above the real held-out normal ceiling of 0.976, and at 1:1 they are small intercellular openings rather than gland lumina with a bordering epithelial row - the over-production of openings that filter (2)'s upper bound exists to catch. Nuclear chromatin is speckled and the nuclear membranes are the crispest in the package (mean absolute Laplacian 23.7, the highest of the ten and the only one of the ten above its own category's real held-out median of 22.8), and stromal nuclear density is 5511/mm2, the highest of the three normals and 1300 above the real held-out normal median of 4211 - on this measure it overshoots, where the gastritis and mixed images all fall far short of their own categories' real levels. Checked at 1:1 at (300,300), (1664,640) and (3100,1100): the same texture everywhere - like image 09, the whole canvas carries one texture, with no gland outlines, no surface and no distinct lamina propria band. The cells are cohesive, so this is not the dissociated-cell failure that the three v2 normal_s14 canvases were rejected for on sight (section 4). Against the real held-out normal crop the difference is architecture, not detail: the real field has a red-cell-packed capillary, gland profiles with a basal nuclear row and definite gland walls. This canvas is also less architectural than the image it replaced - cartoon lumen IoU 0.269 against that image's 0.622 - so what the swap buys in envelope distance (7.12 -> 3.27) and detail (17.8 -> 23.7) it pays for in how much of the procedural drawing's layout survives. No seam (boundary ratio 0.938 vs null 1.001, the lowest of the ten and below the real gastritis field's 0.948; a seam would read above 1, not below).
The comparisons below are from HiESD slide 0d55cc29, held out in the programme’s reference evaluation. They are real tissue, displayed as reduced previews and selected native-resolution crops. They are attributed to the HiESD authors under CC BY 4.0; see the dataset and paper below. Cropping and resizing were performed for this research display.
Label correction: the programme’s historical filenames use “hpylori_gastritis” and “mixed”. HiESD supplies chronic-gastritis and metaplasia region annotations; those names do not prove H. pylori organisms or infection. “Normal gland” annotation also does not establish patient-level H. pylori negativity.
Chronic gastritis annotation; H. pylori not verified
Real HiESD tissue · full · cropped/resized for displayReal HiESD tissue · crop · cropped/resized for display
Intestinal metaplasia annotation
Real HiESD tissue · full · cropped/resized for displayReal HiESD tissue · crop · cropped/resized for display
Metaplasia / gastritis region mapping; H. pylori not verified
Real HiESD tissue · full · cropped/resized for displayReal HiESD tissue · crop · cropped/resized for display
Normal-gland annotation; patient infection status not established
Real HiESD tissue · full · cropped/resized for displayReal HiESD tissue · crop · cropped/resized for display
Research history and experiment evidence
The record includes earlier general-image-model trials, pathology-native generation, human-mask experiments, lumen locking, three-dimensional tissue construction, reference-feature experiments, structure adapters and final candidate selection. Measurements below are dated engineering evidence. They do not establish that synthetic training data improves diagnosis on unseen patients.
The earlier stages explain why the current method took this form: generic image models did not establish scale-appropriate diagnostic morphology; the early human-mask adapter did not demonstrate independent geometry; locking gland lumens failed at useful strengths; a more realistic procedural drawing still lost its layout under heavy repaint; and the coarse structure adapter was introduced to control architecture without stamping individual nuclei.
The published figure collection includes the earlier comparison sheets as dated evidence. “Best” in an older caption means best in that comparison, not the best candidate as of a later run.
Image bytes and original image checksums are preserved. Public provenance and report exports omit local machine paths and access details while retaining source filenames, generation settings and measurements. The public manifest records SHA-256 values for the published files themselves.
What remains before the package is complete
Improve and re-review normal candidates. The selected body-type images have weak gland organisation; the current follow-up targets antrum-type tissue with clearly lined gland lumens.
Complete the 70-real / 70-synthetic sets. Candidate generation and sourcing are underway. A count of downloaded or generated images is not a count of qualified challenge images.
Verify source disease labels. Public chronic-gastritis fields are not automatically H. pylori-positive fields. IM, organisms and their biologically plausible co-occurrence require appropriate verification.
Obtain specialist review. Crisp goblet-cell morphology, inflammatory density, organism placement, normal architecture and fine cellular texture remain open issues. Some procedural rods sit centrally in channels rather than adhering to the tissue surface.
Resolve rights and intended use. The programme records unresolved PixCell/UNI2-h permissions for a company challenge submission. Public dataset licences and model licences are separate. No model weights are distributed here.
Finish and validate the upload package. Final files need category metadata, provenance, checksums and the required review and submission steps. The website remains an updateable supporting link.
Public-source feasibility
HiESD is the main high-resolution public source: its scanned fields can cover the requested physical area without inventing resolution. The downloaded GasHisSDB set consists of 80-, 120- and 160-pixel patches with normal/abnormal labels; it cannot supply a native 4096 × 2048 field at the required scale. Public web micrographs may show organisms but often lack sufficient dimensions, physical sampling or field of view. Simply enlarging them does not solve that limitation.
HiESD: JSGe-AI / HiESD authors, A fully annotated pathology slide dataset for early gastric cancer and precancerous lesions. Dataset, DOI 10.6084/m9.figshare.28919840, paper, author repository. Reference previews are cropped/resized derivatives, CC BY 4.0. Internal challenge-category mappings must not be mistaken for additional dataset annotations.