Skip to content

Repository files navigation

RamPINN: Recovering Raman Spectra From Coherent Anti-Stokes Spectra Using Embedded Physics

RamPINN Logo

Website arXiv

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.

Abstract

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.

RamPINN Logo

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.

RamPINN Logo

Installation

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.

1. Clone the repository

git clone https://github.com/rampinn/rampinn.git
cd rampinn

2. Create and activate the environment

conda create -n rampinn python=3.10
conda activate rampinn

3. Install dependencies

pip install -r requirements.txt

Project Structure

  • networks.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 logic
  • assets/: Contains pre-trained models, synthetic data, and a test notebook.

Usage

To test the pre-trained models, you can run the provided Jupyter notebook:

jupyter notebook assets/test_models.ipynb

Citation

If 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)},
}

Acknowledgements

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.

About

This is the Code and Data repository the RamPINN AISTATS 2026 publication. It shows a physics-informed CARS to Raman recovery strategy without needin the NRB.

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Contributors

Languages