arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2610.18924physics.chem-phcs.LG
收藏

TorchSpin:PyTorch中可微分电子顺磁共振模拟

TorchSpin: Differentiable Electron Paramagnetic Resonance Simulation in PyTorch

University of California, Davis(加州大学戴维斯分校);Linac Coherent Light Source, SLAC National Accelerator Laboratory(斯坦福直线加速器实验室相干光源)

Alec H. Follmer

AI总结:

TorchSpin是PyTorch框架,可将EasySpin的EPR计算迁移至张量环境,支持自动微分,能提升CNN光谱训练质量,实现高效EPR参数估计与迁移学习。

摘要:

解释电子顺磁共振(EPR)光谱通常需要对自旋哈密顿参数进行反复的前向模拟和优化。现有成熟软件提供了完善的模拟与拟合方法,但这类计算通常无法作为可微分组件集成到机器学习工作流中。我们提出TorchSpin,这是一个开源PyTorch框架,它将EasySpin的结构和数值规范迁移到基于张量的计算环境中。涵盖连续波EPR、电子核双共振(ENDOR)、脉冲EPR、自旋动力学、轨迹模拟和磁强计的代表性计算,均与对应的EasySpin结果高度吻合。在匹配的基准测试中,TorchSpin的CPU执行在9项 workload 中有6项比EasySpin更快,尽管性能高度依赖具体计算类型。因此,我们重点关注PyTorch自动微分所带来的能力:在一个Cu(II)粉末光谱演示中,通过TorchSpin传播的反馈提升了监督卷积神经网络(CNN)的质量,且在优化过程中无需使用参数标签。仅使用含噪光谱和TorchSpin重构损失,从随机初始化的CNN训练得到的模型,其中位数相似度≥0.99;在TorchSpin生成的库上训练的CNN,无需适配即可迁移到独立生成的EasySpin光谱,性能与在EasySpin上训练的对照模型相当。训练完成后,该CNN生成单光谱初始参数估计约需1毫秒,GPU加速下处理512个批次仅约1.3毫秒。因此,TorchSpin既提供了成熟EPR计算的经过验证的Python实现,也为快速学习推理、光谱优化和无参数标签训练提供了可微分物理层。

英文摘要:

Interpreting electron paramagnetic resonance (EPR) spectra commonly requires repeated forward simulation and optimization of spin Hamiltonian parameters. Established software provides mature simulation and fitting methods, but these calculations are not generally available as differentiable components within machine-learning workflows. We present TorchSpin, an open-source PyTorch framework that ports the organization and numerical conventions of EasySpin into a tensor-based computational environment. Representative calculations spanning continuous-wave EPR, ENDOR, pulse EPR, spin dynamics, trajectory simulation, and magnetometry closely reproduced corresponding EasySpin results. In matched benchmarks, TorchSpin CPU execution was faster than EasySpin for six of nine workloads although performance depended strongly on the calculation. We therefore focused on the capabilities enabled by automatic differentiation in PyTorch. In a Cu(II) powder-spectrum demonstration, feedback propagated through TorchSpin improved the quality of a supervised convolutional neural network (CNN) without using parameter labels during refinement. Models trained from randomly initialized CNNs using only noisy spectra and TorchSpin reconstruction loss achieved median similarities of $\geq$ 0.99. CNNs trained on TorchSpin-generated libraries also transferred without adaptation to independently generated EasySpin spectra with performance comparable to EasySpin-trained controls. Once trained, the CNN produced initial parameter estimates in approximately 1 ms per spectrum while a batch of 512 was processed in approximately 1.3 ms with GPU acceleration. TorchSpin therefore provides both a tested Python implementation of established EPR calculations and a differentiable physical layer for rapid learned inference, spectral refinement, and parameter-label-free training.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑