arXiv:2610.28709cs.LGOct 2026

Manuscript Offprint

arXiv:2610.28709

STAR-XPC: Set Transformer for Estimating X-ray Transmission in Polymer Composites

Can Erer, H. Birkan Yilmaz, Nebahat Aral

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Evaluating the energy transmission ratio of an X-ray beam through a polymer composite is a challenging task in radiation shielding studies. The reference solution with Monte Carlo transport simulation is highly accurate but computationally expensive: each of our reference simulations is capped at 4×1094 \times 10^9 photon histories and a 20 000 s (over 5 hour) time limit, while closed-form analytical methods fail to represent such complex scenarios. We present an artificial neural network model that maps the unordered multi-set of molecular constituents, their mass fractions, and four bulk physical descriptors directly to the transmission ratio I(t)/I0I(t)/I_0 in 1-3 milliseconds. The model is a Set Transformer, which makes it permutation invariant by construction and accepts mixtures of different sizes up to 11 constituents within a fixed-size padded set. Each constituent is embedded with a chemistry-pretrained transformer language model, ChemBERTa. In our proposed method, training data are produced by an automated PENELOPE/penEasy pipeline using the radiation source at 30, 80, 100, and 120 kV tube voltages over polyethylene-based shielding composite slabs of thicknesses spanning 0.15-2.5 mm. After preprocessing, the dataset contains n=4697n = 4697 simulated configurations on which a leakage-free, jointly stratified 10-fold cross-validation is performed, attaining mean squared error MSE = (1.12±0.56)×10−4(1.12 \pm 0.56) \times 10^{-4}, normalized-MSE percentage NMSE% = 0.0294% ± 0.0147%, and R2=0.9988R^2 = 0.9988. The corresponding per-sample percentage errors give an α\alpha-trimmed ( α=0.10\alpha = 0.10) absolute percentage error (APE) of 1.66% and a median APE of 1.15%. Our model's inference is several orders of magnitude faster than the underlying Monte Carlo simulation (sub-millisecond per query vs. several hours for the reference run) with effective accuracy in predicting the I(t)/I0I(t)/I_0.

Keywords: Radiation attenuation, Polymer composites, Set Transformer, Monte Carlo, PENELOPE software, ChemBERTa

arXiv:2610.0709v1

1. Introduction

Calculating how a solid reduces the intensity of an X-ray beam is one of the most crucial tasks for those who work in diagnostic imaging, image guided radiotherapy, industrial radiography and the engineering of radiation shields in medical or nuclear fields. In practical applications, material designers rarely work with a single material, indeed they mostly work with composites, and polymer-matrix composites loaded with high-Z fillers such as Bi2O3Bi_{2}O_{3}, WO3WO_{3}, or BaSO4BaSO_{4} are an active area of radiation-shielding research in their own right [1, 2, 3, 4].

There are three characteristics that actually make this task complex and non-trivial. First, the composites consist of different constituents, which we call being heterogeneous: a thin slab contains molecules with interaction cross sections that differ by orders of magnitude across the kilovoltage range. Secondly, the source emits many wavelengths at once, which we call being polychromatic: when we choose an energy level between 30-120 kV the distribution belonging to that energy level varies a lot. Lastly, there are various choices for possible designs, which we call being combinatorial: a mix of materials may consist of arbitrary materials and may have arbitrary thickness levels. Due to the vast design space, engineers must test thousands of candidates in an optimization loop. Hence, engineers need accurate and reliable methods to know how much energy passes through the given material based on its physical properties such as its shape and constituents.

For heterogeneous mixtures and polychromatic energy spectrum, there is no closed-form analytical solution. Mass attenuation mixture rules evaluated with tabulated data, such as NIST's X-ray mass attenuation tables (SRD 126, a.k.a. XAAMDI) [5] or cross-section tools such as XCOM [6] and its derivatives WinXCom [7] and Phy-X/PSD [8], are fast but inherit two restrictive assumptions: narrow-beam geometry and a monoenergetic source. In broad-beam geometry, scattered photons reaching the detector must be accounted for with empirical buildup factors [9], which are tabulated for specific materials and energies and are not readily available for arbitrary multi-component composites. XAAMDI tabulates mass attenuation coefficients by mass-weighting constituent elements at a single photon energy, which works only if the material is treated as one uniform blend. Moreover, it gives one coefficient per energy, not a spectrum response, so using it for a 30-120 kV polychromatic beam means manually querying and integrating many energy points, with no account for how the spectrum hardens as it penetrates the material.

PENELOPE/penEasy [10, 11] uses Monte Carlo methods in order to simulate the interaction utilizing the physical laws.

∗^{*}Corresponding author

Email addresses: salih.erer@std.bogazici.edu.tr (Can Erer), birkan.yilmaz@bogazici.edu.tr (H. Birkan Yilmaz), nebahataral@gmail.com (Nebahat Aral)

The estimations of those codes are accurate, they are used as a reference to illustrate how radiation attenuates throughout the given material with respect to its physical properties. The data they have and the algorithms used are extensively tested and concluded to be reliable. However, their cost is prohibitive for use in an optimization loop. Each reference run is configured with a nominal cap of 4×1094 \times 10^9 photon histories, a 2 % relative-uncertainty target, and a 20 000 s time limit. In practice, the time limit is the binding constraint for most configurations, so the number of histories actually completed, and the resulting precision, vary by configuration rather than uniformly reaching the nominal targets. The statistical error decays only as σ∝M−1/2\sigma \propto M^{-1/2} in the number of histories. The main problem is obtaining a reliable estimation result requires a lot of computational power, hence it is not possible to use these codes to simulate all combinations in our design space.

In short, current limitations mainly stem from the computational cost of running Monte Carlo simulations and the fact that we do not have an analytical solution for direct calculation. The capabilities of classical machine learning (ML) methods can be considered as secondary limitation.

The attenuation of a homogeneous mixture does not depend on the order of its constituents, so the target is a permutation-invariant function of the constituent set. Multi-layer perceptrons over concatenated slots and sequence-based models impose an artificial ordering and must learn this invariance from data, spending parameters and samples on repeating the same mapping for every ordering. Tree-based regressors share this problem once the constituents are flattened into fixed columns, and they treat each embedding dimension as an independent feature, which suits dense embeddings poorly. A canonical ordering, e.g. by mass fraction, restores invariance but is arbitrary and changes abruptly when two fractions cross. We therefore build the invariance into the architecture.

This paper proposes a permutation-invariant set transformer for estimating X-ray transmission in polymer composites, namely STAR-XPC. Our proposed method treats a composite as an unordered set of tokens enriched with a vector of bulk physical descriptors, and predicts the energy transmission ratio. The contributions of this work are:

  1. An automated PENELOPE/penEasy dataset-generation pipeline 1^{1}.

  2. A chemistry-aware embedding pipeline that summarizes each constituent with the attention-mask-weighted mean of the last four hidden layers of ChemBERTa [12] (a 768-dimensional vector), followed by ℓ2\ell_{2} normalization. Aggregating the upper layers captures both syntactic and semantic features of the simplified molecular input line entry system (SMILES) string used in cheminformatics.

  3. A permutation-invariant Set Transformer model based on Induced Set Attention Blocks (ISAB) and Pooling by Multihead Attention (PMA), which predicts the energy transmission ratio in 1-3 milliseconds. The STAR-XPC model and inference codes are available at HuggingFace 2^{2}.

References (36)