In this study, a regression model that learned the correlation between molecular structure and EI-MS spectra was used to predict mass spectra. NEIMS (Figure ) was used for the regression model. The detailed architecture of NEIMS is described in a previous study . The installation is available on GitHub (). NEIMS uses ECFPs that effectively represents molecular topology information as features of molecular structures. RDKit: The open-source cheminformatics tool was used to calculate count-type ECFPs with radius=2 instead of the standard binary fingerprints. ECFPs were hashed as a fixed-length vector of length 4096 as input to ResNets. The method of predicting spectra directly from the output of ResNets in the linear layer is called forward prediction, whereas the vector obtained by inverting the forward prediction according to the molecular weight of each molecule is called reverse prediction. This is a mechanism to address the problem that ECFPs are features that capture the local structure of the molecule, making it difficult for forward prediction to accurately predict the peaks of large fragments. Bidirectional prediction was obtained by averaging forward and reverse prediction using coordinate-wise gate, affine transformed output layer of ResNets and sigmoid function, to account for the peak of the small fragment and the peak of the large fragment obtained by losing the small fragment.