Ink detection from surface topography of the Herculaneum papyri Authors: Giorgio Angelotti, Federica Nicolardi, Paul Henderson, W. Brent Seales Published: 2026 ABSTRACT Reading the Herculaneum papyri is challenging because both the scrolls and the ink, which is carbon-based, are carbonized. In X-ray radiography and tomography, ink detection typically relies on density- or composition-driven contrast, but carbon ink on carbonized papyrus provides little attenuation contrast. Building on earlier X-ray phase contrast tomographic and microscopic observations suggesting that relief contributes to letter visibility, we show that surface morphology of written regions contains enough signal to distinguish ink from papyrus. To this end, we train a deep-learning model on three-dimensional optical profilometry of mechanically opened Herculaneum papyri to separate inked and uninked areas. Although our measurements do not show general bulk letter relief or universal roughness cues, we show that high-resolution topography alone contains a usable signal for ink detection on the collected dataset. We further quantify how lateral sampling governs learnability and how a native-resolution model behaves on coarsened inputs. Leave-one-papyrus-out transfer is heterogeneous. Diminishing segmentation performance with decreasing lateral resolution provides insight into the characteristic spatial scales that must be resolved on our dataset to exploit the morphological signal. These findings define a proof-of-concept and conditionally inform resolution needs for morphology-based reading of closed scrolls, which will also depend on the imaging modality. Introduction The Herculaneum papyri are hundreds of carbonized books in the form of scrolls discovered in the second half of the eighteenth century in the ruins of the Roman city of Herculaneum, destroyed and buried by the eruption of Vesuvius in 79 AD. Having been carbonized and buried under volcanic ash for almost two millennia, the collection constitutes the only library preserved from Greco-Roman antiquity1,2. Despite several opening and unrolling methods applied to the papyri over almost three centuries, hundreds of volumes remain unread3,4. More than 800 inventoried items – entire scrolls and pieces of scrolls – are still rolled, and their extreme fragility makes noninvasive reading extraordinarily challenging5,6. Recent work has proposed virtual-unwrapping pipelines for X-ray computed tomography (CT) scans of sealed scrolls7–11. These methods geometrically flatten papyrus layers and, when paired with imaging that yields ink contrast, can extract text from closed scrolls7,8. For carbon inks on carbonized papyrus, however, absorption contrast is intrinsically weak, motivating the use of advanced modalities such as phase-contrast tomography and X-ray fluorescence12,13,15. Reading the Herculaneum papyri is also challenging for scrolls that, despite their fragility, could be mechanically unwrapped. Because carbon inks are difficult to distinguish in the visible spectrum, complementary surface-sensitive methods, such as infrared imaging16–18 and pulsed thermography, have recently revealed writing that is nearly invisible to the eye on Herculaneum fragments, supporting the premise that chemical surface properties carry a usable signal for carbon inks19. These techniques collectively show promise in enhancing weak, density-based ink signals to increase readability in both open trays and X-ray CT of closed scrolls. In parallel, cultural-heritage studies increasingly exploit optical profilometry and microprofilometry to characterize surface topography with sub-micrometre lateral sampling and nanometric vertical repeatability20. Profilometry is well established in paper science and forensic document analysis, where microrelief encodes writing processes and indented strokes21,22. These observations suggest a complementary hypothesis for carbonized papyri, often termed the morphological hypothesis14, that ink deposition alters local microrelief sufficiently that a purely morphological signal can discriminate inked and uninked regions, independent of composition. Consistent with this idea, earlier XPCT work5 on Herculaneum papyri suggested letter visibility linked to the observation of phase-contrast enhanced relief. Additionally, preliminary SEM observations on the Smithsonian scroll have suggested differences in surface roughness between ink and substrate, with inked regions appearing smoother13. However, neither optical microscopy nor phase-contrast imaging isolates topography as a standalone measurement. In the current work, we test this idea on mechanically unrolled fragments of carbonized Herculaneum papyri as a proof-of-concept on opened material rather than as a ready-to-deploy method for closed scrolls. Using a three-dimensional optical profilometer (Sensofar S lynx 2) in confocal mode, we acquire calibrated heightmaps over individual letters. We normalize the heightmaps, convert them to images, and train a deep-learning segmentation model to classify ink versus papyrus using manually drawn labels from aligned brightfield photographs. We address three questions: (i) does topography alone, at high lateral sampling, suffice to detect ink? (ii) how does apparent performance change when the same samples are synthetically downsampled to coarser pixel sizes, and when a high-resolution model is evaluated on upsampled, degraded inputs? and (iii) how papyrus-dependent is the learned signal when the model is transferred to an unseen papyrus? More specifically, the contributions of this work are: Dataset. An annotated optical-profilometry dataset spanning 14 regions across PHerc. 248, PHerc. 250, and PHerc. 500P2, comprising 16 individual letters captured at 0.34 μm lateral sampling with 8nm vertical sensitivity.Topography-only segmentation. To our knowledge, the first experimental demonstration in the Herculaneum collection that surface topography alone, measured directly by optical profilometry, supports accurate ink segmentation at native lateral sampling (0.34 μm), with held-out Dice scores of approximately 0.88–0.90.Resolution–performance trend. Evidence of a monotonic degradation with coarser sampling on this dataset: median Dice decreases from 0.890 [0.864,0.905] at 0.34 μm to 0.467 [0.364,0.524] at 10.88 μm (Friedman \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\chi ^{2}=88.34$$\end{document}, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$p=1.01\times 10^{-15}$$\end{document}; Page’s L=3848, one-sided \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$p=1.0\times 10^{-4}$$\end{document}). This trend reflects our dataset and is not claimed as a universal bound.Cross-resolution inference. A model trained at 0.34 μm degrades in performance on upsampled coarse inputs; Dice falls gently by \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\le \!{2.04}{\upmu \textrm{m}}$$\end{document} pixel sizes, but sharply to near zero by \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\ge \!{3.40}{\upmu \textrm{m}}$$\end{document}, underscoring that a model trained on fine features still captures some signal up to \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${2.04}{\upmu \textrm{m}}$$\end{document}, but this signal is completely lost soon after.Isotropic-voxel emulation. Within this optical-profilometry setting, evaluating matched-resolution models on vertically discretized heightmaps (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\Delta z=\Delta x$$\end{document}) yields Dice values comparable to the continuous-height setting, suggesting that vertical quantization is not the primary bottleneck on this dataset.Cross-papyrus generalization. A leave-one-papyrus-out evaluation at native sampling (0.34 μm) quantifies transfer across manuscripts. Aggregating held-out samples across splits yields a mean Dice of 0.691, while per-papyrus performance is heterogeneous (Table 4). Dataset. An annotated optical-profilometry dataset spanning 14 regions across PHerc. 248, PHerc. 250, and PHerc. 500P2, comprising 16 individual letters captured at 0.34 μm lateral sampling with 8nm vertical sensitivity. Dataset. An annotated optical-profilometry dataset spanning 14 regions across PHerc. 248, PHerc. 250, and PHerc. 500P2, comprising 16 individual letters captured at 0.34 μm lateral sampling with 8nm vertical sensitivity. Topography-only segmentation. To our knowledge, the first experimental demonstration in the Herculaneum collection that surface topography alone, measured directly by optical profilometry, supports accurate ink segmentation at native lateral sampling (0.34 μm), with held-out Dice scores of approximately 0.88–0.90. Topography-only segmentation. To our knowledge, the first experimental demonstration in the Herculaneum collection that surface topography alone, measured directly by optical profilometry, supports accurate ink segmentation at native lateral sampling (0.34 μm), with held-out Dice scores of approximately 0.88–0.90. Resolution–performance trend. Evidence of a monotonic degradation with coarser sampling on this dataset: median Dice decreases from 0.890 [0.864,0.905] at 0.34 μm to 0.467 [0.364,0.524] at 10.88 μm (Friedman \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\chi ^{2}=88.34$$\end{document}, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$p=1.01\times 10^{-15}$$\end{document}; Page’s L=3848, one-sided \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$p=1.0\times 10^{-4}$$\end{document}). This trend reflects our dataset and is not claimed as a universal bound. Resolution–performance trend. Evidence of a monotonic degradation with coarser sampling on this dataset: median Dice decreases from 0.890 [0.864,0.905] at 0.34 μm to 0.467 [0.364,0.524] at 10.88 μm (Friedman \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\chi ^{2}=88.34$$\end{document}, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$p=1.01\times 10^{-15}$$\end{document}; Page’s L=3848, one-sided \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$p=1.0\times 10^{-4}$$\end{document}). This trend reflects our dataset and is not claimed as a universal bound. Cross-resolution inference. A model trained at 0.34 μm degrades in performance on upsampled coarse inputs; Dice falls gently by \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\le \!{2.04}{\upmu \textrm{m}}$$\end{document} pixel sizes, but sharply to near zero by \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\ge \!{3.40}{\upmu \textrm{m}}$$\end{document}, underscoring that a model trained on fine features still captures some signal up to \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${2.04}{\upmu \textrm{m}}$$\end{document}, but this signal is completely lost soon after. Cross-resolution inference. A model trained at 0.34 μm degrades in performance on upsampled coarse inputs; Dice falls gently by \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\le \!{2.04}{\upmu \textrm{m}}$$\end{document} pixel sizes, but sharply to near zero by \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\ge \!{3.40}{\upmu \textrm{m}}$$\end{document}, underscoring that a model trained on fine features still captures some signal up to \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${2.04}{\upmu \textrm{m}}$$\end{document}, but this signal is completely lost soon after. Isotropic-voxel emulation. Within this optical-profilometry setting, evaluating matched-resolution models on vertically discretized heightmaps (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\Delta z=\Delta x$$\end{document}) yields Dice values comparable to the continuous-height setting, suggesting that vertical quantization is not the primary bottleneck on this dataset. Isotropic-voxel emulation. Within this optical-profilometry setting, evaluating matched-resolution models on vertically discretized heightmaps (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\Delta z=\Delta x$$\end{document}) yields Dice values comparable to the continuous-height setting, suggesting that vertical quantization is not the primary bottleneck on this dataset. Cross-papyrus generalization. A leave-one-papyrus-out evaluation at native sampling (0.34 μm) quantifies transfer across manuscripts. Aggregating held-out samples across splits yields a mean Dice of 0.691, while per-papyrus performance is heterogeneous (Table 4). Cross-papyrus generalization. A leave-one-papyrus-out evaluation at native sampling (0.34 μm) quantifies transfer across manuscripts. Aggregating held-out samples across splits yields a mean Dice of 0.691, while per-papyrus performance is heterogeneous (Table 4). Methods Samples. We analyzed fragments from three carbonized papyri–PHerc. 248, PHerc. 250 and PHerc. 500P2. PHerc. 248 (Philodemus, De pietate) and PHerc. 250 (Philodemus, De rhetorica I) are the extant sheets of two scorze––outermost portions of scrolls removed through longitudinal cuts in the 1750s––which were scraped off layer by layer in the first half of the 19th century. PHerc. 500P2 is one of the loose pieces inventoried under PHerc. number 500, which are currently stored in cassetto 28. Sixteen letters from these fragments were selected based on visible legibility and minimal physical damage. Each letter region measured approximately 1.5mm on a side. The dataset comprises 14 independent samples derived from these 16 letters. Most samples contain a single letter, whereas two adjacent letter pairs (from PHerc. 248 and PHerc. 500P2) were captured within single acquisitions and therefore treated as single samples throughout splitting and evaluation. At native sampling, the maps span approximately 15.1–38.0 Mpix each, with median shape \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\sim 4484\times 4928$$\end{document} pixels and a total native data volume of 321.1 Mpix across the 14 maps. Acquisition. Surface topography was measured using a Sensofar S lynx 2 optical profilometer operating in confocal mode. The lateral sampling at native resolution was 0.34μm, and the vertical sensitivity was 8nm. For each sample, a co-registered brightfield photograph was acquired to aid manual annotation. The brightfield and topography data were aligned by construction because the profilometer acquired them on the same field of view; only common-overlap cropping was applied where needed, and no separate geometric registration pipeline was used. Examples of letters from PHerc. 250 are displayed in Figure 1. Preprocessing and synthetic downsampling. Raw profilometry exports occasionally contained non-finite height values (NaN/Inf) at pixels where the confocal reconstruction failed. Before any resampling or normalization, we recorded a binary validity mask \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$M(x)=\mathbb {1}[\textrm{finite}(z(x))]$$\end{document} and filled missing pixels to obtain dense maps compatible with nnU-Net training. Missing values were filled by inpainting only the non-finite pixels using the fast-marching method of Telea25 (OpenCV implementation; radius =3 pixels). Inpainting was performed on a temporary 8-bit normalized map using robust linear scaling (0.5–99.5 percentiles) and then mapped back to the original height range. To guarantee that measured values were unchanged, all originally finite pixels were restored exactly after inpainting. The native heightmaps (0.34 μm lateral sampling) were then normalized independently per sample to [0,1], scaled to [0,65535], and cast to uint16. Because this normalization is performed separately for each sample, absolute between-sample height offsets are removed and the model is necessarily driven by within-sample topographic structure rather than a globally calibrated relief scale. Throughout, the quoted lateral pixel sizes denote nominal sampling after synthetic averaging; the effective resolved detail can be poorer because averaging, interpolation, blur, discretization, and modality-specific reconstruction all attenuate fine structure. To quantify how segmentation performance depends on lateral sampling, and to emulate the coarser effective sampling that may be encountered in volumetric imaging of closed scrolls, we synthetically downsampled each heightmap. Coarser effective lateral resolutions were simulated by block averaging using square kernels of size n× n pixels where n varied from 2 to 32. The downsampled maps were then upsampled back to the original grid using bilinear interpolation to create paired inputs for cross-resolution inference. In a complementary “isotropic voxel” simulation, we additionally discretized the height values in physical units (μm) into uniform bins whose width matched the effective lateral pixel size at each resolution (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\Delta z=\Delta x$$\end{document}). These operations (downsampling, upsampling and z-binning) were applied before per-sample normalization and uint16 conversion. We did not apply plane subtraction or tilt correction in the primary training pipeline. For a native-resolution detrending ablation, we fitted and subtracted a least-squares plane from each inpainted native heightmap before per-sample normalization and uint16 conversion, and then trained and evaluated nnU-Net using the same five sample-level folds and model settings as in the primary 0.34 μm experiment. Labelling and splits. Binary ink masks were manually delineated on aligned brightfield photographs using GIMP. The primary evaluation used five sample-level cross-validation folds over the 14 samples. The adjacent letter pairs were kept within single samples and were never split across folds. In each fold, entire held-out sample IDs were excluded from training; nnU-Net’s internal patch sampling operated only on the case IDs listed in that fold’s training split, so no pixels or patches from a held-out sample were seen during training. The reported five-fold results aggregate the single held-out prediction obtained for each sample from its corresponding validation fold. For matched-resolution experiments, we trained separate 2D nnU-Net models at each lateral sampling. For cross-resolution inference, the model trained at 0.34 μm was evaluated on degraded versions of the held-out inputs. For z-binning, the matched-resolution models were evaluated on z-binned versions of the held-out inputs using the same fold-wise models trained on continuous-height maps. To assess cross-papyrus generalization, we additionally used three leave-one-papyrus-out folds, in which PHerc. 500P2, PHerc. 250, and PHerc. 248 were each held out in turn while training on all samples from the other two papyri. Descriptor analysis. As a compact physical characterization of the measured signal we fitted and subtracted a plane from each native heightmap and computed simple per-sample descriptors on the detrended map. Within the annotated ink and papyrus regions we measured the median detrended height, the median absolute deviation (MAD), and the foreground fraction. As a simple multi-scale roughness proxy, we also subtracted smoothed versions of the detrended map at σ =1,3,9 pixels and computed the residual root-mean-square height within ink and papyrus, reported as an ink-to-papyrus ratio. These descriptors were used only to summarize the physical signal and were not provided to the network during training or inference. Model and training. We used the 2D nnU-Net framework23 as a strong self-configuring segmentation baseline that reduces manual architecture tuning on a small dataset. The stored native configuration was a residual-encoder U-Net with an 896× 896 patch size and batch size 12. The trainer used Dice plus cross-entropy loss, stochastic gradient descent with Nesterov momentum, an initial learning rate of 0.01 with polynomial decay, and the standard nnU-Net schedule of 1000 nominal epochs with 250 training iterations and 50 validation iterations per epoch. Fold-wise inference used the best checkpoint on the validation set. Evaluation and statistics. Segmentation performance was quantified using the Dice coefficient, an overlap score between the predicted and annotated ink masks ranging from 0 (no overlap) to 1 (perfect overlap). For matched-resolution models, we reported Dice across the 14 held-out samples aggregated over cross-validation folds. Analyses were performed on related samples across pixel sizes. Because normality could not be assumed, we used non-parametric tests: Friedman test (omnibus, two-tailed) and Page’s L (ordered trend, one-tailed). Unless otherwise noted, we used a significance threshold α =0.05. Post-hoc pairwise comparisons used the Wilcoxon signed-rank test (two-tailed) with Holm correction controlling the family-wise error rate across all pixel-size contrasts. We summarize data with median ([Q1, Q3]) and mean ± standard deviation. To assess whether missing-value patterns could confound learning, we also quantified the fraction of non-finite pixels in the raw (pre-fill) heightmaps inside ink and papyrus regions and compared paired fractions with a Wilcoxon signed-rank test; additionally, we report the Dice overlap between the missingness mask and ink annotations as a trivial mask-only baseline. Fig. 1Representative profilometry overview for three samples from PHerc. 250. Each row shows a distinct letter. From left to right: (i) full 3D render of the measured topography; (ii) 2D heightmap with topographic contours; (iii) aligned brightfield image with visible ink. Axes are in μm; height color bars share the same scale within each row. Representative profilometry overview for three samples from PHerc. 250. Each row shows a distinct letter. From left to right: (i) full 3D render of the measured topography; (ii) 2D heightmap with topographic contours; (iii) aligned brightfield image with visible ink. Axes are in μm; height color bars share the same scale within each row. Results Overview In total, we analyzed 16 letters grouped in 14 samples across three papyri. The summary of the topographic descriptors is reported in Table 2. The principal outcomes of the segmentation experiments are illustrated in Figs. 2 and 3, Table 3, the native-resolution detrending ablation in Table 1, and the leave-one-papyrus-out generalization summary in Table 4. High-resolution topography supported accurate ink segmentation, with median held-out Dice scores around 0.89. Performance degraded monotonically when the lateral sampling was synthetically coarsened by block averaging, and a model trained on native sampling retained reasonable accuracy only up to approximately 1 μm effective pixel size. When presented to the high-resolution model, coarser inputs showed high performance up to 1.36 μm lateral sampling but degraded at coarser resolution. For visual guidance, we show \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\textrm{Dice}=0.70$$\end{document} as a commonly used reference overlap threshold in segmentation24. At native sampling, leave-one-papyrus-out evaluation shows heterogeneous transfer, with especially weak performance on PHerc. 500P2. Qualitative examples Figure 2 illustrates three representative letters: ε from PHerc. 248, κ from PHerc. 250, and η from PHerc. 500P2. From left to right, columns show the topographic 16-bit unsigned-integer image after conversion, the predicted ink mask, and the co-registered brightfield photograph. Under the displayed normalization and contrast settings, the ink is not visually separable in the topographic image. In the full dataset, the heightmap appears to be dominated by the inclination and curvature of the surface, which is not perfectly flat, and by the shape of fibers that compose the papyrus sheet. Indeed, the surface can have some valleys or hills juxtaposed with papyrus fibers. Nevertheless, the trained machine learning model closely tracks stroke interiors and tapers at feathered boundaries where height relief approaches the background micro-roughness. Fig. 2Qualitative examples across three papyri. Rows from top to bottom are ε on PHerc. 248, κ on PHerc. 250, and η on PHerc. 500P2. Columns from left to right are (i) topographic map converted to uint16 image, (ii) nnU-Net model prediction, and (iii) brightfield photo. The grid structure visible in the heightmap is the lattice of fibers composing the papyrus substrate. Qualitative examples across three papyri. Rows from top to bottom are ε on PHerc. 248, κ on PHerc. 250, and η on PHerc. 500P2. Columns from left to right are (i) topographic map converted to uint16 image, (ii) nnU-Net model prediction, and (iii) brightfield photo. The grid structure visible in the heightmap is the lattice of fibers composing the papyrus substrate. Descriptive topography analysis after detrending. To summarize the physical signal observed in the native maps, we evaluated simple descriptors on plane-detrended heightmaps (Table 2). Across the 14 samples, the detrended ink-minus-papyrus median offset was positive in 9 cases and negative in 5, with a cross-sample median of + 1.53 μ m, interquartile range [– 7.47μm, 22.67 μm], and overall range [– 42.51 μm, 56.17 μm]. When aggregated at the papyrus level, the mean ink-minus-papyrus median offset was positive for PHerc. 248 and PHerc. 500P2 (14.74 μm and 20.14 μm, respectively), but negative for PHerc. 250 (– 16.36 μm). Thus, neither the sign nor the magnitude of the relative relief was consistent across the material studied here, and the data do not support a systematic large positive ink relief. In particular, these values remain far below the relief of more than 100 μm reported in earlier X-ray phase-contrast tomography measurements on PHerc. Paris4;5 given the 8nm vertical repeatability of our instrument, such a bulk offset would be readily detectable if present in our data. Mean ink and papyrus MAD values were of comparable magnitude across papyri (36.67 μm to 38.67 μm and 38.40 μm to 49.60 μm, respectively), indicating that local height variability was not uniquely associated with inked regions. The roughness ratio remained below unity for all papyrus-level averages, with values of 0.388, 0.350, and 0.130 for PHerc. 248, PHerc. 250, and PHerc. 500P2, respectively. Overall, these descriptors indicate heterogeneous local topographic behavior across the studied papyri: in some cases the ink is associated with positive average relief, whereas in others the contrast is weak or inverted, suggesting that topographic discrimination of ink is more likely to rely on a combination of local edge transitions, broader background gradients, and texture differences than on a uniform embossed ink layer alone. Learning from topography alone. At the native sampling of 0.34 μm, training converged smoothly across folds. Held-out Dice scores clustered around 0.88–0.90 with a median of 0.890 [0.864,0.905], supporting the central claim that measured surface morphology alone provides a discriminative signal for ink on this dataset and, to our knowledge, constituting the first experimental demonstration of this kind in the Herculaneum corpus. To test whether this native-resolution result was driven by large-scale inclination or curvature, we repeated the 0.34 μm experiment after subtracting a fitted plane from each heightmap before normalization, using the same sample-level folds. The resulting median Dice was 0.891 [0.867,0.911], compared with 0.890 [0.864,0.905] for the primary inputs (Table 1), indicating that simple plane detrending did not materially alter native-resolution segmentation performance. Table 1Native-resolution plane-detrending ablation at 0.34 μm.Input preprocessing n Dice median [Q1, Q3]Primary native heightmaps140.890 [0.864, 0.905]Plane-detrended native heightmaps140.891 [0.867, 0.911]Plane-detrended inputs were produced by subtracting a fitted plane before per-sample normalization and were evaluated using the same five sample-level folds as the primary experiment. Values are Dice median [Q1, Q3] across the same n=14 held-out samples. Table 1Native-resolution plane-detrending ablation at 0.34 μm.Input preprocessing n Dice median [Q1, Q3]Primary native heightmaps140.890 [0.864, 0.905]Plane-detrended native heightmaps140.891 [0.867, 0.911]Plane-detrended inputs were produced by subtracting a fitted plane before per-sample normalization and were evaluated using the same five sample-level folds as the primary experiment. Values are Dice median [Q1, Q3] across the same n=14 held-out samples. Native-resolution plane-detrending ablation at 0.34 μm. Plane-detrended inputs were produced by subtracting a fitted plane before per-sample normalization and were evaluated using the same five sample-level folds as the primary experiment. Values are Dice median [Q1, Q3] across the same n=14 held-out samples. Missing-data artifact controls. Across the n=14 samples at native sampling, the raw (pre-fill) heightmaps contained a small fraction of non-finite pixels (median \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$1.665\%\,[1.250\%,2.352\%]$$\end{document}). Missingness was not systematically elevated inside ink relative to papyrus (ink: \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$1.653\%\,[1.443\%,2.357\%]$$\end{document}; papyrus: \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$1.768\%\,[1.075\%,2.379\%]$$\end{document}; paired Wilcoxon signed-rank test: W=52, two-sided p=1.0). The direct overlap between the missingness mask and ink annotations was negligible (Dice =0.032 [0.028,0.044]), suggesting that non-finite-pixel dropout patterns do not trivially coincide with ink regions on this dataset. Table 2Per-papyrus descriptors obtained by averaging the corresponding per-sample values across all samples belonging to each papyrus.Papyrus n Ink medianPapyrus medianMedian offsetInk MADPapyrus MADForeground fractionRoughness ratioPHerc. 248510.89-3.8514.7436.6749.600.3360.388PHerc. 2505-12.793.57-16.3638.6746.850.3650.350PHerc. 500P2415.43-4.7120.1437.6438.400.2820.130Ink and papyrus medians are reported explicitly, and the median offset is their difference (ink median minus papyrus median). Ink and papyrus MAD values, together with the medians and median offset, are given in μm. Foreground fraction and roughness ratio are unitless; the roughness ratio is the residual RMS within ink divided by that within papyrus at smoothing scale σ =3 pixels. Table 2Per-papyrus descriptors obtained by averaging the corresponding per-sample values across all samples belonging to each papyrus.Papyrus n Ink medianPapyrus medianMedian offsetInk MADPapyrus MADForeground fractionRoughness ratioPHerc. 248510.89-3.8514.7436.6749.600.3360.388PHerc. 2505-12.793.57-16.3638.6746.850.3650.350PHerc. 500P2415.43-4.7120.1437.6438.400.2820.130Ink and papyrus medians are reported explicitly, and the median offset is their difference (ink median minus papyrus median). Ink and papyrus MAD values, together with the medians and median offset, are given in μm. Foreground fraction and roughness ratio are unitless; the roughness ratio is the residual RMS within ink divided by that within papyrus at smoothing scale σ =3 pixels. Per-papyrus descriptors obtained by averaging the corresponding per-sample values across all samples belonging to each papyrus. Ink and papyrus medians are reported explicitly, and the median offset is their difference (ink median minus papyrus median). Ink and papyrus MAD values, together with the medians and median offset, are given in μm. Foreground fraction and roughness ratio are unitless; the roughness ratio is the residual RMS within ink divided by that within papyrus at smoothing scale σ =3 pixels. Resolution sensitivity with matched training and testing. The orange boxes in Fig. 3 and the first column partition of Table 3 summarize performance as lateral sampling is coarsened. Dice tended to decrease as pixel size increased, despite minor non-monotonic differences between resolutions. The Friedman test was highly significant (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\chi ^{2}\!=\!88.34$$\end{document}, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$p\!=\!1.01\times 10^{-15}$$\end{document}), and Page’s L confirmed an ordered decline (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$L\!=\!3848$$\end{document}, one-sided \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$p\!=\!1.0\times 10^{-4}$$\end{document}). Wilcoxon signed-rank pairwise comparisons involving 0.34 μm remained significant after Holm adjustment (adjusted p≤ 0.0044), with median paired changes in Dice ranging from - 0.086 to - 0.417 relative to 0.34 μm. Pixel sizes at and above roughly 2 μm were mutually indistinguishable after correction (adjusted p≥ 0.245). We interpret these as dataset-level observations rather than universal thresholds, as apparent bounds could shift with dataset size, variety, and machine learning model architecture. Fig. 3Segmentation performance (Dice) as a function of effective lateral sampling (pixel size, μm). Orange boxes: nnU-Net models trained and evaluated at matched resolution. Blue boxes: a single nnU-Net trained at 0.34 μm evaluated on inputs downsampled to coarser pixel sizes and upsampled to the native grid. Boxes show the median and interquartile range across n=14 cases; whiskers extend to the most extreme non-outlier values (Tukey, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$1.5\times \textrm{IQR}$$\end{document}; outliers omitted). The dashed horizontal line marks \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\textrm{Dice}=0.70$$\end{document} as a reference overlap threshold. Segmentation performance (Dice) as a function of effective lateral sampling (pixel size, μm). Orange boxes: nnU-Net models trained and evaluated at matched resolution. Blue boxes: a single nnU-Net trained at 0.34 μm evaluated on inputs downsampled to coarser pixel sizes and upsampled to the native grid. Boxes show the median and interquartile range across n=14 cases; whiskers extend to the most extreme non-outlier values (Tukey, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$1.5\times \textrm{IQR}$$\end{document}; outliers omitted). The dashed horizontal line marks \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\textrm{Dice}=0.70$$\end{document} as a reference overlap threshold. Table 3Dice versus lateral pixel size across three settings: (i) pixel size sensitivity (nnU-Net trained and evaluated at matched resolutions); (ii) a model trained at 0.34 μm evaluated on degraded input; and (iii) matched-resolution evaluation on z-binned heightmaps (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\Delta z=\Delta x$$\end{document}) to emulate isotropic voxels.Lateral pixel sizePixel size sensitivity (n = 14)Model trained at 0.34μmZ-binned test inputs (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\Delta z=\Delta x$$\end{document}, n=14)Median [Q1, Q3]Mean ± s.d.Median [Q1, Q3]Mean ± s.d.Median [Q1, Q3]Mean ± s.d.0.34 μm0.890 [0.864, 0.905]0.881 ± 0.0390.899 [0.866, 0.913]0.889 ± 0.0380.864 [0.808, 0.900]0.839 ± 0.0750.68 μm0.817 [0.775, 0.831]0.803 ± 0.0680.881 [0.857, 0.906]0.877 ± 0.0420.817 [0.755, 0.843]0.792 ± 0.0851.02 μm0.754 [0.698, 0.784]0.748 ± 0.0680.758 [0.670, 0.786]0.736 ± 0.0910.742 [0.701, 0.787]0.744 ± 0.0801.36 μm0.586 [0.483, 0.644]0.570 ± 0.1430.634 [0.557, 0.670]0.611 ± 0.1040.596 [0.507, 0.645]0.586 ± 0.1392.04 μm0.516 [0.421, 0.559]0.493 ± 0.0930.494 [0.341, 0.604]0.455 ± 0.2080.499 [0.451, 0.541]0.486 ± 0.0832.72 μm0.478 [0.429, 0.518]0.480 ± 0.0960.235 [0.088, 0.348]0.264 ± 0.2340.486 [0.426, 0.515]0.473 ± 0.0853.40 μm0.483 [0.392, 0.552]0.460 ± 0.1060.029 [0.000, 0.078]0.053 ± 0.0630.480 [0.381, 0.516]0.451 ± 0.1065.44 μm0.475 [0.440, 0.558]0.482 ± 0.0910.003 [0.000, 0.013]0.013 ± 0.0190.474 [0.415, 0.534]0.475 ± 0.08410.88 μm0.467 [0.364, 0.524]0.450 ± 0.0900.007 [0.003, 0.019]0.018 ± 0.0240.461 [0.397, 0.534]0.452 ± 0.091Values are median [Q1, Q3] and mean ± s.d. Only models at or finer than 1.02 μm exceed the \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\textrm{Dice}=0.70$$\end{document} reference threshold. Table 3Dice versus lateral pixel size across three settings: (i) pixel size sensitivity (nnU-Net trained and evaluated at matched resolutions); (ii) a model trained at 0.34 μm evaluated on degraded input; and (iii) matched-resolution evaluation on z-binned heightmaps (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\Delta z=\Delta x$$\end{document}) to emulate isotropic voxels.Lateral pixel sizePixel size sensitivity (n = 14)Model trained at 0.34μmZ-binned test inputs (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\Delta z=\Delta x$$\end{document}, n=14)Median [Q1, Q3]Mean ± s.d.Median [Q1, Q3]Mean ± s.d.Median [Q1, Q3]Mean ± s.d.0.34 μm0.890 [0.864, 0.905]0.881 ± 0.0390.899 [0.866, 0.913]0.889 ± 0.0380.864 [0.808, 0.900]0.839 ± 0.0750.68 μm0.817 [0.775, 0.831]0.803 ± 0.0680.881 [0.857, 0.906]0.877 ± 0.0420.817 [0.755, 0.843]0.792 ± 0.0851.02 μm0.754 [0.698, 0.784]0.748 ± 0.0680.758 [0.670, 0.786]0.736 ± 0.0910.742 [0.701, 0.787]0.744 ± 0.0801.36 μm0.586 [0.483, 0.644]0.570 ± 0.1430.634 [0.557, 0.670]0.611 ± 0.1040.596 [0.507, 0.645]0.586 ± 0.1392.04 μm0.516 [0.421, 0.559]0.493 ± 0.0930.494 [0.341, 0.604]0.455 ± 0.2080.499 [0.451, 0.541]0.486 ± 0.0832.72 μm0.478 [0.429, 0.518]0.480 ± 0.0960.235 [0.088, 0.348]0.264 ± 0.2340.486 [0.426, 0.515]0.473 ± 0.0853.40 μm0.483 [0.392, 0.552]0.460 ± 0.1060.029 [0.000, 0.078]0.053 ± 0.0630.480 [0.381, 0.516]0.451 ± 0.1065.44 μm0.475 [0.440, 0.558]0.482 ± 0.0910.003 [0.000, 0.013]0.013 ± 0.0190.474 [0.415, 0.534]0.475 ± 0.08410.88 μm0.467 [0.364, 0.524]0.450 ± 0.0900.007 [0.003, 0.019]0.018 ± 0.0240.461 [0.397, 0.534]0.452 ± 0.091Values are median [Q1, Q3] and mean ± s.d. Only models at or finer than 1.02 μm exceed the \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\textrm{Dice}=0.70$$\end{document} reference threshold. Dice versus lateral pixel size across three settings: (i) pixel size sensitivity (nnU-Net trained and evaluated at matched resolutions); (ii) a model trained at 0.34 μm evaluated on degraded input; and (iii) matched-resolution evaluation on z-binned heightmaps (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\Delta z=\Delta x$$\end{document}) to emulate isotropic voxels. Values are median [Q1, Q3] and mean ± s.d. Only models at or finer than 1.02 μm exceed the \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\textrm{Dice}=0.70$$\end{document} reference threshold. Isotropic-voxel emulation via z-binning. To approximate volumetric scans with isotropic voxels, we discretized height values into bins of width equal to the effective lateral pixel size at each resolution (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\Delta z=\Delta x$$\end{document}). The rightmost column group in Table 3 summarizes performance when the matched-resolution models are evaluated on z-binned held-out test inputs. Across resolutions, z-binning produced Dice values close to the continuous-height setting (leftmost column group), with absolute changes in median Dice of at most 0.026. A similar decline with increasing pixel size persists. Cross-resolution generalization with a fixed high-resolution model. We trained a 2D nnU-Net model at 0.34μm and, at test time, degraded inputs by block-averaging to coarser effective resolutions before up-sampling back to the native grid. The blue boxes in Fig. 3 and the second column partition of Table 3 summarize the outcome. Performance remained high through ∼1 μm, declined by 2.04 μm, and collapsed to near zero by 3.40 μm and coarser. The drop is steeper than in the matched-train/matched-test setting, consistent with the loss of high-frequency morphological content and distribution shift introduced by down-sample–up-sample pipelines. Statistics were \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\chi ^{2}\!=\!104.61$$\end{document}, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$p\!=\!4.86\times 10^{-19}$$\end{document} (Friedman) and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$L\!=\!3947$$\end{document}, one-sided \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$p\!=\!1.0\times 10^{-4}$$\end{document} (Page’s trend test). Cross-papyrus generalization. To probe whether learned morphological cues transfer across manuscripts, we performed a leave-one-papyrus-out evaluation at the native sampling (0.34 μm). For each papyrus in turn, an nnU-Net was trained on all samples from the other two papyri and evaluated on the held-out papyrus. Aggregating all held-out samples across the three splits (n=14), the mean Dice was 0.691. However, per-papyrus results varied substantially: performance remained relatively high when holding out PHerc. 248 (median Dice 0.757) or PHerc. 250 (median Dice 0.817), but dropped markedly when holding out PHerc. 500P2 (median Dice 0.475), indicating papyrus-dependent transfer on this dataset (Table 4). Table 4Leave-one-papyrus-out generalization at native lateral sampling (0.34 μm).Held-out papyrusnMedian [Q1, Q3]Mean ± s.d.PHerc. 24850.757 [0.733, 0.812]0.777 ± 0.059PHerc. 25050.817 [0.755, 0.822]0.789 ± 0.053PHerc. 500P240.475 [0.454, 0.482]0.461 ± 0.035For each held-out papyrus, an nnU-Net was trained on all samples from the other two papyri and evaluated on all samples from the held-out papyrus. Values are median [Q1, Q3] and mean ± s.d. across samples from the held-out papyrus. Pooled across all held-out samples (n=14), the mean Dice is 0.691. Table 4Leave-one-papyrus-out generalization at native lateral sampling (0.34 μm).Held-out papyrusnMedian [Q1, Q3]Mean ± s.d.PHerc. 24850.757 [0.733, 0.812]0.777 ± 0.059PHerc. 25050.817 [0.755, 0.822]0.789 ± 0.053PHerc. 500P240.475 [0.454, 0.482]0.461 ± 0.035For each held-out papyrus, an nnU-Net was trained on all samples from the other two papyri and evaluated on all samples from the held-out papyrus. Values are median [Q1, Q3] and mean ± s.d. across samples from the held-out papyrus. Pooled across all held-out samples (n=14), the mean Dice is 0.691. Leave-one-papyrus-out generalization at native lateral sampling (0.34 μm). For each held-out papyrus, an nnU-Net was trained on all samples from the other two papyri and evaluated on all samples from the held-out papyrus. Values are median [Q1, Q3] and mean ± s.d. across samples from the held-out papyrus. Pooled across all held-out samples (n=14), the mean Dice is 0.691. Discussion On this opened-fragment optical-profilometry dataset, high-resolution surface morphology carries enough signal to segment carbon ink. A notable observation in Table 3 is that a model trained at the native 0.34 μm sampling and evaluated on inputs blurred and up-sampled to 0.68 μm achieved higher Dice than models trained natively at the matched coarse resolution. This counterintuitive behavior echoes reports from the computer-vision literature: when images are uniformly downsampled at the input or early in the network, small features can disappear before the model learns to detect them26,27. Training on high-resolution data allows the network to learn morphological cues at full scale, which can still be exploited after moderate blurring. In contrast, training natively on coarse inputs forces the encoder to consume already low-pass signals, leading to poorer segmentation. However, once effective pixel sizes exceed ∼1 μm, both strategies collapse, consistent with small-object detection theories that emphasize information loss from downsampling28. These considerations emphasize the need to preserve fine structure throughout the pipeline and caution against aggressive downsampling. The descriptor analysis (Table 2) supports a more restrained interpretation of the underlying physical contrast. Across samples, the detrended ink-minus-papyrus offset exhibits variable sign, indicating that the relative surface response is not consistent. In some cases, strokes are manifested predominantly as localized elevations; in others, as depressions; and in still others, as edge-profile modifications superimposed on broader background gradients. The roughness proxy more frequently suggests that inked regions are smoother than the adjacent papyrus substrate, but this pattern is not universal and, in isolation, does not account for the observed segmentation performance. Given that the neural network is nonetheless able to discriminate ink from substrate, these results imply that the informative signal is heterogeneous and spatially localized, rather than arising exclusively from either bulk topographic relief or surface roughness alone. The native-resolution detrending ablation further supports this interpretation: subtracting a fitted plane before normalization changed the median Dice only from 0.890 to 0.891, making it unlikely that the primary result is driven mainly by global tilt or curvature. We also performed complementary experiments where we discretized the vertical height values into bins as large as the lateral pixels to emulate an isotropic voxel sampling, akin to what might be achievable with volumetric X-ray tomography. The z-binned columns in Table 3 show that this z-quantization changes Dice only modestly across our dataset (maximum median shift 0.026 across resolutions) and preserves the overall trend of declining performance with coarser sampling. The study is affected by the following limitations. Our dataset is small (sixteen letters across fourteen samples from three papyri) and therefore statistical power is limited, particularly at the coarsest samplings where variance increases. Although we report leave-one-papyrus-out generalization at 0.34 μm (Table 4), each papyrus contributes only 4–5 samples; the markedly weaker transfer to PHerc. 500P2 shows that generalization is presently papyrus-dependent and may reflect preservation state, fiber morphology or ink deposition. Ground-truth masks were derived from co-registered brightfield photographs; this can introduce bias at feathered ink edges and propagate registration errors into evaluation. Synthetic downsampling by block averaging approximates but does not replicate the point-spread and modulation-transfer functions of real instruments, so our trends should be interpreted as qualitative rather than universal. A single encoder–decoder architecture and default training regimen were used; alternative losses, receptive-field sizes, or multi-scale designs may affect performance at coarse sampling. Per-sample normalization also removes absolute between-sample height offsets, so the model is biased toward within-sample morphology rather than a globally calibrated relief scale. The detrended descriptors in Table 2 are descriptive rather than a full mechanistic model of how ink deposition and papyrus structure jointly shape the surface, and they are not intended as a full explainability analysis of the network. These limitations notwithstanding, the observed monotonic decline with increased pixel size and the steep degradation when a high-resolution model is evaluated on substantially degraded inputs provide important guidance for the design of future experiments. In practical terms, the present workflow should therefore be read as a proof-of-concept and as a guide for future imaging rather than as an immediately deployable reading method for unopened scrolls. Near-term applications are more realistic for mechanically opened or partially accessible material that can be profiled directly, or for benchmarking which surface features future volumetric systems must preserve. For sealed scrolls, the key open question is not only nominal voxel size but whether reconstruction can preserve the same effective surface detail and domain characteristics seen in these optical maps. Finally, we assessed whether confocal reconstruction dropouts could explain segmentation performance. Non-finite pixels were rare (∼1–2%) and showed no systematic association with ink, and the missingness mask had negligible overlap with ink annotations (Dice ≈ 0.03). This indicates that simple missing-value patterns are unlikely to account for the observed topography-based segmentation; however, systematic height reconstruction biases correlated with surface optics remain a potential confound to be tested in future work. Conclusions and perspectives Optical profilometry with sub-micrometre lateral sampling provides, to our knowledge, the first experimental evidence within the Herculaneum corpus that carbon ink can be segmented using measured surface morphology alone on mechanically opened fragments. On the dataset examined here, segmentation performance decreased as the lateral sampling interval increased, and leave-one-papyrus-out generalization was variable across papyri, with particularly limited performance on PHerc. 500P2. These results therefore establish a proof-of-concept for opened fragments while also indicating an important constraint for future imaging strategies: morphology-based ink detection is more likely to succeed when fine-scale surface detail is retained, although the effective resolution threshold is expected to depend on the dataset, the state of preservation, and the imaging modality. The extent to which analogous cues may be recoverable within sealed scrolls remains to be established, but the present results point to a promising avenue for future work. Earlier phase-contrast studies suggest that ink-related relief can be measurable in sealed material5. Achieving sufficiently fine effective resolution in volumetric imaging may therefore offer a complementary route, alongside phase-contrast enhancement of subtle features, toward improving ink detection in closed-scroll datasets.