Physics-informed Learning for Gravitational-wave Discovery

Sage logo

An end-to-end PyTorch pipeline for compact binary coalescence detection — from raw gravitational-wave strain to a bespoke neural network, with systematic bias mitigations built in.

Collaborate with us!

We welcome collaborations — reach out if you want a production-level GW search built for your data! Visit the Collaboration page to get in touch.

Note

New to gravitational waves, machine learning, or detection pipelines? Head over to the Learning Guide — a comprehensive introduction being built for anyone starting from scratch, whether you are a high-school student curious about LIGO, an ML engineer encountering GW data for the first time, or a physicist who has never trained a neural network. Everything you need to understand Sage, from first principles upwards, will be there.

Warning

These docs are actively being built and are subject to change. Individual sections may contain incomplete explanations, bugs, or mistakes. Additional plots and figures will be added throughout to make each section easier to follow.


Install

Install Sage via pip. GPU and torch.compile support included out of the box.

Installation
User Guide

Hands-on walkthroughs: data download, waveforms, signal processing, and training.

Overview
API Reference

Auto-generated docs for every public module, class, and function in Sage.

sage
Colab Tutorials

Zero-install notebooks — run the full pipeline in your browser.

Quick Start
Configuration

Full reference for every field in RunCFG, DataCFG, and gwconfig.yaml.

Configuration Reference
Learning Guide

New to gravitational waves, machine learning, or Sage? Start here.

Learning Guide
Benchmarks

Performance results against PyCBC and previous ML pipelines on MLGWSC-1.

Benchmarks — MLGWSC-1 Results
Collaborate

Want a production-level GW search built for your data? Get in touch.

Collaboration

State-of-the-art performance on MLGWSC-1

At a false alarm rate of one per month, Sage detects +11.2% more signals than the PyCBC matched-filter benchmark and +48.3% more signals than the previous best ML pipeline — with demonstrated robustness to out-of-distribution noise PSDs and non-Gaussian glitches.


Sage is a complete, end-to-end machine-learning pipeline for searching gravitational-wave (GW) detector data for compact binary coalescence (CBC) signals. The package spans the entire research workflow: automated download and preparation of GWOSC data releases and PSDs; realistic noise simulation (real strain, coloured, recoloured, and glitch-injected); waveform generation and multi-detector projection via IMRPhenomD and IMRPhenomPv2; signal processing including whitening, inverse spectrum truncation, time-domain multirate sampling, frequency-domain multibanding, and prior-median heterodyning; neural network training; and diagnostic evaluation and benchmarking against previous results.

All data-generation, signal-processing, and neural-network components are written in PyTorch and are fully torch.compile-compatible, enabling significant GPU throughput improvements without any code changes. Training operates entirely on-the-fly — no pre-computed datasets are required — with waveforms and noise windows generated per batch to eliminate data-reuse biases.

Sage systematically identifies and mitigates 11 interconnected supervised-learning biases that degrade detection performance and generalisation. On the Machine Learning Gravitational-Wave Search Challenge injection study, Sage detects approximately 11.2% more signals than the benchmark PyCBC matched-filter analysis and approximately 48.3% more signals than the previous best-performing ML pipeline at a false alarm rate of one per month, while demonstrating robustness to out-of-distribution noise PSDs and non-Gaussian transient artefacts.

The modular design — with interchangeable frontends, backends, attention mechanisms, and configurable presets — makes Sage straightforward to adapt for new architectures, parameter spaces, or observing runs. Google Colab tutorials allow zero-installation experimentation.

The methods are described in:

Identifying and Mitigating Machine Learning Biases for the Gravitational-Wave Detection Problem — Nagarajan & Messenger, Phys. Rev. D 112, 103002 (2025). [paper] [arXiv]