Manuscript Offprint

arXiv:2610.07529

Targeted search shows that random-device testing underestimates worst-case error in a simulated wave-based neural operator

Samrendra Roy, Jason Yoo, Souvik Chakraborty, Syed Bahauddin Alam

ABSTRACT

Wave-based processors promise fast, energy-efficient Fourier layers for neural operators. They are usually validated on randomly sampled devices, but using them requires knowing how large their error can become under fabrication and alignment variation. In a stylised numerical case study, a hybrid Fourier neural operator runs its four spectral layers on simulated coherent 4f processors with 32 tolerated knobs, whose half-widths are representative rather than calibrated. For 120 models (four tasks, six training methods, five seeds), we compared the worst of N random in-spec devices with a searched one. On a deterministic simulator with one frozen draw of the random static errors, the searched device's held-out error was 1.08–3.10 times the maximum over 200 Monte Carlo devices and 1.06–2.71 times that over 1000. With 20 fresh static draws, it still exceeded the maximum over 200 random devices in 116 of 120 models. Under uniform sampling, the probability of drawing such a device is at most 0.37% per model (two-sided 95% Clopper–Pearson), which says nothing about how large its error is. The gap persisted with uniform or Sobol' sampling at the search's budget, shared knobs, a second crosstalk model, box scales of 0.25–2 and a pixel-level device model. Models trained only with random static errors reached 3.7–39.9 times their nominal error on searched devices, and fine-tuning on random and gradient-searched devices gave the lowest searched error of the six in all 20 task–seed pairs. For two heat-exchanger quantities, a search targeted at each exceeded the worst of 1000 random devices in all 39 models, and hence the Wilks 95/95 limit (worst of 59). For the mean pressure of 11 models, no random device exceeded a 1% error threshold, but the searched device did. Random testing estimates how often errors exceed a threshold; worst-device search gives a lower bound on how large they can be.

Keywords wave-based computing; physical neural networks; neural operators; worst-case robustness; energy-efficient AI hardware; nuclear energy systems

1 Introduction

The energy cost of deep learning and of large-scale scientific computing has renewed interest in wave-based processors. These compute with light or sound as it propagates, and they promise high throughput at low energy per operation [1–3]. Optical versions range from coherent nanophotonic meshes and diffractive networks to free-space Fourier-optical systems and large-scale optoelectronic processors [4–8]. Physical neural networks have also been trained on mechanical and acoustic systems [9]. Neural operators learn solution maps of partial differential equations (PDEs) [10–12], and they suit this hardware well. The Fourier neural operator (FNO) is built on a spectral convo-

∗^{*}Corresponding author: alams@illinois.edu

PREPRINT

lution, and a 4f optical system computes such a convolution (input plane, lens, Fourier plane, lens and output plane, each one focal length apart). A lens Fourier-transforms the field, a mask weights the spatial frequencies and a second lens transforms back [13]. Such Fourier-plane masks have served as trained layers of optical neural networks [14, 15], and a recent optical neural engine realised this spectral convolution in free-space optics for Darcy, Navier–Stokes and Maxwell problems [16]. Diffractive and integrated photonic PDE solvers have followed [17, 18].

Energy and nuclear engineering are exploring fast surrogates of this kind, from foundation models for dynamic nuclear systems [19] and reconstruction of global radiation fields from sparse sensor sequences [20] to plant monitoring [21] and reactor control [22]. Monitoring, control, design studies and digital twins all call for fast, repeated inference. The energy cost of neural-operator inference has been measured for virtual sensing [23], and neuromorphic hardware has been explored for nuclear PDE solving [24]. Wave-based processors are a further candidate, but science and engineering will adopt them only if their error under real fabrication and alignment variation can be bounded.

Physical devices differ from their designs. Spatial light modulators (SLMs) suffer pixel crosstalk (fringing fields) [25, 26] and have a finite extinction ratio. Fourier-plane masks are registered only to within a fraction of a pixel, lenses carry residual aberrations, and fabrication adds random per-pixel errors. In integrated photonic meshes, small component errors accumulate across the circuit, and the architecture and post-fabrication correction set how much accuracy they cost [27, 28]. A common response is hardware-aware or noise-aware training, the hardware counterpart of domain randomisation [29]. The model sees randomly perturbed devices during training [9, 30–34] and is then validated on a sample of random devices or in Monte Carlo fault trials [35]. Random (Monte Carlo) testing estimates the behaviour of a typical device and, with confidence bounds, the probability that a device exceeds an error threshold [36]. Probabilistic guarantees from random samples, such as the scenario approach [37, 38], bound the fraction of failing devices. They do not bound the error of the worst one. Robust optimisation, design centring and worst-case circuit analysis [39–41] read a tolerance specification differently, as a set of admissible devices, each of which must meet the requirement.

Machine learning draws the same line. Statistical methods estimate the probability that a random input perturbation makes a network fail [42], whereas adversarial robustness asks for the worst admissible perturbation [43–45]. Gradient-free differential evolution (DE) [46] has been used to find admissible input perturbations that break neural networks [47]. It has recently been applied to neural-operator surrogates of nuclear thermal-hydraulics, where sparse perturbations raised the error from about 1.5% to 37–63% [48]. We adopt that DE-based search over an admissible set and do not claim it as new. That work perturbs the inputs of digital surrogates, whereas here the inputs are clean and the perturbation is the hardware itself: a device drawn from the tolerance box of the wave-based layers. The closest precedent is compute-in-memory accelerators, where the worst-case weight perturbation within the device-variation bounds proved far more damaging than average-case evaluation suggests [49, 50]. Certified bounds exist for weight [51] and input perturbations [52, 53]. We search a different space, the low-dimensional, physically defined tolerance box of a wave-based neural operator, and compare random testing with search within it, including at matched budgets.

We make this comparison in simulation. All hardware is simulated with a differentiable scalar Fourier-optics model, and no device was built or measured. The model gives each of the 576(24×24)576 (24 \times 24) input–output channel paths per layer its own programmable complex mask and does not specify how these paths would be multiplexed. The work is therefore a stylised numerical case study. We do not assess the tolerances of a realisable processor, and we measure neither energy nor speed. Because a targeted search is expected to find at least as high an error as random sampling, the questions are how much higher and whether the difference matters. For this simulator and tolerance box, we draw four conclusions.

(i) Search finds in-spec devices whose errors lie well above the worst found by random testing. In all 120 models on four tasks, the searched device's held-out error exceeded that of each of 1000 random devices, by up to about three times the worst of 200, with one frozen draw of the random static errors; with fresh draws the gap held in nearly all models (Section 2.2). Search only bounds the worst case from below, so random testing underestimates it by at least this factor. The gap remained for random sampling at the search's budget, on 100,000 uniform devices and in every tolerance set, crosstalk model and device model tried (Sections 2.3 and 2.5).

(ii) For models trained on random box devices, a short gradient search from a jittered box centre is a cheap, strong check, given a differentiable device model. For these box-trained Darcy, Navier–Stokes (NS) and heat-exchanger (HX) models, 30 steps of projected signed-gradient ascent (PGD) through the differentiable simulator were the strongest single method (Section 2.2). Random box corners, even at the search’s budget, came within 10% of the searched error in only 8 of 24 models (Section 2.3).

(iii) Random testing can miss threshold exceedances that search finds. For two HX quantities, a search targeted at each exceeded the largest error among 1000 random devices in all 39 HX models, and hence also the Wilks 95/95 limit of nuclear safety analysis (the largest error among 59). For the slice-mean pressure of more than a quarter of these models, no random device had an error above 1% of the mean, yet the searched device did (Section 2.7).

PREPRINT

(iv) Fine-tuning on a mixture of random and searched devices gave the lowest searched error. It was the best of the six training methods for every task and seed, even against attacks unseen in training (Section 2.6).

These results suggest qualifying wave-based hardware by pairing random testing with worst-device search (Section 3).

References (80)