Manuscript Offprint
arXiv:2609.04305TNFlow: Amortized Posterior Inference for Trans-Neptunian Object Surface Composition
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Abstract
We present TNFlow, a transformer and normalizing flow architecture for inferring the surface composition of Trans-Neptunian Objects (TNOs) from their reflectance spectra. TNFlow is trained on synthetic spectra generated by the Shkuratov radiative transfer model to act as its inverse. TNFlow takes ~0.7 s to invert one spectrum on a single CPU core, returning a multimodal posterior over simplex-valid compositions and grain sizes. On synthetic spectra, the highest-weight mode achieves a mean total-variation distance of 0.149 from ground truth on the test split, and the model generalizes well to unseen combinations of known components. Qualitative tests on real JWST spectra show blindness or bias towards some materials. We suggest this could be attributed to either simulator fidelity or the training set.
1 Introduction
Trans-Neptunian objects (TNOs) are among the most primitive surfaces accessible to observation in the solar system. Frozen since their formation, they retain volatile ices whose abundances encode the history of the protoplanetary disk. Recovering the composition of these ices, what materials are present in what proportion and grain size, is a direct link to the formation conditions of the early solar system.
Surfaces are measured spectroscopically, producing a reflectance spectrum: how much light the surface reflects as a function of wavelength. Each ice absorbs at characteristic wavelengths, producing dips whose depths and shapes can, in principle, be used to infer composition.
Inference is difficult, however, because the composition-to-spectrum mapping is many-to-one. Spectra can be generated from a composition using a radiative transfer model (RTM) [Hapke, 1981, 1984, 1986, Shkuratov et al., 1999], but a standard method for RTM inversion remains an open question.
Fast, degeneracy-aware RTM inversion is the first step towards a large-scale model to infer compositions from real-life spectra. This work introduces TNFlow: a transformer and normalizing flow based architecture trained for TNO surfaces using the Shkuratov RTM [Shkuratov et al., 1999]. Once
Preprint.
trained, TNFlow yields a full posterior density of possible compositions in under a second, making survey-scale analysis practical. Since TNFlow is trained entirely on simulator output, we also test the sim-to-real gap qualitatively using JWST measurements (Appendix B). Code and data are available at https://github.com/agastiyo/TNFlow-companion.
MCMC inversion of an RTM [Schmidt and Fernando, 2015] is automated and returns a multimodal posterior, and it documents degeneracy in this class of inversion directly. However, the forward model is evaluated inside the sampling loop, which makes the cost per object large. Linear spectral unmixing [Liu et al., 2016] runs in seconds, but its output is a single point estimate with a local Gaussian error bar.
Finally, learned inverse models similar to TNFlow only exist in adjacent domains [Márquez-Neila et al., 2018, Vasist et al., 2023, Cranmer et al., 2020, Papamakarios et al., 2021]. Population-scale work on TNOs stops at qualitative taxonomy rather than abundances [Barucci et al., 2005, Hainaut et al., 2012, Pinilla-Alonso et al., 2025].
No existing method for RTM inversion is directly comparable on accuracy to TNFlow except for MCMC, which is out of the scope of this paper (Appendix E). Therefore, we claim no superiority in accuracy over any other method. Running time is compared against MCMC in section 5.
In summary, the key gap is a method that is fast enough for survey-scale use, returns a full posterior over compositions, and can be evaluated entirely offline once trained. The remainder of this paper describes TNFlow's approach to filling that gap.
3 Method
TNFlow is a normalizing flow model that learns to invert an RTM for TNO surface composition. Specifically, TNFlow uses a conditional neural spline flow (CNSF) [Durkan et al., 2019], an extension of a normalizing flow that conditions the mapping on an input, so that each input yields its own posterior distribution.
TNFlow has four components: a tokenizer, a Transformer [Vaswani et al., 2017] context encoder, and two CNSFs, one for composition and one for grain size. The model has 1,463,650 trainable parameters and outputs simplex-valid compositions and grain sizes over materials.
Tokenizer. Raw reflectance spectra are fed into the tokenizer as channels of reflectance-wavelength pairs. Reflectance values are normalized to the mean reflectance in a window around , and the wavelength is positionally encoded with 6 Fourier pairs. The normalized reflectance and positionally encoded wavelength are concatenated to form 13-dimensional tokens.
Context Encoder. The tokens are passed through a Transformer encoder with 4 multi-head attention layers, each with 8 heads and operating on a 128-dimensional embedding. The output of the multi-head attention layers is attention-pooled with learned weights to produce a single context vector of dimension 128.
Composition CNSF. The context vector is passed to a -dimensional CNSF with 4 transforms, each with 16 bins and two hidden dimensions of size 128. The CNSF outputs a posterior distribution over the proportions of all candidate components. Raw draws are then prescaled by a factor of and passed through a stick-breaking transformation, to ensure every sample is a valid composition by construction.
¹Required so that inverse stick-breaking outputs during training remain within the CNSF's learnable range.
Grain CNSF. This is run once per component holding more than 0.01 proportion in a given flow draw². The context vector, the full composition, and a 16-dimensional learned embedding of the current component condition a 1-dimensional CNSF with 2 transforms, each with 8 bins and two hidden dimensions of size 64. This flow yields a K-dimensional grain-size posterior without a K-dimensional flow.
Training. Each spectrum in the training set has a target composition and a target grain size per present component. The model is trained end-to-end on the sum of two negative log-likelihoods, weighted equally: the composition CNSF scores the target composition, and the grain CNSF scores the target grain sizes, standardized as log₁₀. The grain CNSF is teacher-forced, conditioned on the ground-truth target composition rather than a draw from the composition CNSF³. The grain CNSF is masked to predict grain sizes only for components that are present in the target. Both terms backpropagate through the shared encoder. To narrow the gap between simulator output and real observations, synthetic spectra are augmented each epoch with multiplicative and additive Gaussian noise (Appendix D). We optimize with Adam at a learning rate of 10⁻³ with plateau decay on a single GPU for approximately 8 hours (Appendix F). Our reported checkpoint and plateau schedule is selected using the held-out test split that section 5 reports on. However, selection is over epochs only and uses a criterion distinct from the reported metrics. During evaluation, these spectra also had a different noise realization than during training.
Inference. No extra noise is added during inference. A spectrum is tokenized and encoded once, yielding the context vector that conditions both flows. Drawing further samples requires no re-encoding. For each draw, a composition is sampled from the composition CNSF and also conditions the grain CNSF for its own grain sizes. One draw yields a K-dimensional composition and a K-dimensional grain vector. n draws give two n × K matrices. Marginals and credible intervals follow directly, and distinct solutions are recovered by fitting a BIC-GMM to the composition draws.
4 Data
TNFlow is trained entirely on synthetic data: 463,275 reflectance spectra (0.35–5 µm) generated with the Shkuratov RTM [Shkuratov et al., 1999]. Each spectrum is an intimate mixture of up to seven materials drawn from a library of K=20 candidate components covering the main ice and refractory families expected on TNO surfaces. The corpus is assembled from two sources described in Appendix A: a pre-existing collection of Shkuratov bestfit spectra (163,285 spectra, 1–4 components) and a purpose-built extension (299,990 spectra, 2–7 components) generated with CANA [De Prá et al., 2018] and SDOC⁴.
Splits. 14.7% of spectra were byte-identical to another spectrum: same components and proportions, differing only in grain size. Naively splitting the data into training and testing sets would risk leakage, so we split by composition group: every spectrum is keyed by (component set, proportions) and all rows sharing a key are assigned to one split. Eight component sets are held out entirely as out of distribution (OOD), which refers to unseen combinations of the K = 20 training components, not novel materials. The remainder is partitioned 80/20, giving 370,210 training, 92,691 test, and 374 OOD spectra.
Real Spectra. Informal analysis on real spectra is given in Appendix B and uses data from the JWST DiSCo-TNOs survey [Pinilla-Alonso et al., 2025].
5 Results
We evaluate TNFlow on all 374 OOD spectra and on 5,000 randomly sampled test spectra. All spectra are noised in the same way as the training spectra. For each spectrum, we draw 500 posterior samples and fit a BIC-GMM to the draws to identify distinct modes. The BIC-GMM returns all found modes, their weights, and the uncertainty of each mode. The top mode is the one with the highest weight, and the best mode is the one closest to the target composition in total-variation distance.
²Components at or below 0.01 proportion are treated as absent. ³This is also why splits are keyed by composition group (section 4) ⁴https://github.com/cana-asteroids/sdoc
Table 1: Per-solution accuracy on the test and group-holdout OOD splits (500 posterior draws per query, joint composition + grain BIC-GMM mode search). Top mode is the highest-weight mode; best mode is the mode closest to the target composition in total-variation distance. All ± values are one standard deviation.
| Metric | Test (n=5,000) | OOD (n=374) |
|---|---|---|
| Top-mode comp. TV | 0.149 ± 0.125 | 0.156 ± 0.091 |
| Best-mode comp. TV | 0.121 ± 0.098 | 0.132 ± 0.080 |
| Top-mode grain (dex) | 0.242 ± 0.212 | 0.279 ± 0.162 |
| Best-mode grain (dex) | 0.253 ± 0.201 | 0.283 ± 0.161 |
| Top mode = best (%) | 67.7 | 60.4 |
| Mean mode count | 2.50 | 2.64 |
| Multimodal (%) | 88.9 | 91.7 |
| Posterior sharpness | 0.203 ± 0.106 | 0.228 ± 0.066 |
We measure composition accuracy in total-variation distance (TV). Grain accuracy is measured in dex ( error). We also report the fraction of spectra for which the top mode is also the best mode, which measures how often the highest-weight mode is also the most accurate. Accuracy results are summarized in Table 1. Calibration of the posterior is measured using probability integral transform (PIT) histograms on true components. A PIT histogram maps each true value to its percentile within the predicted distribution. If the posterior is well-calibrated, the PIT histogram is uniform. We report PIT histograms for both composition and grain size in Figure 1. We also report posterior sharpness: the mean pairwise Euclidean distance between draws.
Cost. TNFlow takes ~0.7 s per object on a single CPU core (Appendix F). Training and corpus generation are one-time offline costs amortized over every subsequent object. For scale, Schmidt and Fernando [2015] report Hapke MCMC retrievals of order forward-model evaluations taking 1 min to 1 h per object on a comparable CPU, with an accelerated variant giving a further ~ speedup.
6 Discussion
For test spectra, TNFlow recovers the top mode with a relatively accurate mean composition TV (). Grain error remains around a factor of two of truth ( dex). The best mode is slightly better in composition, but its grain error is slightly worse. This is most likely due to the best mode being chosen on composition distance. Performance on the OOD split degrades slightly, but remains close to the test results. This indicates that TNFlow retains similar performance on unseen combinations of known components.
The model's outputs are also multimodal. In 88.9% of test and 91.7% of OOD spectra, the model finds more than one distinct solution. The mean number of modes is 2.50 for test and 2.64 for OOD spectra. In 67.7% of test spectra and 60.4% of OOD spectra, the top mode is also the best mode. In the remainder, the model did not weight the most accurate solution highest. The relatively accurate top-mode TV distance indicates these may also be close solutions, but establishing that all found modes are genuine degenerate solutions requires resynthesizing each mode through the forward model, which we leave to future work.
The slight degradation in accuracy and increased multimodality on the OOD split points to a healthy increase in uncertainty as the model is asked to extrapolate beyond its training distribution. Posterior sharpness moves in the same direction: draws are more widely spread on the OOD split (0.228) than on the test split (0.203).
The grain PIT histograms are well-calibrated. The composition PIT shows a right-skewed ramp, indicating systematic underprediction that worsens OOD. This is consistent with the model occasionally placing mass on extra components: because compositions are simplex-valid by construction, any mass assigned to a spurious component necessarily reduces the proportions of the true ones. The best mode's lower TV (0.121 vs. 0.149 on test) confirms that the posterior usually still contains a mode close to the true composition, even when it is not the highest-weight one.

Figure 1: Probability integral transform (PIT) histograms for composition (top) and grain size (bottom), on the test (left) and OOD (right) splits. A uniform histogram (dashed) indicates calibration. Composition intervals are biased in both splits, with a right-skewed ramp indicating systematic underprediction that worsens OOD; grain intervals are well calibrated throughout.
A direct accuracy comparison remains out of scope (section 2), but published refits give a sense of scale. Merlin et al. [2010] fit six TNOs with both Hapke and Shkuratov and find single-component proportions differing by up to ~0.28 between models, with grain sizes spanning an order of magnitude; Barucci et al. [2015] fit four Shkuratov spectra of Quaoar and find proportions varying by up to ~0.13 and grain sizes by ~0.2–0.6 dex across epochs.
7 Limitations and Future Work
Novel components. The OOD split tests unseen combinations of the same components. TNFlow cannot recover a material it has never seen. The model can be retrained with any component set, however, and retraining is a one-time offline cost.
Generalization to real objects. A qualitative analysis (Appendix B) applies TNFlow to real spectra from the JWST DiSCo-TNOs survey [Pinilla-Alonso et al., 2025]. CO, CO, and CHOH, whose absorption bands are clearly visible in the spectra, are not fully recovered by the model. Meanwhile, HO is assigned as the dominant component for all objects, including those the survey classifies as water-poor. This behavior was not seen on synthetic spectra. We hypothesize this gap is due to model bias against trace-abundance components (Appendix C), or because the Shkuratov RTM does not reproduce all physical effects present in real observations.
Future work. To address the sim-to-real gap, we plan to curate a training set that better covers trace abundances and other underrepresented cases in the current corpus. Creating hybrids of real and synthetic spectra may also help the model learn physical effects that the simulator does not capture.
To overcome the fixed component set, we will explore returning compositions over arbitrary-length optical-constant profiles rather than a set list of named materials. Finally, resynthesizing each recovered mode through the RTM and comparing it to the input spectrum would verify if all modes are degenerate solutions.
In summary, TNFlow demonstrates that amortized posterior inference over TNO surface compositions is practical: a sub-second, fully offline surrogate for the Shkuratov RTM that replaces the manual hours-per-object fitting loop and makes the inherent degeneracy of the inverse problem explicit. On synthetic data, composition accuracy is comparable to or better than the disagreements typically reported between independent manual refits. The main open challenge is closing the sim-to-real gap on real JWST spectra, which will require improvements to both training-set coverage and simulator fidelity.
Acknowledgments and Disclosure of Funding
This research was funded and made possible by the SETI Institute Research Experience for Undergraduates (REU) program, led by Dr. Matthew S. Tiscareno. We thank Dr. Cristina M. Dalle Ore for her REU mentorship and for providing the bestfit spectral collection that forms the foundation of the training corpus used in this work. We thank the SETI Institute for the computational resources used to train the model. We thank Dr. Alessandra Ricca's group at NASA Ames, supported by NASA Solar System Workings grant 80NSSC21K0776. We thank Dr. Jeffery Smith for useful conversations and comments on the paper draft.
References
M. A. Barucci, I. N. Belskaya, M. Fulchignoni, and M. Birlan. Taxonomy of Centaurs and Trans-Neptunian Objects. The Astronomical Journal, 130(3):1291, September 2005. ISSN 1538-3881. doi: 10.1086/431957.
M. A. Barucci, C. M. Dalle Ore, D. Perna, D. P. Cruikshank, A. Doressoundiram, A. Alvarez-Candal, E. Dotto, and C. Nitschelm. (50000) Quaoar: Surface composition variability. Astronomy & Astrophysics, 584:A107, December 2015. ISSN 0004-6361, 1432-0746. doi: 10.1051/0004-6361/201526119.
Kyle Cranmer, Johann Brehmer, and Gilles Louppe. The frontier of simulation-based inference. Proceedings of the National Academy of Sciences, 117(48):30055–30062, December 2020. doi: 10.1073/pnas.1912789117.
D. P. Cruikshank, C. B. Pilcher, and D. Morrison. Pluto: Evidence for Methane Frost. Science, 194 (4267):835–837, November 1976. doi: 10.1126/science.194.4267.835.
Dale P. Cruikshank, Ted L. Roush, Tobias C. Owen, Thomas R. Geballe, Catherine de Bergh, Bernard Schmitt, Robert H. Brown, and Mary Jane Bartholomew. Ices on the Surface of Triton. Science, 261(5122):742–745, August 1993. doi: 10.1126/science.261.5122.742.
Mário N. De Prá, Jorge Carvano, David Morate, Javier Licandro, and Noemí Pinilla-Alonso. Cana: An open-source python tool to study hydration in the Solar System. 2018.
J. Dorschner, B. Begemann, T. Henning, C. Jaeger, and H. Mutschke. Steps toward interstellar silicate mineralogy. II. Study of Mg-Fe-silicate glasses of variable composition. Astronomy and Astrophysics, 300:503, August 1995. ISSN 0004-6361.
Conor Durkan, Artur Bekasov, Iain Murray, and George Papamakarios. Neural Spline Flows. In Advances in Neural Information Processing Systems, volume 32. Curran Associates, Inc., 2019.
W. M. Grundy, B. Schmitt, and E. Quirico. The Temperature-Dependent Spectrum of Methane Ice I between 0.7 and 5 µm and Opportunities for Near-Infrared Remote Thermometry. Icarus, 155(2): 486–496, February 2002. ISSN 0019-1035. doi: 10.1006/icar.2001.6726.
O. R. Hainaut, H. Boehnhardt, and S. Protopapa. Colours of minor bodies in the outer solar system - II. A statistical analysis revisited. Astronomy & Astrophysics, 546:A115, October 2012. ISSN 0004-6361, 1432-0746. doi: 10.1051/0004-6361/201219566.
Gary B Hansen. Spectral absorption of solid CO2 from the ultraviolet to the far-infrared. Advances in Space Research, 20(8):1613–1616, January 1997. ISSN 0273-1177. doi: 10.1016/S0273-1177(97)00820-X.
Bruce Hapke. Bidirectional reflectance spectroscopy: 1. Theory. Journal of Geophysical Research: Solid Earth, 86(B4):3039–3054, 1981. ISSN 2156-2202. doi: 10.1029/JB086iB04p03039.
Bruce Hapke. Bidirectional reflectance spectroscopy: 3. Correction for macroscopic roughness. Icarus, 59(1):41–59, July 1984. ISSN 0019-1035. doi: 10.1016/0019-1035(84)90054-X.
Bruce Hapke. Bidirectional reflectance spectroscopy: 4. The extinction coefficient and the opposition effect. Icarus, 67(2):264–280, August 1986. ISSN 0019-1035. doi: 10.1016/0019-1035(86)90108-9.
D. M. Hudgins, S. A. Sandford, L. J. Allamandola, and A. G. G. M. Tielens. Mid- and Far-Infrared Spectroscopy of Ices: Optical Constants and Integrated Absorbances. The Astrophysical Journal Supplement Series, 86:713, June 1993. ISSN 0067-0049. doi: 10.1086/191796.
R. L. Hudson, P. A. Gerakines, and M. H. Moore. Infrared spectra and optical constants of astronomical ices: II. Ethane and ethylene. Icarus, 243:148–157, November 2014. ISSN 0019-1035. doi: 10.1016/j.icarus.2014.09.001.
B. N. Khare, Carl Sagan, E. T. Arakawa, F. Suits, T. A. Callcott, and M. W. Williams. Optical constants of organic tholins produced in a simulated Titanian atmosphere: From soft x-ray to microwave frequencies. Icarus, 60(1):127–137, October 1984. ISSN 0019-1035. doi: 10.1016/0019-1035(84)90142-8.
B. N. Khare, C. Sagan, M. Heinrich, W. R. Thompson, E. T. Arakawa, P. S. Tuminello, and M. Clark. Optical Constants of Triton Tholin: Preliminary Results. In AAS/Division for Planetary Sciences Meeting Abstracts #26, volume 26, page 30.03, June 1994.
Yang Liu, Timothy D. Glotch, Noel A. Scudder, Meredith L. Kraner, Thomas Condus, Raymond E. Arvidson, Edward A. Guinness, Michael J. Wolff, and Michael D. Smith. End-member identification and spectral mixture analysis of CRISM hyperspectral data: A case study on southwest Melas Chasma, Mars. Journal of Geophysical Research: Planets, 121(10):2004–2036, 2016. ISSN 2169-9100. doi: 10.1002/2016JE005028.
Pablo Márquez-Neila, Chloe Fisher, Raphael Sznitman, and Kevin Heng. Supervised machine learning for analysing spectra of exoplanetary atmospheres. Nature Astronomy, 2(9):719–724, September 2018. ISSN 2397-3366. doi: 10.1038/s41550-018-0504-2.
R. M. Mastrapa, M. P. Bernstein, S. A. Sandford, T. L. Roush, D. P. Cruikshank, and C. M. Dalle Ore. Optical constants of amorphous and crystalline H2O-ice in the near infrared from 1.1 to 2.6 µm. Icarus, 197(1):307–320, September 2008. ISSN 0019-1035. doi: 10.1016/j.icarus.2008.04.008.
R. M. Mastrapa, S. A. Sandford, T. L. Roush, D. P. Cruikshank, and C. M. Dalle Ore. OPTICAL CONSTANTS OF AMORPHOUS AND CRYSTALLINE H2O-ICE: 2.5–22 µm (4000–455 cm-1) OPTICAL CONSTANTS OF H2O-ICE. The Astrophysical Journal, 701(2):1347, July 2009. ISSN 0004-637X. doi: 10.1088/0004-637X/701/2/1347.
F. Merlin, M. A. Barucci, C. de Bergh, S. Fornasier, A. Doressoundiram, D. Perna, and S. Protopapa. Surface composition and physical properties of several trans-neptunian objects from the Hapke scattering theory and Shkuratov model. Icarus, 208(2):945–954, August 2010. ISSN 0019-1035. doi: 10.1016/j.icarus.2010.03.014.
George Papamakarios, Eric Nalisnick, Danilo Jimenez Rezende, Shakir Mohamed, and Balaji Lakshminarayanan. Normalizing Flows for Probabilistic Modeling and Inference. Journal of Machine Learning Research, 22(57):1–64, 2021. ISSN 1533-7928.
Noemí Pinilla-Alonso, Rosario Brunetto, Mário N. De Prá, Bryan J. Holler, Elsa Hénault, Ana Carolina de Souza Feliciano, Vania Lorenzi, Yvonne J. Pendleton, Dale P. Cruikshank, Thomas G. Müller, John A. Stansberry, Joshua P. Emery, Charles A. Schambeau, Javier Licandro, Brittany Harvison, Lucas McClure, Aurélie Guilbert-Lepoutre, Nuno Peixinho, Michele T. Bannister, and
Ian Wong. A JWST/DiSCo-TNOs portrait of the primordial Solar System through its trans-Neptunian objects. Nature Astronomy, 9(2):230–244, February 2025. ISSN 2397-3366. doi: 10.1038/s41550-024-02433-2.
PubChem. Carbon Monoxide. https://pubchem.ncbi.nlm.nih.gov/compound/281.
Joseph E. Roser, Alessandra Ricca, Richard J. Cartwright, Cristina Dalle Ore, and Dale P. Cruikshank. The Infrared Complex Refractive Index of Amorphous Ammonia Ice at 40 K (1.43–22.73 µm) and Its Relevance to Outer Solar System Bodies. The Planetary Science Journal, 2(6):240, December 2021. ISSN 2632-3338. doi: 10.3847/PSJ/ac3336.
Francois Rouleau and P. G. Martin. Shape and Clustering Effects on the Optical Properties of Amorphous Carbon. The Astrophysical Journal, 377:526, August 1991. ISSN 0004-637X. doi: 10.1086/170382.
Frédéric Schmidt and Jennifer Fernando. Realistic uncertainties on Hapke model parameters from photometric measurement. Icarus, 260:73–93, November 2015. ISSN 0019-1035. doi: 10.1016/j.icarus.2015.07.002.
B. Schmitt, E. Quirico, F. Trotta, and W. M. Grundy. Optical Properties of Ices From UV to Infrared. In B. Schmitt, C. De Bergh, and M. Festou, editors, Solar System Ices: Based on Reviews Presented at the International Symposium “Solar System Ices” Held in Toulouse, France, on March 27–30, 1995, pages 199–240. Springer Netherlands, Dordrecht, 1998. ISBN 978-94-011-5252-5. doi: 10.1007/978-94-011-5252-5_9.
Yurij Shkuratov, Larissa Starukhina, Harald Hoffmann, and Gabriele Arnold. A Model of Spectral Albedo of Particulate Surfaces: Implications for Optical Properties of the Moon. Icarus, 137(2): 235–246, February 1999. ISSN 0019-1035. doi: 10.1006/icar.1998.6035.
Malavika Vasist, François Rozet, Olivier Absil, Paul Mollière, Evert Nasedkin, and Gilles Louppe. Neural posterior estimation for exoplanetary atmospheric retrieval. Astronomy & Astrophysics, 672:A147, April 2023. ISSN 0004-6361, 1432-0746. doi: 10.1051/0004-6361/202245263.
Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is All you Need. In Advances in Neural Information Processing Systems, volume 30. Curran Associates, Inc., 2017.
A Training Corpus
The training corpus of 463,275 synthetic Shkuratov spectra is assembled from two sources.
Pre-existing bestfit collection (163,285 spectra). A library of pre-computed Shkuratov intimate-mixture and pure-component spectra spanning 17 of the 20 components, with mixtures of 1–4 components and varied grain sizes. These spectra were generated in prior work using the Shkuratov model with published laboratory optical constants; the full generation parameters and optical-constant sources for each spectrum are available in the companion repository.
Purpose-built extension (299,990 spectra). To increase the diversity and size of the corpus, we generated additional spectra using CANA [De Prá et al., 2018] and SDOC⁵, two open-source tools for computing Shkuratov reflectance from optical constants. This extension covers 14 components in mixtures of 2–7 components (50,000 spectra per mixture size from 2 to 7), with compositions sampled uniformly on the simplex and grain sizes sampled log-uniformly. It adds three components not present in the pre-existing data (CO, C₂H₄, pyroxene) and substantially increases the representation of trace-abundance (<5%) component slots.
Table 2 lists all K=20 components and the number of spectra containing each, split by source.
Table 2: Component library (K=20) and per-component spectrum counts. “Bestfit” is the pre-existing collection; “Generated” is the CANA/SDOC extension. Optical-constant references are given for the generated extension; bestfit-collection sources are documented in the companion repository.
| Component | Formula | Bestfit | Gen. | Total | OC Reference |
|---|---|---|---|---|---|
| Amorphous carbon (AC) | C | 72,991 | 107,795 | 180,786 | Rouleau and Martin [1991] |
| Titan tholin | — | 57,841 | 106,883 | 164,724 | Khare et al. [1984] |
| Olivine | (Mg,Fe)₂SiO₄ | 43,140 | 107,526 | 150,666 | Dorschner et al. [1995] |
| Triton tholin | — | 43,130 | 95,504 | 138,634 | Khare et al. [1994] |
| H₂O | H₂O | 32,928 | 103,204 | 136,132 | Mastrapa et al. [2008, 2009] |
| CH₃OH (methanol) | CH₃OH | 30,715 | 96,553 | 127,268 | Hudgins et al. [1993] |
| CO₂ | CO₂ | 19,690 | 94,336 | 114,026 | Hansen [1997] |
| CH₄ (methane) | CH₄ | 18,633 | 94,493 | 113,126 | Grundy et al. [2002] |
| Pyroxene | (Mg,Fe)SiO₃ | 0 | 105,049 | 105,049 | Dorschner et al. [1995] |
| N₂ | N₂ | 6,185 | 93,868 | 100,053 | Schmitt et al. [1998] |
| CO | CO | 0 | 94,137 | 94,137 | PubChem |
| C₂H₄ (ethylene) | C₂H₄ | 0 | 86,226 | 86,226 | Hudson et al. [2014] |
| C₂H₆ (ethane) | C₂H₆ | 252 | 82,760 | 83,012 | Hudson et al. [2014] |
| NH₃ (ammonia) | NH₃ | 30 | 81,645 | 81,675 | Roser et al. [2021] |
| PM100 | — | 33,765 | 0 | 33,765 | — |
| NaCl | NaCl | 19,117 | 0 | 19,117 | — |
| CO in N₂ | CO:N₂ | 18,455 | 0 | 18,455 | — |
| Ice Tholin II | — | 14,505 | 0 | 14,505 | — |
| Serpentine | — | 11,265 | 0 | 11,265 | — |
| HAC | C:H | 9,075 | 0 | 9,075 | — |
B Application to Real JWST Spectra
We show results of TNFlow inference on a random representative of each DiSCo-TNOs spectral group [Pinilla-Alonso et al., 2025] (Figure 2). TNFlow inference used 500 draws and the settings of section 5. The spectra cover a smaller range of wavelength than the training data, but every band of interest is present.
CO₂ is found in all solutions for 2007 UK126, where its 4.27 µm band is deep and pronounced. However, it is missed on the bowl and cliff where the band is still present. CO bands are also present in all three spectra, but it never appears in a solution. CH₃OH is clearly present in 2004 PF115, but is not found in the top mode. H₂O is assigned dominantly to all three objects, including on the double-dip and cliff, which Pinilla-Alonso et al. [2025] describe as water-poor.
However, the model gets many things consistent with the survey as well. The bowl-type object is amorphous-carbon dominated, Titan Tholin is found in the cliff-type object, and Olivine is plausible on the double-dip-type object.
⁵https://github.com/cana-asteroids/sdoc

Figure 2: The three DiSCo-TNOs exemplars, normalized at 0.9 µm. Dotted lines mark the bands discussed in the text.
Table 3: All modes recovered for the three exemplars. Components below 0.01 proportion are omitted.
| Object (group) | Mode | w | Composition |
|---|---|---|---|
| 1998 SN165(bowl) | 1 | 0.49 | AC 0.71, H₂O 0.22, NaCl 0.07 |
| 2 | 0.39 | AC 0.57, H₂O 0.23, NaCl 0.09, TTh 0.08 | |
| 3 | 0.12 | AC 0.39, H₂O 0.22, Oliv 0.16, NaCl 0.12, TTh 0.07, NH₃ 0.02 | |
| 2007 UK126(double-dip) | 1 | 0.71 | H₂O 0.39, Oliv 0.17, AC 0.14, NH₃ 0.11, CO₂ 0.10, TTh 0.09 |
| 2 | 0.20 | H₂O 0.40, Oliv 0.25, NH₃ 0.14, AC 0.11, CO₂ 0.09 | |
| 3 | 0.09 | H₂O 0.40, AC 0.21, NH₃ 0.17, CO₂ 0.12, TTh 0.04, NaCl 0.03 | |
| 2004 PF115(cliff) | 1 | 0.65 | H₂O 0.69, TTh 0.30 |
| 2 | 0.33 | H₂O 0.65, TTh 0.30, CH₃OH 0.05 | |
| 3 | 0.03 | H₂O 0.67, TTh 0.22, IT2 0.05, AC 0.04, CH₃OH 0.01 |
C Calibration by Abundance
Splitting the composition PIT of Figure 1 at 0.05 proportion shows that the miscalibration disproportionately affects components with trace abundance (Figure 3). On the test split the final PIT bin holds 1.9× the uniform expectation for components above 0.05 proportion, but 3.4× for those at or below it; on the OOD split the same figures are 1.8× and 4.7×. The systematic underprediction reported in section 6 is more concentrated in trace components. We believe this may be due to the training corpus not densely covering spectra with trace components.
D Noise Augmentation
Synthetic spectra are augmented with a fresh draw each time they are batched. For a spectrum with reflectance we draw two per-spectrum scales and per-channel standard normals , and set
The multiplicative term grows as ; the additive term is a flat floor set by the spectrum's own median reflectance. Since and are symmetric, only the magnitudes of and matter, so the effective per-spectrum scales are half-normal with scale 0.04. Augmentation is applied to synthetic rows only: the real spectra of Appendix B are passed through unmodified.
These levels were chosen ad hoc, as a rough stand-in for how noise appears in real spectra rather than a calibration against a specific instrument noise model.
E Comparison Scope
MCMC inversion of the Hapke RTM [Schmidt and Fernando, 2015] is automated and returns a posterior, so an accuracy comparison is meaningful in principle. However, two obstacles place it

Figure 3: Composition PIT split by target proportion: trace ( 0.05, top) and non-trace ( , bottom), on the test (left) and OOD (right) splits. A uniform histogram (dashed) indicates calibration.
outside this work: that method targets the Hapke RTM rather than Shkuratov, and it returns Hapke parameters and optical constants where TNFlow returns abundances over a fixed component set. Equating the two output spaces requires methodology beyond our scope. Manual fitting and linear unmixing return point estimates, which cannot be set against a multimodal posterior on the terms that matter here.
F Compute Resources
Training. All training was performed on a single NVIDIA RTX 6000 Ada Generation GPU (48 GB VRAM) on a shared workstation (64-core Xeon, 768 GB RAM, Ubuntu).
Inference. The per-object timing reported in Section 5 (~0.7 s, 500 draws + BIC-GMM) was measured on a laptop with an Intel Core i5-8257U at 1.40 GHz and 8 GB RAM, using CPU only.