TVCondNet: A Conditional Denoising Neural Network
for NMR Spectroscopy
Abstract
Nuclear Magnetic Resonance (NMR) spectroscopy is a widely-used technique in the fields of bio-medicine, chemistry, and biology for the analysis of chemicals and proteins. The signals from NMR spectroscopy often have low signal-to-noise ratio (SNR) due to acquisition noise, which poses significant challenges for subsequent analysis. Recent work has explored the potential of deep learning (DL) for NMR denoising, showing significant performance gains over traditional methods such as total variation (TV) denoising. This paper shows that the performance of DL denoising for NMR can be further improved by combining data-driven training with traditional TV denoising. The proposed TVCondNet method outperforms both traditional TV and DL methods by including the TV solution as a condition during DL training. Our validation on experimentally collected NMR data shows the superior denoising performance and faster inference speed of TVCondNet compared to existing methods.
1 Introduction
Nuclear magnetic resonance (NMR) spectroscopy is a widely-used technique for structural determination of molecules, and dynamics and interaction identification of macro-molecules [1, 2, 3]. The time domain signal of NMR, known as free induction decay (FID), has relatively high noise and thus limited NMR spectral quality [4]. A common strategy to reduce the noise and enhance the SNR involves averaging multiple acquisitions. Though effective in enhancing SNR, averaging significantly extends the measurement time, thus limiting the application of NMR spectroscopy in real-time analysis [5, 6].
Total variation (TV) denoising [7] is a well-known technique frequently used across multiple fields [8, 9]. TV has been shown to reduce noise while preserving peaks and edges in NMR spectra [10]. Choosing the right regularization parameter is crucial in TV to maintain a balance between noise reduction and signal fidelity [11]. Wavelet thresholding (WT) [12] is another widely-used denoising method used for NMR spectroscopy which is based on wavelet decomposition of the signal. The transformed signal is thresholded to reduce noise while retaining signal characteristics, requiring careful wavelet function and threshold level selection to avoid distorting the signal [13, 14].
FID signal is often modeled as a combination of multiple decaying exponential signals plus noise [4, 15]. This modeling approach allows the FID to be restructured into a Hankel matrix, facilitating denoising through spectral analysis methods such as SVD and various matrix factorization techniques [16, 17, 18]. When an NMR signal has fewer spectral peaks than the length of the FID signal, the corresponding Hankel matrix is often considered to be low-rank. This insight has spurred the development of several denoising methods, including Cadzow signal enhancement [19, 20, 21], randomized QR decomposition (rQRd) [22], and Convex Hankel low-Rank matrix approximation (CHORD) [17]. Denoising methods such as CHORD, rQRd, and Cadzow that necessitate the decomposition of the Hankel matrix to extract singular values, are particularly time-consuming [22, 23, 24]. Additionally, the quality of denoising in methods such as Cadzow and rQRd heavily relies on the estimated rank of Hankel matrix [18]. Thus, these methods required careful estimation of spectral peaks to derive the rank of Hankel matrix.
![Refer to caption](extracted/5603639/figures/schematic1.png)
The computational cost of SVD constrains the use of Hankel matrix decomposition in denoising large-scale NMR spectroscopy [4]. Hence, partial and randomized decomposition is proposed to accelerate computations by reducing the Hankel matrix size [19, 22].
The success of DL has led to the application of deep neural networks (DNNs) in spectral analysis and denoising, demonstrating superior performance over traditional NMR denoising methods. DNNs are also less computationally intensive during inference phase compared to matrix decomposition methods [25, 26, 27, 28, 29]. However, DNNs can result in over-smoothing of low-intensity peaks, potentially reducing peak fidelity in the denoised signals [30].
We show that the performance of DL denoising for NMR can be further improved by combining it with TV denoising. Our proposed Total Variation Conditional Denoising Neural Network (TVCondNet) is a DNN trained by conditioning on the TV solution. The initial guess provided by TV provides an implicit regularizer for the DNN. On the other hand, data-driven training enables the refinement of the TV solution by accounting for the non-Gaussian spectral noise. Results on experimentally collected NMR spectroscopy data show that our method outperforms both traditional TV and DL solutions, by offering state-of-the-art performance and efficiency.
2 Proposed Method
In this section, we outline the notations and the training procedure for our proposed model, TVCondNet.
2.1 Problem Formulation
In NMR spectroscopy denoising, the goal is to recover a clean spectrum from noisy NMR spectrum , characterized by the following system
(1) |
where represent the clean FID signal, is complex normal noise, denotes normalization, and is the Fourier transform. When the clean FID of the NMR signal is accessible, clean NMR spectrum can be obtained by using the formula . Denoising NMR spectra can be formulated as a regularized restoration problem and solved via regularized optimization
(2) |
where is a data-fidelity term enforcing the consistency with the measurements, is a regularizer imposing desired characteristic on the solution, and adjust regularization strength. TV is a widely-used regularization function that encourages smoothness while preserving critical features like sharp peaks in the denoised spectrum [7]. The -based TV regularizer, defined as
(3) |
has been shown to reduce noise while preserving significant spectral details, making it suitable for spectra denoising [31].
![Refer to caption](extracted/5603639/figures/vis1.png)
![Refer to caption](extracted/5603639/figures/nmrfig2.png)
Method | 3 dB | 5 dB | 10 dB | 15 dB | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
SNR | RMSE | SNR | RMSE | SNR | RMSE | SNR | RMSE | |||||
TV | ||||||||||||
WT | ||||||||||||
DnCNN | ||||||||||||
U-Net | ||||||||||||
TVCondNet |
2.2 Training procedure
This section outlines the training procedure of TVCondNet, specifically designed for denoising NMR spectroscopy. As depicted in Figure 1, TVCondNet comprises two principal components: (1) the creation of a specialized loss function, and (2) the preparation of the conditional input for the network.
Noisy spectra are generated from the clean spectra by applying the noise model described in eq. (1), wherein Gaussian noise is added to the clean dataset of FIDs. The variance of the added noise in (1) is adjusted to set the input SNR of the FID to dB, respectively. We represent the training dataset as denoting pairs of noisy and clean training spectra . The conditional input of the neural network are derived by solving eq. (2), incorporating the TV regularizer described in eq. (3), and are denoted as . The input to the denoising network is obtained by concatenating noisy spectra with the condition .
For TVCondNet, we adopt the residual learning formulation to train a residual map** by minimizing the following loss function
(4) |
where represents the trainable parameters of TVCondNet and denotes concatenation of and . The denoised spectra are obtained by
(5) |
This approach enables the network to effectively learn the noise component, which is subtracted from the noisy input to yield the denoised spectra.
3 Experimental Evaluation
3.1 Setup
We obtained NMR spectra using a MHz Agilent system equipped with a OneNMR probe and DD2 spectrometer, operating on vnmrj software by Agilent. Over the course of several years, a total of one-dimensional and spectra were collected across a diverse range of samples, where , , and were reserved for training, validation, and testing, respectively. While slight variations in pulse sequence parameters were observed between experiments, a consistent approach was maintained, and the and pulses were optimized prior to each experiment.
The FID signal in NMR spectroscopy is corrupted with Additive White Gaussian noise (AWGN) at various noise levels, corresponding to input SNR of dB. These noisy FID signals are utilized to create four distinct datasets for training purposes. Noisy NMR spectra are generated by applying a Fourier transform to the corrupted FID signals. The resulting spectra are then normalized to ensure they have a zero mean and a standard deviation of one. The network is fed with inputs that are the concatenation of the noisy spectra and TV denoising solutions. The TV regularization parameter is fine-tuned to achieve the optimal output SNR for each training input. Consequently, the training dataset consists of pairs of noisy spectra and their corresponding TV denoising solutions, together with the clean spectra. The test dataset is obtained by corrupting the FID signal of NMR spectroscopy with noise from the spectrometer with noise levels corresponding to input SNR of dB. NMR noisy spectra were derived via Fourier transform and normalization, similar to training datasets. Three NMR spectra served as the validation set to fine-tune the TV denoising’s regularization parameter. During testing, TVCondNet inputs were created by concatenation of the noisy spectrum with TV denoising outputs.
We chose 1D U-Net [32] as a deep learning architecture to train TVCondNet. In the training phase, we used Adam optimizer [33] with a learning rate for epochs. To address varying noise conditions, four distinct networks were trained, one for each noise level (input SNR of {3, 5, 10, 15} dB). The effectiveness of NMR denoising was assessed using two key metrics: Signal-to-Noise Ratio (SNR) and Root-Mean-Square Error (RMSE), ensuring a comprehensive evaluation of denoising performance
3.2 Results
TVCondNet was benchmarked against two conventional denoising techniques—TV denoising [7] and Wavelet Thresholding [12]—alongside two deep learning models, DnCNN [34] and U-Net [32], and a specialized low-rank based method for NMR spectroscopy known as CHORD [17]. Given CHORD’s reliance on matrix factorization, it’s impractical for the large spectra of points. For comparative analysis, FIDs in the test set were reduced to 2048 points to accommodate CHORD. Table 1 provides a performance comparison for full-length spectra, while Table 2 focuses on the cropped spectra, reporting the performance for CHORD as well. This adjustment allows us to directly compare TVCondNet’s computational efficiency and performance against CHORD, highlighting TVCondNet’s advantages in terms of inference time and denoising performance.
Table 1 shows the results of denoising methods on the test dataset. Table highlights TVCondNet’s exceptional performance across various noise levels and evaluation metrics, surpassing other benchmark methods. Particularly noteworthy is TVCondNet’s superior denoising performance at higher noise levels.
Figure 2 shows the visual results of NMR spectra denoising (top) and the error of denoising (bottom) for TVCondNet and other benchmarks for input SNR of dB. The superior performance of TVCondNet is illustrated using the zoomed-in portion of the spectra. The error visualization beneath each spectrum further emphasizes TVCondNet’s potential to restore peak intensities.
Table 2 presents the comparative denoising performance and inference times of TVCondNet against benchmarks for cropped FID of size . The denoising performance (left) and inference time (right) are reported for three noise levels corresponding to input SNR of . The results show that TVCondNet outperforms traditional spectral denoising methods and CHORD. Notably, CHORD’s significant computational time disadvantage is highlighted, underscoring TVCondNet’s superior efficiency and performance. Figure 3 shows the visual results for denoising an NMR spectrum using CHORD and TVCondNet.
4 Conclusion
This work presents TVCondNet, a conditional deep learning-based denoiser for NMR spectroscopy, where TV denoising solutions are used to condition the training process of neural networks. TVCondNet shows competitive denoising performance against benchmarks, particularly excelling in recovering spectral peaks and removing noise from experimentally collected NMR spectroscopy data. Its computational efficiency is notably superior to specialized matrix factorization methods designed for NMR denoising such as CHORD.
References
- [1] Kohsuke Inomata, Ayako Ohno, Hidehito Tochio, Shin Isogai, Takeshi Tenno, Ikuhiko Nakase, Toshihide Takeuchi, Shiroh Futaki, Yutaka Ito, Hidekazu Hiroaki, et al., “High-resolution multi-dimensional NMR spectroscopy of proteins in human cells,” Nature, vol. 458, no. 7234, pp. 106–109, 2009.
- [2] Oleg Jardetzky and Gordon Carl Kenmure Roberts, NMR in molecular biology, Academic Press, 2013.
- [3] Mark C Preul, Zografos Caramanos, D Louis Collins, Jean-Guy Villemure, Richard Leblanc, Andre Olivier, Ronald Pokrupa, and Douglas L Arnold, “Accurate, noninvasive diagnosis of human brain tumors by using proton magnetic resonance spectroscopy,” Nature medicine, vol. 2, no. 3, pp. 323–325, 1996.
- [4] Tianyu Qiu, Zi Wang, Huiting Liu, Di Guo, and Xiaobo Qu, “Review and prospect: NMR spectroscopy denoising and reconstruction with low-rank Hankel matrices and tensors,” Magnetic Resonance in Chemistry, vol. 59, no. 3, pp. 324–345, 2021.
- [5] Matthew J Smith, Christopher B Marshall, Francois-Xavier Theillet, Andres Binolfi, Philipp Selenko, and Mitsuhiko Ikura, “Real-time NMR monitoring of biological activities in complex physiological environments,” Current opinion in structural biology, vol. 32, pp. 39–47, 2015.
- [6] Ronald Soong, Edward Nagato, Andre Sutrisno, Blythe Fortier-McGill, Mohammad Akhter, Sebastian Schmidt, Hermann Heumann, and André J Simpson, “In vivo NMR spectroscopy: toward real time monitoring of environmental stress,” Magnetic Resonance in Chemistry, vol. 53, no. 9, pp. 774–779, 2015.
- [7] Leonid I Rudin, Stanley Osher, and Emad Fatemi, “Nonlinear total variation based noise removal algorithms,” Physica D: nonlinear phenomena, vol. 60, no. 1-4, pp. 259–268, 1992.
- [8] Michael Lustig, David Donoho, and John M Pauly, “Sparse MRI: The application of compressed sensing for rapid MR imaging,” Magnetic Resonance in Medicine: An Official Journal of the International Society for Magnetic Resonance in Medicine, vol. 58, no. 6, pp. 1182–1195, 2007.
- [9] Ulugbek S Kamilov, Ioannis N Papadopoulos, Morteza H Shoreh, Alexandre Goy, Cedric Vonesch, Michael Unser, and Demetri Psaltis, “Optical tomographic image reconstruction based on beam propagation and sparse regularization,” IEEE Transactions on Computational Imaging, vol. 2, no. 1, pp. 59–70, 2016.
- [10] Shantanu H Joshi, Antonio Marquina, Stephanie Njau, Katherine L Narr, and Roger P Woods, “Denoising of MR spectroscopy signals using total variation and iterative Gauss-Seidel gradient updates,” in 2015 IEEE 12th International Symposium on Biomedical Imaging (ISBI). IEEE, 2015, pp. 576–579.
- [11] Curtis R Vogel and Mary E Oman, “Iterative methods for total variation denoising,” SIAM Journal on Scientific Computing, vol. 17, no. 1, pp. 227–238, 1996.
- [12] David L Donoho, “De-noising by soft-thresholding,” IEEE transactions on information theory, vol. 41, no. 3, pp. 613–627, 1995.
- [13] Adam R Altenhof, Harris Mason, and Robert W Schurko, “DESPERATE: A python library for processing and denoising NMR spectra,” Journal of Magnetic Resonance, vol. 346, pp. 107320, 2023.
- [14] Damien Barache, Jean-Pierre Antoine, and Jean-Marie Dereppe, “The continuous wavelet transform, an analysis tool for NMR spectroscopy,” Journal of Magnetic Resonance, vol. 128, no. 1, pp. 1–11, 1997.
- [15] Xiaobo Qu, Maxim Mayzel, Jian-Feng Cai, Zhong Chen, and Vladislav Orekhov, “Accelerated NMR spectroscopy with low-rank reconstruction,” Angewandte Chemie International Edition, vol. 54, no. 3, pp. 852–854, 2015.
- [16] Hien M Nguyen, Xi Peng, Minh N Do, and Zhi-Pei Liang, “Denoising MR spectroscopic imaging data with low-rank approximations,” IEEE Transactions on Biomedical Engineering, vol. 60, no. 1, pp. 78–89, 2012.
- [17] Tianyu Qiu, Wen**g Liao, Yihui Huang, **yu Wu, Di Guo, Dongbao Liu, Xin Wang, Jian-Feng Cai, Bingwen Hu, and Xiaobo Qu, “An automatic denoising method for NMR spectroscopy based on low-rank hankel model,” IEEE Transactions on Instrumentation and Measurement, vol. 70, pp. 1–12, 2021.
- [18] Di Guo, Runmin Xu, **yu Wu, Mei** Lin, Xiaofeng Du, and Xiaobo Qu, “NMR spectra denoising with vandermonde constraints,” arXiv preprint arXiv:2310.13882, 2023.
- [19] Jonathan Gillard, “Cadzow’s basic algorithm, alternating projections and singular spectrum analysis,” Statistics and its Interface, vol. 3, no. 3, pp. 335–343, 2010.
- [20] Laurent Condat, “A direct algorithm for 1-D total variation denoising,” IEEE Signal Processesing Letters, vol. 20, no. 11, pp. 1054–1057, November 2013.
- [21] James A Cadzow, “Signal enhancement-a composite property map** algorithm,” IEEE Transactions on Acoustics, Speech, and Signal Processing, vol. 36, no. 1, pp. 49–62, 1988.
- [22] Lionel Chiron, Maria A van Agthoven, Bruno Kieffer, Christian Rolando, and Marc-André Delsuc, “Efficient denoising algorithms for large experimental datasets and their applications in fourier transform ion cyclotron resonance mass spectrometry,” Proceedings of the National Academy of Sciences, vol. 111, no. 4, pp. 1385–1390, 2014.
- [23] Jiaxi Ying, Hengfa Lu, Qingtao Wei, Jian-Feng Cai, Di Guo, Jihui Wu, Zhong Chen, and Xiaobo Qu, “Hankel matrix nuclear norm regularized tensor completion for -dimensional exponential signals,” IEEE Transactions on Signal Processing, vol. 65, no. 14, pp. 3702–3717, 2017.
- [24] Di Guo, Hengfa Lu, and Xiaobo Qu, “A fast low rank hankel matrix factorization reconstruction method for non-uniformly sampled magnetic resonance spectroscopy,” IEEE Access, vol. 5, pp. 16033–16039, 2017.
- [25] Dicheng Chen, Zi Wang, Di Guo, Vladislav Orekhov, and Xiaobo Qu, “Review and prospect: deep learning in nuclear magnetic resonance spectroscopy,” Chemistry–A European Journal, vol. 26, no. 46, pp. 10391–10401, 2020.
- [26] Yao Liu, Jun Cai, Zhimin Jiang, Pu Zhang, and **g**g Cheng, “A novel denoising method for low SNR NMR logging echo signal based on deep learning,” Measurement Science and Technology, vol. 34, no. 1, pp. 015905, 2022.
- [27] Xiaobo Qu, Yihui Huang, Hengfa Lu, Tianyu Qiu, Di Guo, Tatiana Agback, Vladislav Orekhov, and Zhong Chen, “Accelerated nuclear magnetic resonance spectroscopy with deep learning,” Angewandte Chemie, vol. 132, no. 26, pp. 10383–10386, 2020.
- [28] Ke Wu, Jie Luo, Qing Zeng, Xi Dong, **yong Chen, Chaoqun Zhan, Zhong Chen, and Yanqin Lin, “Improvement in signal-to-noise ratio of liquid-state NMR spectroscopy via a deep neural network DN-Unet,” Analytical Chemistry, vol. 93, no. 3, pp. 1377–1382, 2020.
- [29] Natalie Klein, Amber J Day, Harris Mason, Michael W Malone, and Sinead A Williamson, “Denoising neural networks for magnetic resonance spectroscopy,” arXiv preprint arXiv:2211.00080, 2022.
- [30] Sinead Barton, Salaheddin Alakkari, Kevin O’Dwyer, Tomas Ward, and Bryan Hennelly, “Convolution network with custom loss function for the denoising of low SNR Raman spectra,” Sensors, vol. 21, no. 14, pp. 4623, 2021.
- [31] Chien-Sheng Liao, Joon Hee Choi, Delong Zhang, Stanley H Chan, and Ji-Xin Cheng, “Denoising stimulated Raman spectroscopic images by total variation minimization,” The Journal of Physical Chemistry C, vol. 119, no. 33, pp. 19397–19403, 2015.
- [32] Olaf Ronneberger, Philipp Fischer, and Thomas Brox, “U-net: Convolutional networks for biomedical image segmentation,” in Medical image computing and computer-assisted intervention–MICCAI 2015: 18th international conference, Munich, Germany, October 5-9, 2015, proceedings, part III 18. Springer, 2015, pp. 234–241.
- [33] Diederik P Kingma and Jimmy Ba, “Adam: A method for stochastic optimization,” in International Conference on Learning Representations., 2015.
- [34] Kai Zhang, Wangmeng Zuo, Yun** Chen, Deyu Meng, and Lei Zhang, “Beyond a gaussian denoiser: Residual learning of deep CNN for image denoising,” IEEE transactions on image processing, vol. 26, no. 7, pp. 3142–3155, 2017.