Towards Transparent AI in Gravitational Wave Data Analysis: Methods, Limitations, and New Directions

He Wang (王赫)

hewang@ucas.ac.cn

International Centre for Theoretical Physics Asia-Pacific (ICTP-AP), UCAS

Taiji Laboratory for Gravitational Wave Universe (Beijing/Hangzhou), UCAS

Bias:参考Sage

  •  

可解释性:feature extraction, Interpolation

  • Detection:MFCNN、田军
    • Ideal approach for searches
  • (Inference:DINGO-BNS)
    • Interpolation: 
      • YXWang
      • CVAE, ...

LLM:

  •  

Contents

01

Detection

  • Gravitational wave astronomy
  • GW searches for beyond GR
  • AI for science

02

Inference

  • Parameter inference
  • SBI method

03

AHD

  • Parameter inference
  • SBI method
He Wang | ICTP-AP, UCAS
Deep Learning Applications in Gravitational Wave Data Analysis
He Wang | ICTP-AP, UCAS
Towards Transparent AI in Gravitational Wave Data Analysis

The Rise of Machine Learning

AI is taking over the world... literally everywhere

Gravitational waves (GW) are a strong field effect in General Relativity, ripples in the fabric of spacetime caused by accelerating massive objects.

Gravitational Wave Astronomy

Challenge and Methodology: Detecting Signals in GW Data

GW Data Characteristics

LIGO-VIRGO-KAGRA

LISA Project

  • Noise: non-Gaussian and non-stationary

  • Signal challenges:

    • (Earth-based) A low signal-to-noise ratio (SNR) which is typically about 1/100 of the noise amplitude (-60 dB).

    • (Space-based) A superposition of all GW signals (e.g.: 104 of GBs, 10~102 of SMBHs, and 10~103 of EMRIs, etc.) received during the mission's observational run.

Matched Filtering Techniques (匹配滤波方法)

  • In Gaussian and stationary noise environments, the optimal linear algorithm for extracting weak signals

  • Works by correlating a known signal model \(h(t)\) (template) with the data.
  • Starting with data: \(d(t) = h(t) + n(t)\).
  • Defining the matched-filtering SNR \(\rho(t)\):
    \(\rho^2(t)\equiv\frac{1}{\langle h|h \rangle}|\langle d|h \rangle(t)|^2 \) , where
    \(\langle d|h \rangle (t) = 4\int^\infty_0\frac{\tilde{d}(f)\tilde{h}^*(f)}{S_n(f)}e^{2\pi ift}df \) ,
    \(\langle h|h \rangle = 4\int^\infty_0\frac{\tilde{h}(f)\tilde{h}^*(f)}{S_n(f)}df \),
    \(S_n(f)\) is noise power spectral density (one-sided).

Statistical Approaches

Frequentist Testing:

  • Make assumptions about signal and noise
  • Write down the likelihood function
  • Maximize parameters
  • Define detection statistic
    → recover MF

Bayesian Testing:

  • Start from same likelihood
  • Define parameter priors
  • Marginalize over parameters
  • Often treated as Frequentist statistic
    → recover MF (for certain priors)
He Wang | ICTP-AP, UCAS
Towards Transparent AI in Gravitational Wave Data Analysis

Why should you consider applying ML to gravitational wave astrophysics?

He Wang | ICTP-AP, UCAS
Towards Transparent AI in Gravitational Wave Data Analysis
He Wang | ICTP-AP, UCAS
Towards Transparent AI in Gravitational Wave Data Analysis

The "Real" Reasons We Apply ML to GW Astrophysics

Let's be honest about our motivations... 😉

The perfectly valid "scientific" reasons:

  1. It sounded like a cool project
  2. My supervisor said it was a good thing to work on
  3. I will learn some really useful ML skills
  4. I'm already good at ML
  5. I want to get better at ML
  6. I want to get a high-paying job after this PhD/postdoc
  7. I want to be spared when the machines take over

Credit: Chris Messenger (MLA meeting,, Jan 2025)

He Wang | ICTP-AP, UCAS
Towards Transparent AI in Gravitational Wave Data Analysis

Why is AI/ML Everywhere in GW Research?

The core motivations behind nearly all AI+GW research

1

ML is FAST

So much data, so little time!

• Bayesian parameter estimation
• Replaces computationally intensive components

2

ML is ACCURATE*

Consistently outperforms traditional approaches

• Unmodelled burst searches
• Continuous GW searches

3

ML is FLEXIBLE

Provides deeper insights into complex problems

• Reveals patterns through interpretability
• Enables previously impractical approaches

* When properly trained and validated on appropriate datasets

Credit: Chris Messenger (MLA meeting,, Jan 2025)

He Wang | ICTP-AP, UCAS
Towards Transparent AI in Gravitational Wave Data Analysis

Why is AI/ML Everywhere in GW Research?

The core motivations behind nearly all AI+GW research

1

ML is FAST

So much data, so little time!

• Bayesian parameter estimation
• Replaces computationally intensive components

2

ML is ACCURATE*

Consistently outperforms traditional approaches

• Unmodelled burst searches
• Continuous GW searches

3

ML is FLEXIBLE

Provides deeper insights into complex problems

• Reveals patterns through interpretability
• Enables previously impractical approaches

* When properly trained and validated on appropriate datasets

Credit: Chris Messenger (MLA meeting,, Jan 2025)

He Wang | ICTP-AP, UCAS
Towards Transparent AI in Gravitational Wave Data Analysis

Why is AI/ML Everywhere in GW Research?

The core motivations behind nearly all AI+GW research

1

ML is FAST

So much data, so little time!

• Bayesian parameter estimation
• Replaces computationally intensive components

2

ML is ACCURATE*

Consistently outperforms traditional approaches

• Unmodelled burst searches
• Continuous GW searches

3

ML is FLEXIBLE

Provides deeper insights into complex problems

• Reveals patterns through interpretability
• Enables previously impractical approaches

* When properly trained and validated on appropriate datasets

Credit: Chris Messenger (MLA meeting,, Jan 2025)

Key question: If an ML (or any) analysis doesn't do 1 or more of these things, then from a scientific perspective,
what is the point?

He Wang | ICTP-AP, UCAS
Towards Transparent AI in Gravitational Wave Data Analysis

Is It Really So Simple?

The reality of ML in scientific research is more nuanced

No: We need to think more critically

  • Are we just trying to predict a function?
  • Are there any astrophysical constraints?
  • Do we need to understand how/why it works?
  • What about errors? Quality flags?
  • What happens if things go wrong?
He Wang | ICTP-AP, UCAS
Towards Transparent AI in Gravitational Wave Data Analysis

Is It Really So Simple?

The reality of ML in scientific research is more nuanced

No: We need to think more critically

  • Are we just trying to predict a function?
  • Are there any astrophysical constraints?
  • Do we need to understand how/why it works?
  • What about errors? Quality flags?
  • What happens if things go wrong?

Twitter: @DeepLearningAI_

He Wang | ICTP-AP, UCAS
Towards Transparent AI in Gravitational Wave Data Analysis

Why Even Use AI?

The mathematical inevitability and the path to understanding

Universal Approximation Theorem

The existence theorem that guarantees solutions

  • Neural networks with sufficient hidden layers can approximate any continuous function on compact subsets of \(\mathbb{R}^n\)
  • Ref: Cybenko, G. (1989), Hornik et al. (1989)

The solution is mathematically guaranteed — our challenge is finding the path to it

1

Machine learning will win in the long run

AI models still have vast potential compared to the human brain's efficiency. Beating traditional methods is mathematically inevitable given sufficient resources.

2

The question is not if AI/ML will win, but how

Understanding AI's inner workings is the real challenge, not proving its capabilities.

That's where we can learn something exciting with Foundation Models.

He Wang | ICTP-AP, UCAS
Towards Transparent AI in Gravitational Wave Data Analysis

How do we understand AI's inner workings in GW data analysis?

Uncovering the "black box" to reveal
how AI actually processes GW strain data

Core Insight from Computer Vision

  • Direct approach from Computer Vision (CV) to GW signal processing: pixel point \(\Rightarrow\) sampling point.
  • The CNN framework treats time series data similar to images, where each sampling point represents a feature to learn.

Performance Analysis

  • Convolutional neural networks (CNN) can achieve comparable performance to Matched Filtering under Gaussian stationary noise.
  • CNNs significantly outperform traditional methods in terms of execution speed (with GPU support).
  • Modern architectures show improved robustness against non-Gaussian noise transients (glitches).

Pioneering Research Publications

PRL, 2018, 120(14): 141103.

PRD, 2018, 97(4): 044039.

He Wang | ICTP-AP, UCAS
Towards Transparent AI in Gravitational Wave Data Analysis

CNN for GW Detection: Pioneering Approaches

Matched-filtering Convolutional Neural Network (MFCNN)

HW, SC Wu, ZJ CAO, et al. PRD 101, 10 (2020): 104003

He Wang | ICTP-AP, UCAS

CNN for GW Detection: Feature Extraction

Convolutional Neural Network (ConvNet or CNN)

feature extraction

classifier

>> Is it matched-filtering ?
>> Wait, It can be matched-filtering!
  • Matched-filtering (cross-correlation with templates) can be interpreted as a convolutional layer with predefined kernels.

GW150914

GW150914

Towards Transparent AI in Gravitational Wave Data Analysis

Universal Approximation Theorem: Existence Theorem

  • Neural networks with sufficient hidden layers can approximate any continuous function on compact subsets of \(\mathbb{R}^n\).
  • For GW detection, this means CNNs can theoretically learn the optimal detection statistics without explicit physical modeling.
  • The expressive power of deep neural networks enables capturing complex patterns in non-Gaussian, non-stationary noise.
  • Ref: Cybenko, G. (1989), Hornik et al. (1989)

Beyond Speed: Generalization and Explainability

  • Improving AI explainability reveals deep connections between CNN architectures and matched filtering techniques.
  • Matched-filtering (cross-correlation with templates) can be interpreted as a convolutional layer with predefined kernels.
  • In practice, we use matched filters as an essential component of feature extraction in CNNs for GW detection.

Convolutional Neural Network (ConvNet or CNN)

Matched-filtering Convolutional Neural Network (MFCNN)

He Wang, et al. PRD 101, 10 (2020): 104003

He Wang | ICTP-AP, UCAS

CNN for GW Detection: Feature Extraction

GW150914

GW150914

Towards Transparent AI in Gravitational Wave Data Analysis
He Wang | ICTP-AP, UCAS

CNN for GW Detection: Feature Extraction

  • Transform matched-filtering method from frequency domain to time domain.

  • The square of matched-filtering SNR for a given data \(d(t) = n(t)+h(t)\):

\langle h|h \rangle \sim [\bar{h}(t) \ast \bar{h}(-t)]|_{t=0}
\langle d|h \rangle (t) \sim \,\bar{d}(t)\ast\bar{h}(-t)

\(S_n(|f|)\) is the one-sided average PSD of \(d(t)\)

where

\bar{S_n}(t)=\int^{+\infty}_{-\infty}S_n^{-1/2}(f)e^{2\pi ift}df
\left\{\begin{matrix} \bar{d}(t) = d(t) * \bar{S}_n(t) \\ \bar{h}(t) = h(t) * \bar{S}_n(t) \end{matrix}\right.

Deep Learning Framework

  • In the 1-D convolution (\(*\)) on Apache MXNet, given input data with shape [batch size, channel, length] :
output[n, i, :] = \sum^{channel}_{j=0} input[n,j,:] \ast weight[i,j,:]

FYI: \(N_\ast = \lfloor(N-K+2P)/S\rfloor+1\)

(A schematic illustration for a unit of convolution layer)

\rho^2(t)\equiv\frac{1}{\langle h|h \rangle}|\langle d|h \rangle(t)|^2

Time Domain

(matched-filtering)

(normalizing)

(whitening)

\langle h|h \rangle = 4\int^\infty_0\frac{\tilde{h}(f)\tilde{h}^*(f)}{S_n(f)}df
\langle d|h \rangle (t) = 4\int^\infty_0\frac{\tilde{d}(f)\tilde{h}^*(f)}{S_n(f)}e^{2\pi ift}df

Frequency Domain

\int\tilde{x}_1(f) \cdot \tilde{x}_2(f) e^{2\pi ift}df= x_1(t)*x_2(t)
\int\tilde{x}_1(f) \cdot \tilde{x}^*_2(f) e^{2\pi ift}df= x_1(t)\star x_2(t)
x_1(t)*x_2^*(-t) = x_1(t)\star x_2(t)
Towards Transparent AI in Gravitational Wave Data Analysis
He Wang | ICTP-AP, UCAS
  • Transform matched-filtering method from frequency domain to time domain.

  • The square of matched-filtering SNR for a given data \(d(t) = n(t)+h(t)\):

\langle h|h \rangle \sim [\bar{h}(t) \ast \bar{h}(-t)]|_{t=0}
\langle d|h \rangle (t) \sim \,\bar{d}(t)\ast\bar{h}(-t)

\(S_n(|f|)\) is the one-sided average PSD of \(d(t)\)

where

\bar{S_n}(t)=\int^{+\infty}_{-\infty}S_n^{-1/2}(f)e^{2\pi ift}df
\left\{\begin{matrix} \bar{d}(t) = d(t) * \bar{S}_n(t) \\ \bar{h}(t) = h(t) * \bar{S}_n(t) \end{matrix}\right.

Deep Learning Framework

\rho^2(t)\equiv\frac{1}{\langle h|h \rangle}|\langle d|h \rangle(t)|^2

Time Domain

(matched-filtering)

(normalizing)

(whitening)

\langle h|h \rangle = 4\int^\infty_0\frac{\tilde{h}(f)\tilde{h}^*(f)}{S_n(f)}df
\langle d|h \rangle (t) = 4\int^\infty_0\frac{\tilde{d}(f)\tilde{h}^*(f)}{S_n(f)}e^{2\pi ift}df

Frequency Domain

\int\tilde{x}_1(f) \cdot \tilde{x}_2(f) e^{2\pi ift}df= x_1(t)*x_2(t)
\int\tilde{x}_1(f) \cdot \tilde{x}^*_2(f) e^{2\pi ift}df= x_1(t)\star x_2(t)
x_1(t)*x_2^*(-t) = x_1(t)\star x_2(t)

CNN for GW Detection: Feature Extraction

Towards Transparent AI in Gravitational Wave Data Analysis
He Wang | ICTP-AP, UCAS
import mxnet as mx
from mxnet import nd, gluon
from loguru import logger

def MFCNN(fs, T, C, ctx, template_block, margin, learning_rate=0.003):
    logger.success('Loading MFCNN network!')
    net = gluon.nn.Sequential()         
    with net.name_scope():
        net.add(MatchedFilteringLayer(mod=fs*T, fs=fs,
                                      template_H1=template_block[:,:1],
                                      template_L1=template_block[:,-1:]))
        net.add(CutHybridLayer(margin = margin))
        net.add(Conv2D(channels=16, kernel_size=(1, 3), activation='relu'))
        net.add(MaxPool2D(pool_size=(1, 4), strides=2))
        net.add(Conv2D(channels=32, kernel_size=(1, 3), activation='relu'))    
        net.add(MaxPool2D(pool_size=(1, 4), strides=2))
        net.add(Flatten())
        net.add(Dense(32))
        net.add(Activation('relu'))
        net.add(Dense(2))
	# Initialize parameters of all layers
    net.initialize(mx.init.Xavier(magnitude=2.24), ctx=ctx, force_reinit=True)
    return net
1 sec duration
35 templates used

Explainable AI Approach

  • Implements matched filtering operations through custom convolutional layers
  • Makes the network more interpretable by embedding domain knowledge
  • Connects traditional signal processing with deep learning
  • Outperforms standard CNNs in both accuracy and efficiency

Matched-filtering Convolutional Neural Network (MFCNN)

CNN for GW Detection: Feature Extraction

HW, SC Wu, ZJ CAO, et al. PRD 101, 10 (2020): 104003

Towards Transparent AI in Gravitational Wave Data Analysis
He Wang | ICTP-AP, UCAS

CNN for GW Detection: Feature Extraction

Visualization for the high-dimensional feature maps of learned network in layers for bi-class using t-SNE.

feature extraction

Convolutional Neural Network (ConvNet or CNN)

classifier

Is there GW or non-GW in it?

GW + noise / noise

Towards Transparent AI in Gravitational Wave Data Analysis
He Wang | ICTP-AP, UCAS

CNN for GW Detection: Feature Extraction

signal

noise

signal + noise

glitch_H1 + noise

Jun Tian, HW, et al. In Preparation (2025)

Is there GW or non-GW in it?

feature extraction

Convolutional Neural Network (ConvNet or CNN)

classifier

Towards Transparent AI in Gravitational Wave Data Analysis
He Wang | ICTP-AP, UCAS

CNN for GW Detection: Feature Extraction

signal

noise

signal + noise

glitch_H1 + noise

Jun Tian, HW, et al. In Preparation (2025)

Is there GW or non-GW in it?

feature extraction

Convolutional Neural Network (ConvNet or CNN)

classifier

Towards Transparent AI in Gravitational Wave Data Analysis

Key insight: At test time, one can easily construct statistics to differentiate between signal, noise, and glitches

He Wang | ICTP-AP, UCAS

CNN for GW Detection: Feature Extraction

Jun Tian, HW, et al. 2505.20357

Proformance: Is there GW or non-GW in the data?

Towards Transparent AI in Gravitational Wave Data Analysis

GW / noise + Glitch

GW / noise / Glitch

GW / noise

GW / noise / Glitch

GW / noise

Random

Forest

  • Gravitational wave signal search algorithm benchmark (MLGWSC-1)
  • Dataset-4: Sampled from O3a real gravitational wave observation data

First Benchmark for GW Detection Algorithms

Benchmark Results

Publications

Key Findings

  • On simulated noise data, machine learning algorithms are highly competitive compared to LIGO's most sensitive signal search pipelines
  • Most tested machine learning algorithms are overly sensitive to non-Gaussian real noise backgrounds, resulting in high false alarm rates
  • Traditional signal search algorithms can identify gravitational wave signals at low false alarm rates with assured confidence
  • Tested machine learning algorithms have very limited ability to identify long-duration signals

Note on Benchmark Limitations:

Outperforming PyCBC doesn't conclusively prove that matched filtering is inferior to AI methods. This is both because the dataset represents a specific distribution and because PyCBC settings could be further optimized for this particular benchmark.

He Wang | ICTP-AP, UCAS

arXiv:2501.13846 [gr-qc]

Phys. Rev. D 110, 024024 (2024)

Phys. Rev. D 107, 023021 (2023)

Towards Transparent AI in Gravitational Wave Data Analysis
He Wang | ICTP-AP, UCAS

Interpretability Challenges: Comparing Detection Statistics

  • Challenges in Model Interpretability:
    • The black-box nature of AI models complicates interpretability, challenging the comparison of AI-generated detection statistics with traditional matched filtering chi-square distributions.
    • Convincing the scientific community of the pipeline's validity and the statistical significance of new discoveries remains difficult despite the model's ability to identify potential gravitational wave signals.

AI Model Denoising

Our Model's Detection Statistics

LVK Official Detection Statistics

Signal denoising visualization using our deep learning model (Transformer-based)

Detection statistics from our AI model showing O1 events

HW et al 2024 MLST 5 015046

GW151226

GW151012

Official detection statistics from LVK collaboration

LVK. PRD (2016). arXiv:1602.03839

Towards Transparent AI in Gravitational Wave Data Analysis
He Wang | ICTP-AP, UCAS

arXiv:2407.07820 [gr-qc]

Recent AI Discoveries & Validation Hurdles:

  • A recent study (arXiv:2407.07820) demonstrates how a ResNet-based (CNN) architecture with careful signal search strategy and post-processing can identify 8 new potential gravitational wave events from LIGO O3 data.
  • The absence of these events in traditional PyCBC results raises questions: could adjustments to rate priors and p_astro parameters in signal models help traditional pipelines detect these candidates (if they are real GW events)?
  • The ideal approach combines multiple diverse pipelines working in parallel to ensure comprehensive detection (requiring interpretable models) and using evidence-based detection statistics while simultaneously optimizing both real signal population (p_astro) and noise model (likelihood) fits.

Search

PE

Rate

Key Insight: 

Towards Transparent AI in Gravitational Wave Data Analysis

Interpretability Challenges: Discoveries vs. Validation (part 1/2)

He Wang | ICTP-AP, UCAS

Interpretability Challenges: Discoveries vs. Validation (part 1/2)

Recent AI Discoveries & Validation Hurdles:

  • A recent study (arXiv:2407.07820) demonstrates how a ResNet-based (CNN) architecture with careful signal search strategy and post-processing can identify 8 new potential gravitational wave events from LIGO O3 data.
  • The absence of these events in traditional PyCBC results raises questions: could adjustments to rate priors and p_astro parameters in signal models help traditional pipelines detect these candidates (if they are real GW events)?
  • The ideal approach combines multiple diverse pipelines working in parallel to ensure comprehensive detection (requiring interpretable models) and using evidence-based detection statistics while simultaneously optimizing both real signal population (p_astro) and noise model (likelihood) fits.

Search

PE

Rate

Key Insight: 

Towards Transparent AI in Gravitational Wave Data Analysis

Credit: DCC-XXXXXXXX

Representation Space Interpolation

Core Insights: Generative models' ability to perform accurate statistical inference can be understood as manifold learning rather than mere density estimation:

  • Models learn a continuous latent manifold of data distributions
  • Statistical parameters act as coordinates in this space
  • Inference occurs through latent space navigation
  • Enables robust generalization for complex distributions
He Wang | ICTP-AP, UCAS
Towards Transparent AI in Gravitational Wave Data Analysis

Theoretical Understanding of Generative Models

Generative models don't memorize examples, but learn a continuous manifold
where similar concepts lie near each other. Statistical inference becomes
a form of navigation through this learned representation space.

Deep Learning is Not As Impressive As you Think, It's Mere Interpolation.

CVAE

Encodes data into latent space, enabling conditional generation

Flow-based

Transforms simple distributions into complex ones via invertible mappings

AI for Science

The core driving force of AI4Sci largely lies in its “interpolation” generalization capabilities, showcasing its powerful complex modeling abilities.

From 李宏毅

The core driving force of AI4Sci largely lies in its “interpolation” generalization capabilities, showcasing its powerful complex modeling abilities.

AI for Science

He Wang | ICTP-AP, UCAS

Parameter Estimation Challenges with AI Models:

  • In parameter estimation, AI models' lack of interpretability requires substantial additional scientific validation to ensure credibility and acceptance of results.
  • Parameter distributions from AI models often lack robustness across different noise realizations and are difficult to calibrate against established methods.
  • Scientific papers using AI methods must dedicate significant space to validation procedures, comparing against traditional methods and demonstrating reliability across multiple test cases.

arXiv:2404.14286

Phys. Rev. D 109, 123547 (2024)

Interpretability Challenges: Discoveries vs. Validation (part 2/2)

Towards Transparent AI in Gravitational Wave Data Analysis
He Wang | ICTP-AP, UCAS
Towards Transparent AI in Gravitational Wave Data Analysis

Why Do We Trust Traditional Models?

Key Trust Factors:

  • Interpretable: Parameters have physical meaning
  • Built-in uncertainties: Input uncertainties propagate to outputs
  • Model selection: Balance simplicity with accuracy
  • Scientific insight: Reduces complexity, reveals principles

Traditional Physics Approach

Input

Human-Designed Algorithm

(Based on human insight)

Output

Example: Matched Filtering,
Linear Regression

Black-Box AI Approach

Input

AI Model

(Low interpretability)

Output

Examples: CNN, AlphaGo, DINGO

Key Challenge: How can we maintain the interpretability advantages of traditional models while leveraging the power of AI approaches?

Data/
Experience

Data/
Experience

He Wang | ICTP-AP, UCAS
Towards Transparent AI in Gravitational Wave Data Analysis

Bridging Trust & Performance in GW Analysis

Combining the interpretability of physics with the power of AI

Our Mission: To create transparent AI systems that combine physics-based interpretability with deep learning capabilities

Interpretable AI Approach

The best of both worlds

Input

Physics-Informed
AI Algorithm

(High interpretability)

Output

Example: Our Approach
(In Preparation)

AI Model

Physics
Knowledge

Traditional Physics Approach

Input

Human-Designed Algorithm

(Based on human insight)

Output

Example: Matched Filtering, linear regression

Black-Box AI Approach

Input

AI Model

(Low interpretability)

Output

Examples: CNN, AlphaGo, DINGO

Data/
Experience

Data/
Experience

MLGWSC1 Benchmark: Optimization Performance Results

Preliminary Results (February 2025)

Optimization Progress & Algorithm Diversity

Optimization Target: Maximizing Area Under Curve (AUC) in the 10-100Hz frequency range, balancing detection sensitivity and false alarm rates across algorithm generations

He Wang | ICTP-AP, UCAS

Optimization Target: Maximizing Area Under Curve (AUC) in the 10-100Hz frequency range, balancing detection sensitivity and false alarm rates across algorithm generations

Towards Transparent AI in Gravitational Wave Data Analysis

The framework (LLMs) can effectively optimize complex algorithms and guide iterative development along specified optimization directions, achieving targeted performance improvements in GW detection 

Pipeline Workflow

  1. Conditions raw detector data (whitening)
  2. Computes time-frequency metrics
  3. Identifies peaks above background
  4. Returns event candidates with timestamps

This pipeline combines adaptive PSD whitening and multi-band spectral coherence computation with a noise floor-aware peak detection and a non-linear timing uncertainty model to enhance gravitational wave signal detection accuracy and robustness. It computes coherent time-frequency metric (with frequency-dependent regularization and entropy-based symmetry enforcement) and validates candidate signals via geometric features and multi-resolution thresholding (including dyadic wavelet analysis).

Integrate asymmetric PSD whitening, extended STFT overlap optimization, chirp-enhanced prominence scaling, multi-channel noise floor refinement, and dynamic timing calibration for improved gravitational wave signal detection.

The pipeline first applies adaptive local parameter control and noise-adaptive statistical regularization\u2014dynamically tuning median filter kernels, whitening gains, and spectral smoothness\u2014to detrend and whiten the dual-channel gravitational wave data, prioritizing robust noise baseline estimation over high-frequency variations. Then, it computes a coherent time-frequency metric (with frequency-dependent regularization and entropy-based symmetry enforcement) and validates candidate signals via geometric features and multi-resolution thresholding (including dyadic wavelet analysis), ultimately outputting candidate trigger GPS times, significance levels, and timing uncertainties.

MLGWSC1 Benchmark: Optimization Performance Results

Preliminary Results (February 2025)

Optimization Progress & Algorithm Diversity

Sensitivity vs False Alarm Rate

Optimization Target: Maximizing Area Under Curve (AUC) in the 10-100Hz frequency range, balancing detection sensitivity and false alarm rates across algorithm generations

He Wang | ICTP-AP, UCAS

Optimization Target: Maximizing Area Under Curve (AUC) in the 10-100Hz frequency range, balancing detection sensitivity and false alarm rates across algorithm generations

Towards Transparent AI in Gravitational Wave Data Analysis

The framework (agent-based LLMs) can effectively optimize complex algorithms and guide iterative development along specified optimization directions, achieving targeted performance improvements in GW detection

Pipeline Workflow

  1. Conditions raw detector data (whitening)
  2. Computes time-frequency metrics
  3. Identifies peaks above background
  4. Returns event candidates with timestamps

Summary: AI for Gravitational Wave Science

The Critical Role of Interpretability

Algorithm interpretability provides multiple essential benefits:

  • Scientific Understanding: Reveals unique characteristics of different model architectures and their decision processes
  • Algorithm Interpolation: Enables meaningful combination of different approaches by understanding their complementary strengths
  • Result Controllability: Provides confidence in outcomes and minimizes unexplained behaviors
  • Model Calibration: Allows fine-tuning of algorithms based on physical understanding rather than black-box optimization

The future of gravitational wave science lies at the intersection of traditional physics-inspired methods and interpretable AI approaches, creating a new paradigm for reliable scientific discovery.

He Wang | ICTP-AP, UCAS
Towards Transparent AI in Gravitational Wave Data Analysis

Beyond Quick Wins: The Essence of AI in Gravitational Wave Science

Understanding the fundamental principles rather than seeking shortcuts

The true value of AI in gravitational wave science emerges not from quick implementation, but from patient cultivation of deep understanding. This journey requires time, thoughtfulness, and respect for fundamental principles.

He Wang | ICTP-AP, UCAS
Towards Transparent AI in Gravitational Wave Data Analysis

The Path to Deeper Understanding

True algorithmic mastery requires patience and depth:

  • Scientific Insight: Not just predictions, but understanding why different architectures excel at capturing specific physical phenomena
  • Meaningful Integration: Building bridges between AI and physics requires understanding their fundamental connections, not just surface similarities
  • Principled Control: Beyond black-box usage—knowing exactly when to trust results and when to question them
  • Physics-Informed Design: Algorithms should reflect our understanding of gravitational wave physics, not replace or obscure it
He Wang | ICTP-AP, UCAS
Towards Transparent AI in Gravitational Wave Data Analysis

Beyond Quick Wins: The Essence of AI in Gravitational Wave Science

Understanding the fundamental principles rather than seeking shortcuts

The true value of AI in gravitational wave science emerges not from quick implementation, but from patient cultivation of deep understanding. This journey requires time, thoughtfulness, and respect for fundamental principles.

The Path to Deeper Understanding

True algorithmic mastery requires patience and depth:

  • Scientific Insight: Not just predictions, but understanding why different architectures excel at capturing specific physical phenomena
  • Meaningful Integration: Building bridges between AI and physics requires understanding their fundamental connections, not just surface similarities
  • Principled Control: Beyond black-box usage—knowing exactly when to trust results and when to question them
  • Physics-Informed Design: Algorithms should reflect our understanding of gravitational wave physics, not replace or obscure it
for _ in range(num_of_audiences):
    print('Thank you for your attention! 🙏')

hewang@ucas.ac.cn

The Next Frontier:
LLMs for Gravitational Wave Data Analysis

He Wang | ICTP-AP, UCAS
Deep Learning Applications in Gravitational Wave Data Analysis

Given the interpretability challenges we've explored,
how might we advance GW detection and parameter estimation while maintaining scientific rigor?

The Next Frontier:
LLMs for Gravitational Wave Data Analysis

Given the interpretability challenges we've explored, how might we advance GW detection and parameter estimation while maintaining scientific rigor?

Automatic and Evolutionary Algorithm Heuristics for GW Detection using LLMs

A promising new approach combining the power of large language models with evolutionary algorithms to create interpretable, adaptive detection systems

He Wang | ICTP-AP, UCAS
Deep Learning Applications in Gravitational Wave Data Analysis

The Rise of LLMs: How Code Training Transformed AI Capabilities

Evolution of GPT Capabilities

A careful examination of GPT-3.5's capabilities reveals the origins of its emergent abilities:

  • Original GPT-3 gained generative abilities, world knowledge, and in-context learning through pretraining
  • Instruction-tuned models developed the ability to follow directions and generalize to unseen tasks
  • Code-trained models (code-davinci-002) acquired code comprehension
  • The ability to perform complex reasoning likely emerged as a byproduct of code training

GPT-3.5 series [Source: University of Edinburgh, Allen Institute for AI]

He Wang | ICTP-AP, UCAS
Deep Learning Applications in Gravitational Wave Data Analysis

GPT-3 (2020)

ChatGPT (2022)

Magic: Code + Text

Recent research demonstrates that LLMs can solve complex optimization problems through carefully engineered prompts. DeepMind's OPRO (Optimization by PROmpting) approach showcases how LLMs can generate increasingly refined solutions through iterative prompting techniques.

OPRO: Optimization by PROmpting

Example: Least squares optimization through prompt engineering

arXiv:2309.03409 [cs.NE]

Two Directions of LLM-based Optimization

arXiv:2405.10098 [cs.NE]

He Wang | ICTP-AP, UCAS
Deep Learning Applications in Gravitational Wave Data Analysis

The Optimization Potential of Large Language Models

Deep Learning Applications in Gravitational Wave Data Analysis

LLMs can generate high-quality solutions to optimization problems without specialized training

Theoretical Understanding of LLMs' Emergent Abilities

The Interpolation Theory

LLMs' ability to generate novel responses from few examples is increasingly understood as manifold interpolation rather than mere memorization:

  • LLMs learn a continuous semantic manifold of language during pre-training
  • Few-shot examples serve as anchor points in this high-dimensional space
  • The model interpolates between examples to generate responses for novel inputs
  • This enables coherent generalization beyond the training distribution
  • The quality of interpolation improves with model scale and training data breadth

The theory suggests that in-context learning is not "learning" in the traditional sense, but rather a form of implicit conditioning on the manifold of learned representations.

Representation Space Interpolation

He Wang | ICTP-AP, UCAS
Deep Learning Applications in Gravitational Wave Data Analysis

Theoretical Understanding of LLMs' Emergent Abilities

The Interpolation Theory

LLMs' ability to generate novel responses from few examples is increasingly understood as manifold interpolation rather than mere memorization:

  • LLMs learn a continuous semantic manifold of language during pre-training
  • Few-shot examples serve as anchor points in this high-dimensional space
  • The model interpolates between examples to generate responses for novel inputs
  • This enables coherent generalization beyond the training distribution
  • The quality of interpolation improves with model scale and training data breadth

The theory suggests that in-context learning is not "learning" in the traditional sense, but rather a form of implicit conditioning on the manifold of learned representations.

Representation Space Interpolation

Key Literature

  • Wei et al. (2022) - "Emergent Abilities of Large Language Models" arXiv:2206.07682
  • Akyürek et al. (2022) - "What learning algorithm is in-context learning?" arXiv:2211.15661
  • Min et al. (2022) - "Rethinking the Role of Demonstrations" arXiv:2202.12837
  • Xie et al. (2022) - "An Explanation of In-context Learning as Implicit Bayesian Inference" arXiv:2111.02080
He Wang | ICTP-AP, UCAS
Deep Learning Applications in Gravitational Wave Data Analysis

Theoretical Understanding of LLMs' Emergent Abilities

The Interpolation Theory

LLMs' ability to generate novel responses from few examples is increasingly understood as manifold interpolation rather than mere memorization:

  • LLMs learn a continuous semantic manifold of language during pre-training
  • Few-shot examples serve as anchor points in this high-dimensional space
  • The model interpolates between examples to generate responses for novel inputs
  • This enables coherent generalization beyond the training distribution
  • The quality of interpolation improves with model scale and training data breadth

The theory suggests that in-context learning is not "learning" in the traditional sense, but rather a form of implicit conditioning on the manifold of learned representations.

Representation Space Interpolation

Key Literature

  • Wei et al. (2022) - "Emergent Abilities of Large Language Models" arXiv:2206.07682
  • Akyürek et al. (2022) - "What learning algorithm is in-context learning?" arXiv:2211.15661
  • Min et al. (2022) - "Rethinking the Role of Demonstrations" arXiv:2202.12837
  • Xie et al. (2022) - "An Explanation of In-context Learning as Implicit Bayesian Inference" arXiv:2111.02080
He Wang | ICTP-AP, UCAS
Deep Learning Applications in Gravitational Wave Data Analysis

Theoretical Understanding of LLMs' Emergent Abilities

The Interpolation Theory

LLMs' ability to generate novel responses from few examples is increasingly understood as manifold interpolation rather than mere memorization:

  • LLMs learn a continuous semantic manifold of language during pre-training
  • Few-shot examples serve as anchor points in this high-dimensional space
  • The model interpolates between examples to generate responses for novel inputs
  • This enables coherent generalization beyond the training distribution
  • The quality of interpolation improves with model scale and training data breadth

The theory suggests that in-context learning is not "learning" in the traditional sense, but rather a form of implicit conditioning on the manifold of learned representations.

Representation Space Interpolation

Manifold Interpolation Diagram

Key Literature on Manifold Interpolation

  • Raventos et al. (2023) - "In-Context Learning Dynamics with Manifold Identification" arXiv:2305.12104
  • Garg et al. (2022) - "What Can Transformers Learn In-Context? A Case Study of Simple Function Classes" arXiv:2208.01066
  • Dai et al. (2022) - "Why Can GPT Learn In-Context?" arXiv:2212.10559
  • Xie et al. (2022) - "An Explanation of In-context Learning as Implicit Bayesian Inference" arXiv:2111.02080
He Wang | ICTP-AP, UCAS
Deep Learning Applications in Gravitational Wave Data Analysis

https://www.lesswrong.com/posts/GADJFwHzNZKg2Ndti/have-llms-generated-novel-insights

https://gowrishankar.info/blog/deep-learning-is-not-as-impressive-as-you-think-its-mere-interpolation/

REWIRING AGI—NEUROSCIENCE IS ALL YOU NEED

What is test-time scaling?

Why LLMs can do the inference/optimation?
How about the theory? (check: 2410.14716)

Why we need MCTS?
Why and How is Evoluation theory in Opt area?

Add computational complexity analysis

借用流浪地球的台词?

借用流浪地球的台词?

Drawbacks and limitations:hard control for opt direction(when to balance between exploration and exploitation);sensitive to prompt template / LLM version; hard to define the search space for the unknown solution when problem is complicated;

好好先review一下:eccentricity using DINGO; AreaGW

自己实验的OPRO效果

好好先review一下:eccentricity using DINGO; AreaGW

逐层递进深刻的reflection

自己实验的符号回归

Algorithmic Synergy: MCTS, Evolution & LLM Agents

Monte Carlo Tree Search (MCTS)

  • Efficiently explores high-dimensional spaces
  • Balances exploration and exploitation
  • Provides strong theoretical guarantees
  • Excels in complex sequential decision-making

Evolutionary Algorithms

  • Enables gradient-free global optimization
  • Naturally handles multi-objective problems
  • Provides diverse solution candidates
  • Robust to noisy objective functions

LLM Agents

  • Processes and generates domain-specific text
  • Understands and generates code
  • Reasons through complex problem spaces
  • Adapts strategies based on context
He Wang | ICTP-AP, UCAS
Deep Learning Applications in Gravitational Wave Data Analysis

Together, these approaches create a powerful framework for heuristic optimization of gravitational wave signal search algorithms

Algorithmic Synergy: MCTS, Evolution & LLM Agents

He Wang | ICTP-AP, UCAS
Deep Learning Applications in Gravitational Wave Data Analysis

Proposed framework integrating MCTS decision-making, self-evolutionary optimization, and LLM agent guidance for gravitational wave signal search

With route/short/long-term reflection:《Thinking, Fast and Slow》

  • deepseek-R1 for reflection generation
  • gpt-4o-2024-11-20 /claude-3-7-sonnet-20250219 for code generation

Preliminary Results (February 2025)

He Wang | ICTP-AP, UCAS
Deep Learning Applications in Gravitational Wave Data Analysis
import numpy as np
import scipy.signal as signal
def pipeline_v1(strain_h1: np.ndarray, strain_l1: np.ndarray, times: np.ndarray) -> tuple[np.ndarray, np.ndarray, np.ndarray]:
    def data_conditioning(strain_h1: np.ndarray, strain_l1: np.ndarray, times: np.ndarray) -> tuple[np.ndarray, np.ndarray, np.ndarray]:
        window_length = 4096
        dt = times[1] - times[0]
        fs = 1.0 / dt
        
        def whiten_strain(strain):
            strain_zeromean = strain - np.mean(strain)
            freqs, psd = signal.welch(strain_zeromean, fs=fs, nperseg=window_length,
                                       window='hann', noverlap=window_length//2)
            smoothed_psd = np.convolve(psd, np.ones(32) / 32, mode='same')
            smoothed_psd = np.maximum(smoothed_psd, np.finfo(float).tiny)
            white_fft = np.fft.rfft(strain_zeromean) / np.sqrt(np.interp(np.fft.rfftfreq(len(strain_zeromean), d=dt), freqs, smoothed_psd))
            return np.fft.irfft(white_fft)

        whitened_h1 = whiten_strain(strain_h1)
        whitened_l1 = whiten_strain(strain_l1)
        
        return whitened_h1, whitened_l1, times
    
    def compute_metric_series(h1_data: np.ndarray, l1_data: np.ndarray, time_series: np.ndarray) -> tuple[np.ndarray, np.ndarray]:
        fs = 1 / (time_series[1] - time_series[0])
        f_h1, t_h1, Sxx_h1 = signal.spectrogram(h1_data, fs=fs, nperseg=256, noverlap=128, mode='magnitude', detrend=False)
        f_l1, t_l1, Sxx_l1 = signal.spectrogram(l1_data, fs=fs, nperseg=256, noverlap=128, mode='magnitude', detrend=False)
        tf_metric = np.mean((Sxx_h1**2 + Sxx_l1**2) / 2, axis=0)
        gps_mid_time = time_series[0] + (time_series[-1] - time_series[0]) / 2
        metric_times = gps_mid_time + (t_h1 - t_h1[-1] / 2)
        
        return tf_metric, metric_times

    def calculate_statistics(tf_metric, t_h1):
        background_level = np.median(tf_metric)
        peaks, _ = signal.find_peaks(tf_metric, height=background_level * 1.0, distance=2, prominence=background_level * 0.3)
        peak_times = t_h1[peaks]
        peak_heights = tf_metric[peaks]
        peak_deltat = np.full(len(peak_times), 10.0)  # Fixed uncertainty value
        return peak_times, peak_heights, peak_deltat

    whitened_h1, whitened_l1, data_times = data_conditioning(strain_h1, strain_l1, times)
    tf_metric, metric_times = compute_metric_series(whitened_h1, whitened_l1, data_times)
    peak_times, peak_heights, peak_deltat = calculate_statistics(tf_metric, metric_times)
    
    return peak_times, peak_heights, peak_deltat

Algorithmic Exploration:Seed Function

Function Role in Framework

  • Serves as the initial solution that will be evolved and optimized by the framework
  • Provides baseline GW signal detection capability
  • Acts as the starting point for MCTS exploration
  • Establishes the structure that LLM agents will modify

Pipeline Workflow

  1. Conditions raw detector data (whitening)
  2. Computes time-frequency metrics
  3. Identifies peaks above background
  4. Returns event candidates with timestamps

Input: H1 and L1 detector strains, time array | Output: Event times, significance values, and time uncertainties

Preliminary Results (February 2025)

He Wang | ICTP-AP, UCAS
Deep Learning Applications in Gravitational Wave Data Analysis

Algorithmic Exploration:LLM Prompt Engineering

Prompt Structure for Algorithm Evolution

This template guides the LLM to generate optimized gravitational wave detection algorithms by learning from comparative examples.

Key Components:

  • Expert role establishment
  • Example pair analysis (worse/better algorithm)
  • Reflection on improvements
  • Targeted new algorithm generation
  • Strict output format enforcement

One Prompt Template for MLGWSC1 Algorithm Synthesis

You are an expert in gravitational wave signal detection algorithms. Your task is to design heuristics that can effectively solve optimization problems.

{prompt_task}

I have analyzed two algorithms and provided a reflection on their differences. 

[Worse code]
{worse_code}

[Better code]
{better_code}

[Reflection]
{reflection}

Based on this reflection, please write an improved algorithm according to the reflection. 
First, describe the design idea and main steps of your algorithm in one sentence. The description must be inside a brace outside the code implementation. Next, implement it in Python as a function named '{func_name}'.
This function should accept {input_count} input(s): {joined_inputs}. The function should return {output_count} output(s): {joined_outputs}. 
{inout_inf} {other_inf}

Do not give additional explanations.

Preliminary Results (February 2025)

He Wang | ICTP-AP, UCAS
Deep Learning Applications in Gravitational Wave Data Analysis

MLGWSC1 preliminary 结果

MLGWSC1: Algorithm Evolutionary Tree Visualization

Tree-based representation of our framework's exploration path, where each node represents a unique algorithm variant generated during the optimization process

Node color intensity: Algorithm performance level | Connections: Algorithmic modifications | Tree depth: Iteration sequence

He Wang | ICTP-AP, UCAS
Deep Learning Applications in Gravitational Wave Data Analysis

Preliminary Results (February 2025)

MLGWSC1 Benchmark: Optimization Performance Results

Preliminary Results (February 2025)

Optimization Progress & Algorithm Diversity

Sensitivity vs False Alarm Rate

Optimization Target: Maximizing Area Under Curve (AUC) in the 10-100Hz frequency range, balancing detection sensitivity and false alarm rates across algorithm generations

He Wang | ICTP-AP, UCAS
Deep Learning Applications in Gravitational Wave Data Analysis

Optimization Target: Maximizing Area Under Curve (AUC) in the 10-100Hz frequency range, balancing detection sensitivity and false alarm rates across algorithm generations

Preliminary Results (February 2025)

This pipeline combines adaptive PSD whitening and multi-band spectral coherence computation with a noise floor-aware peak detection and a non-linear timing uncertainty model to enhance gravitational wave signal detection accuracy and robustness.

Integrate asymmetric PSD whitening, extended STFT overlap optimization, chirp-enhanced prominence scaling, multi-channel noise floor refinement, and dynamic timing calibration for improved gravitational wave signal detection.

He Wang | ICTP-AP, UCAS
Deep Learning Applications in Gravitational Wave Data Analysis

Optimization Target: Maximizing Area Under Curve (AUC) in the 10-100Hz frequency range, balancing detection sensitivity and false alarm rates across algorithm generations

Optimization Progress & Algorithm Diversity

MLGWSC1 Benchmark: Optimization Performance Results

Preliminary Results (February 2025)

The framework (LLMs) can effectively optimize complex algorithms and guide iterative development along specified optimization directions, achieving targeted performance improvements in GW detection 

MLGWSC1 Benchmark: Optimization Performance Results

Preliminary Results (February 2025)

Sensitivity vs False Alarm Rate

He Wang | ICTP-AP, UCAS
Deep Learning Applications in Gravitational Wave Data Analysis

PyCBC

CNN-like

Simple non-linear filter

Key Finding: Our framework demonstrates potential to optimize highly interpretable and scalable non-linear algorithm pipelines that achieve performance comparable to traditional matched filtering techniques.

He Wang | ICTP-AP, UCAS
Deep Learning Applications in Gravitational Wave Data Analysis

The Evolution of Scientific Analysis Paradigms

Traditional Physics Approach

Input

Human-Designed Algorithm

(Based on human insight)

Output

Example: Matched Filtering

Black-Box AI Approach

Input

AI Model

(Low interpretability)

Output

Examples: CNN, AlphaGo

Interpretable AI Approach

Input

Optimized
Algorithm

(High interpretability)

Output

Example: OURS (on-going)

The Future: Combining traditional physics knowledge with LLM-optimized algorithms for transparent, reliable scientific discovery

He Wang | ICTP-AP, UCAS
Deep Learning Applications in Gravitational Wave Data Analysis

Data/
Experience

Data/
Experience

AI Model

Data/
Experience

Summary: AI for Gravitational Wave Science

Key Insights from Our Journey

  • Deep learning methods have transformed GW data analysis, enabling detection capabilities that complement traditional approaches
  • Evolution from simple CNN architectures to sophisticated frameworks that leverage domain knowledge
  • LLM-guided algorithmic optimization demonstrates potential for creating high-performance, interpretable methods
  • Balancing sensitivity and false alarm rates remains a key challenge
  • Benchmark results validate the potential of AI-driven approaches in scientific discovery

The Critical Role of Interpretability

Algorithm interpretability provides multiple essential benefits:

  • Scientific Understanding: Reveals unique characteristics of different model architectures and their decision processes
  • Algorithm Interpolation: Enables meaningful combination of different approaches by understanding their complementary strengths
  • Result Controllability: Provides confidence in outcomes and minimizes unexplained behaviors
  • Model Calibration: Allows fine-tuning of algorithms based on physical understanding rather than black-box optimization

The future of gravitational wave science lies at the intersection of traditional physics-inspired methods and interpretable AI approaches, creating a new paradigm for reliable scientific discovery.

He Wang | ICTP-AP, UCAS
Deep Learning Applications in Gravitational Wave Data Analysis
He Wang | ICTP-AP, UCAS
Deep Learning Applications in Gravitational Wave Data Analysis

Summary: AI for Gravitational Wave Science

Key Insights from Our Journey

  • Deep learning methods have transformed GW data analysis, enabling detection capabilities that complement traditional approaches
  • Evolution from simple CNN architectures to sophisticated frameworks that leverage domain knowledge
  • LLM-guided algorithmic optimization demonstrates potential for creating high-performance, interpretable methods
  • Balancing sensitivity and false alarm rates remains a key challenge
  • Benchmark results validate the potential of AI-driven approaches in scientific discovery

The Critical Role of Interpretability

Algorithm interpretability provides multiple essential benefits:

  • Scientific Understanding: Reveals unique characteristics of different model architectures and their decision processes
  • Algorithm Interpolation: Enables meaningful combination of different approaches by understanding their complementary strengths
  • Result Controllability: Provides confidence in outcomes and minimizes unexplained behaviors
  • Model Calibration: Allows fine-tuning of algorithms based on physical understanding rather than black-box optimization

The future of gravitational wave science lies at the intersection of traditional physics-inspired methods and interpretable AI approaches, creating a new paradigm for reliable scientific discovery.

for _ in range(num_of_audiences):
    print('Thank you for your attention! 🙏')

hewang@ucas.ac.cn

Towards Transparent AI in Gravitational Wave Data Analysis: Methods, Limitations, and New Directions

By He Wang

Towards Transparent AI in Gravitational Wave Data Analysis: Methods, Limitations, and New Directions

2025/04/20 10:30 @2025昆明引力年会

  • 3