This repository contains the official implementation of RamPINN, a physics-informed neural network designed to disentangle resonant and non-resonant signals in Coherent Anti-Stokes Raman Scattering (CARS) measurements to recover pure Raman spectra.
Transferring the recent advancements in deep learning into scientific disciplines is hindered by the lack of the required large-scale datasets for training. We address the ill-posed inverse problem of recovering Raman spectra from noisy Coherent Anti-Stokes Raman Scattering (CARS) measurements using a dual-decoder architecture that enforces Kramers-Kronig causality relations via a differentiable Hilbert transform loss. For more details, visit our project website.
We compared RamPINN against several existing architectures on synthetic data In the qualitative reconstruction image above, you can see how from the input CARS (first row, blue) the Raman spectrum (second row, yellow) is recovered by these methods. RamPINN achieves the best performance for both MSE and PSNR. These results transfer even to real life samples, see the table below, where the performance is indicated via gold, silver, and bronze medals. Here, RamPINN outperforms all methods.
We recommend using Conda for managing your environment.
Please note that the code is tested with python3.10 under Ubuntu24.04, higher version will likely work.
All models are developed, trained, evaluated, and validated using PyTorch 2.10 and CUDA 12.9.4.
git clone https://github.com/rampinn/rampinn.git
cd rampinnconda create -n rampinn python=3.10
conda activate rampinnpip install -r requirements.txtnetworks.py: Implementation of the MPAA model and dual-decoder architecture.pi_losses.py: Physics-informed loss functions, including the differentiable Hilbert transform.train.py: Main script for training or processing.dataset.py: Contains the dataset logicassets/: Contains pre-trained models, synthetic data, and a test notebook.
To test the pre-trained models, you can run the provided Jupyter notebook:
jupyter notebook assets/test_models.ipynbIf you find our work useful, please cite it:
@inproceedings{vemuri2026rampinn,
author = {Sai Karthikeya Vemuri and Adithya Ashok Chalain Valapil and Tim Büchner and Joachim Denzler},
title = {RamPINN: Recovering Raman Spectra From Coherent Anti-Stokes Spectra Using Embedded Physics},
year = {2026},
doi = {10.48550/arXiv.2510.06020},
booktitle = {The 29th International Conference on Artificial Intelligence and Statistics (AISTATS)},
}This work was conducted at the Computer Vision Group, Friedrich Schiller University Jena, Germany. This study was partially supported by the European Union’s Horizon Europe research and innovation program for the project uCAIR with Grant Agreement No. 101135175.


