With X-ray free-electron lasers (XFELs), it is possible to determine the three-dimensional structure of noncrystalline nanoscale particles using X-ray single-particle imaging (SPI) techniques at room temperature. Classifying SPI scattering patterns, or "speckles", to extract single hits that are needed for real-time vetoing and three-dimensional reconstruction poses a challenge for high data rate facilities like European XFEL and LCLS-II-HE. Here, we introduce SpeckleNN, a unified embedding model for real-time speckle pattern classification with limited labeled examples that can scale linearly with dataset size. Trained with twin neural networks, SpeckleNN maps speckle patterns to a unified embedding vector space, where similarity is measured by Euclidean distance. We highlight its few-shot classification capability on new never-seen samples and its robust performance despite only tens of labels per classification category even in the presence of substantial missing detector areas. Without the need for excessive manual labeling or even a full detector image, our classification method offers a great solution for real-time high-throughput SPI experiments.
翻译:利用X射线自由电子激光器(XFELs),可在室温下通过X射线单颗粒成像(SPI)技术确定非晶态纳米颗粒的三维结构。对于欧洲XFEL和LCLS-II-HE等高数据率设施,分类SPI散射图案(即“散斑”)以提取实时否决和三维重建所需的单次命中信号,是一项严峻挑战。为此,我们提出SpeckleNN——一种面向有限标注样本、可随数据集大小线性扩展的统一嵌入模型,用于实时散斑图案分类。通过孪生神经网络训练,SpeckleNN将散斑图案映射至统一嵌入向量空间,并以欧氏距离度量相似性。我们重点展示了其在全新未见样本上的少样本分类能力,以及即便每类仅有数十个标注样本、且存在大面积探测器缺失时仍保持的稳健性能。该方法无需过度人工标注甚至完整探测器图像,为实时高通量SPI实验提供了卓越解决方案。