We also numerically assess the FoM for array parameters in close proximity to the ones of the best sensor architecture. In particular, we vary the pitch of the array, a, and the diameter of the nanodisks, d, within ±6 nm, as these are the parameters that are prone to largest uncertainties in real sample fabrication via electron-beam nanolithography (see Methods). As shown in Fig. , the FoM variation within the studied range is relatively small (0.09-0.13, ~10% from 0.11), which guarantees us to obtain the expected sensitivity when translating the best sensor parameters into a real sample. Furthermore, it is clear that there are actually a and d combinations that result in slightly higher FoM, which could be identified if the PSO generation iteration would be expanded beyond 15 generations. However, there exists a complex relationship between small structural changes in our arrays and peak positions and linewidths in the corresponding extinction spectra. Given the relatively simple definition of our optimization parameter, FoM, extending our algorithm routine to more than ~15 generations typically led to coalescence of peaks and thus spuriously high FoMs originating from inaccurate assignment of peak positions (Supplementary Figure ). While beyond the scope of the present work, these issues can be mitigated by a more rigorous definition of the FoM, peak, and the linewidth in the resulting optical spectra, by more stringent boundaries on the structural parameters of the nanodisks, and by using a dielectric function of much smaller hydride concentration relevant to the targeted H 2 concentration range of the sensor application.