可解释 AI 与强化学习协同驱动的
引力波数据处理新方法探索

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

 

 Aug 8, 2025 @第一届空间引力波科学数据分析研讨会会议

Interpretable Gravitational Wave Data Analysis with Reinforcement Learning and Large Language Models

Based on arXiv:2508.03661

Content

  • 研究动机
    • 探索空间引力波探测数据处理新路径的必要性
      • Joint PE: the ideal case vs Hierarchical Subtraction
    • 利用地面引力波探测数据检验算法的必要性
  • 先引出算法优化工作的截图
    • 动机:如何大模型用于科学发现 + 现有人工算法设计的痛点和AI可解释性差的痛点
    • 。。。
    • 计算资源的利用
  • 强化学习 for TDC (demo)
    • VS: ​Joint PE: the ideal case and Hierarchical Subtraction
    • preliminary results
  • Backup:
    1. Can LLMs truly generate novel content beyond their training data?
    2. Why can LLMs perform reasoning in ways that remain imperceptible to us?
    3. Why should you consider applying ML to gravitational wave astrophysics?
    4. In general, how to use AI for science?

Contents

01

GW

  • GW astronomy
  • GW data analysis
  • AI for science
  • (Pros & Cons of AI)

02

AI for GW

  • GW Search
  • Parameter inference
  • (SBI method)

03

LLM for GW

  • Algorithm Heuristic Design
He Wang | ICTP-AP, UCAS
Interpretable Gravitational Wave Data Analysis with DL and LLMs

hewang@ucas.ac.cn

动机1:需要探索空间引力波探测数据处理的新策略

He Wang | ICTP-AP, UCAS

Interpretable Gravitational Wave Data Analysis with DL and LLMs

hewang@ucas.ac.cn

分析 LISA 数据所面临的一个核心挑战是所谓的“鸡尾酒会问题”——由于所有引力波源在观测期间始终可见,必须从众多其他源及其产生的噪声中精准提取出某一个特定信号。我们希望系统地研究和评估 LISA 数据分析算法,以开发更为稳健的全局拟合方案。我们的设想是,算法将通过迭代方式进行优化:在任务期间逐步加入更多数据,并以先前获得的高质量解作为先验信息,从而持续改善全局解。目前尚不清楚传统的马尔可夫链蒙特卡洛(MCMC)方法是否最适合解决该问题,因此我们的研究重点是探索多种算法策略,并从收敛性、参数相关性的刻画能力以及假阳性检测等角度评估它们在解决全局拟合问题时的适用性,特别是针对较微弱的信号源。

Two methods:

  1. 【全局拟合】Joint PE: the ideal case
    • Accurate in theory, although the sampler may struggle dealing with \(10^n\) space
  2. 【逐个扣除】Hierarchical Subtraction
    • Less expensive than joint PE
    • Less accurate

 (J.Janquart+, MNRAS 2023)

动机2:地面引力波实测数据   \(\Rightarrow\)   算法开发   \(\Rightarrow\)  空间引力波探测

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

Interpretable Gravitational Wave Data Analysis with DL and LLMs

hewang@ucas.ac.cn

试金石

迁移应用

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

Interpretable Gravitational Wave Data Analysis with DL and LLMs

h_w[t]
d_w[t]
\rho[t]

线性滤波器

输入序列

输出序列

h_w[t]

脉冲响应函数:

hewang@ucas.ac.cn

Digital Signal Processing Approach

动机3:传统方法严重依赖人工经验构造滤波器与统计量

He Wang | ICTP-AP, UCAS

Interpretable Gravitational Wave Data Analysis with DL and LLMs

Nitz et al., ApJ (2017)

He Wang | ICTP-AP, UCAS

Phys. Rev. D 109, 123547 (2024)

动机4:AI 可解释性挑战: Discoveries vs. Validation

Interpretable Gravitational Wave Data Analysis with DL and LLMs

hewang@ucas.ac.cn

GW Search & Parameter Estimation Challenges with AI Models:

  • 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.
  • In parameter estimation, AI models' lack of interpretability requires substantial additional scientific validation to ensure credibility and acceptance of results.
  • Results 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.

Sci4MLGW@ICERM (June 2025)

Detection statistics from our AI model showing O1 events

HW et al 2024 MLST 5 015046

GW151226

GW151012

LVK. PRD (2016). arXiv:1602.03839

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: 

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

Interpretable Gravitational Wave Data Analysis with DL and LLMs

hewang@ucas.ac.cn

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: 

Credit: DCC-XXXXXXXX

Interpretable Gravitational Wave Data Analysis with DL and LLMs

hewang@ucas.ac.cn

Challenge and Methodology: Detecting Signals in GW Data

地基引力波探测科学数据的特点

  • 噪声特点:非高斯 + 非稳态

  • 信号特点:信噪比低 (约噪声幅度的1/100,约 -60dB )

He Wang | ICTP-AP, UCAS

Interpretable Gravitational Wave Data Analysis with DL and LLMs

波形模板库的局限性

  • 需要大量的精确波形模板以确保无遗漏,至少百万数量级

  • 受限于已知引力理论预言的波形模板,难以搜寻超越经典广相引力理论 的引力波信号

多信使天文学的兴起 + 引力波探测技术的进步

  • 低(负)延迟 的引力波信号搜寻

  • 海量的 累积数据和 成批的 引力波事件,有待高效的仔细分析

真实引力波数据的非高斯性

O1 观测运行时用的波形模板库

在 GW170817 事件后 1.74\(\pm\)0.05s 的伽玛暴 GRB 170817A

hewang@ucas.ac.cn

动机1:需要探索空间引力波探测数据处理的新策略

动机2:地面引力波实测数据\(\Rightarrow\)算法开发\(\Rightarrow\)空间引力波探测

动机3:传统方法严重依赖人工经验构造滤波器与统计量

动机4:AI 可解释性挑战: Discoveries vs. Validation

Automated Heuristic Design: Problem Definition

He Wang | ICTP-AP, UCAS

For any complex task \(P\) (especially NP-hard problems), Automated Heuristic Design (AHD) searches for the optimal heuristic \(h^*\) within a heuristic space \(H\):

\(h^*=\underset{h \in H}{\arg \max } g(h) \)

The heuristic space \(H\) contains all feasible algorithmic solutions for task \(P\). Each heuristic \(h \in H\) maps from the set of task inputs \(I_P\) to corresponding solutions \(S_P\):

\(h: I_P \rightarrow S_P\)

Performance measure \(g(\cdot)\) evaluates each heuristic's effectiveness, \(g: H \rightarrow \mathbb{R}\). For minimization problems with objective function \(f: S_P \rightarrow \mathbb{R}\), we estimate performance by evaluating the heuristic instances  \({ins}\in D \subseteq I_P\) on dataset \(D\) as follows:

\(g(h)=\mathbb{E}_{\boldsymbol{ins} \in D}[-f(h(\boldsymbol{ins}))]\)

arXiv.2410.14716

P
H
S_p
\mathbb{R}
f
I_p
h

external_knowledge
(constraint)

h
g(h)

Interpretable Gravitational Wave Data Analysis with DL and LLMs

HW & ZL, arXiv:2508.03661

hewang@ucas.ac.cn

He Wang | ICTP-AP, UCAS
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

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

P
H
S_p
\mathbb{R}
f
I_p
h

external_knowledge
(constraint)

h
g(h)

Problem: Pipeline Workflow

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

Optimization Target: Maximizing Area Under Curve (AUC) in the 1-1000Hz false alarms per-year range, balancing detection sensitivity and false alarm rates across algorithm generations

Automated Heuristic Design: Problem Definition

Interpretable Gravitational Wave Data Analysis with DL and LLMs

HW & ZL, arXiv:2508.03661

MLGWSC-1 benchmark

He Wang | ICTP-AP, UCAS

Algorithmic Exploration:LLM Prompt Engineering

external_knowledge
(constraint)

h
g(h)

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
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.

One Prompt Template for MLGWSC1 Algorithm Synthesis

Interpretable Gravitational Wave Data Analysis with DL and LLMs

hewang@ucas.ac.cn

HW & ZL, arXiv:2508.03661

Algorithmic Synergy: MCTS, Evolution & LLM Agents

He Wang | ICTP-AP, UCAS

Interpretable Gravitational Wave Data Analysis with DL and LLMs

  • Within each evolutionary iteration, MCTS decomposes complex signal detection problems into manageable decision sequences, enabling depth-wise and path-wise exploration of algorithmic possibilities.
  • We propose four evolutionary operations for MCTS expansion: Parent Crossover (PC) combines information from nodes at the parent level, Sibling Crossover (SC) exchanges features between nodes sharing the same parent, Point Mutation (PM) introduces random perturbations to individual nodes, and Path-wise Crossover (PWC) synthesizes information along complete trajectories from root to leaf.

hewang@ucas.ac.cn

Algorithmic Synergy: MCTS, Evolution & LLM Agents

He Wang | ICTP-AP, UCAS

Interpretable Gravitational Wave Data Analysis with DL and LLMs

hewang@ucas.ac.cn

  • deepseek-R1 for reflection generation
  • o3-mini-medium for code generation
  • LLM-Driven Algorithmic Evolution Through Reflective Code Synthesis.

MLGWSC1 Benchmark: Optimization Performance Results

Optimization Progress & Algorithm Diversity

He Wang | ICTP-AP, UCAS

Interpretable Gravitational Wave Data Analysis with DL and LLMs

Pipeline Workflow

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

Diversity in Evolutionary Computation

Population encoding:

  1. Removing comments and docstrings using abstract-syntax tree,
  2. standardizing code snippets into a common coding style (e.g., PEP81),
  3. Convert code snippets to vector representations using a code embedding model.

Pipeline Workflow

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

hewang@ucas.ac.cn

HW & ZL, arXiv:2508.03661

MLGWSC1 Benchmark: Optimization Performance Results

He Wang | ICTP-AP, UCAS

Interpretable Gravitational Wave Data Analysis with DL and LLMs

Refs of Benchmark Models

hewang@ucas.ac.cn

HW & ZL, arXiv:2508.03661

20.2%

23.4%

Interpretability Analysis: PT Level 5

He Wang | ICTP-AP, UCAS

Interpretable Gravitational Wave Data Analysis with DL and LLMs

import numpy as np
import scipy.signal as signal
from scipy.signal.windows import tukey
from scipy.signal import savgol_filter

def pipeline_v2(strain_h1: np.ndarray, strain_l1: np.ndarray, times: np.ndarray) -> tuple[np.ndarray, np.ndarray, np.ndarray]:
    """
    The pipeline function processes gravitational wave data from the H1 and L1 detectors to identify potential gravitational wave signals.
    It takes strain_h1 and strain_l1 numpy arrays containing detector data, and times array with corresponding time points.
    The function returns a tuple of three numpy arrays: peak_times containing GPS times of identified events,
    peak_heights with significance values of each peak, and peak_deltat showing time window uncertainty for each peak.
    """
    eps = np.finfo(float).tiny
    dt = times[1] - times[0]
    fs = 1.0 / dt
    # Base spectrogram parameters
    base_nperseg = 256
    base_noverlap = base_nperseg // 2
    medfilt_kernel = 101       # odd kernel size for robust detrending
    uncertainty_window = 5     # half-window for local timing uncertainty

    # -------------------- Stage 1: Robust Baseline Detrending --------------------
    # Remove long-term trends using a median filter for each channel.
    detrended_h1 = strain_h1 - signal.medfilt(strain_h1, kernel_size=medfilt_kernel)
    detrended_l1 = strain_l1 - signal.medfilt(strain_l1, kernel_size=medfilt_kernel)

    # -------------------- Stage 2: Adaptive Whitening with Enhanced PSD Smoothing --------------------
    def adaptive_whitening(strain: np.ndarray) -> np.ndarray:
        # Center the signal.
        centered = strain - np.mean(strain)
        n_samples = len(centered)
        # Adaptive window length: between 5 and 30 seconds
        win_length_sec = np.clip(n_samples / fs / 20, 5, 30)
        nperseg_adapt = int(win_length_sec * fs)
        nperseg_adapt = max(10, min(nperseg_adapt, n_samples))
        
        # Create a Tukey window with 75% overlap.
        tukey_alpha = 0.25
        win = tukey(nperseg_adapt, alpha=tukey_alpha)
        noverlap_adapt = int(nperseg_adapt * 0.75)
        if noverlap_adapt >= nperseg_adapt:
            noverlap_adapt = nperseg_adapt - 1
        
        # Estimate the power spectral density (PSD) using Welch's method.
        freqs, psd = signal.welch(centered, fs=fs, nperseg=nperseg_adapt,
                                  noverlap=noverlap_adapt, window=win, detrend='constant')
        psd = np.maximum(psd, eps)
        
        # Compute relative differences for PSD stationarity measure.
        diff_arr = np.abs(np.diff(psd)) / (psd[:-1] + eps)
        # Smooth the derivative with a moving average.
        if len(diff_arr) >= 3:
            smooth_diff = np.convolve(diff_arr, np.ones(3)/3, mode='same')
        else:
            smooth_diff = diff_arr
        
        # Exponential smoothing (Kalman-like) with adaptive alpha using PSD stationarity.
        smoothed_psd = np.copy(psd)
        for i in range(1, len(psd)):
            # Adaptive smoothing coefficient: base 0.8 modified by local stationarity (±0.05)
            local_alpha = np.clip(0.8 - 0.05 * smooth_diff[min(i-1, len(smooth_diff)-1)], 0.75, 0.85)
            smoothed_psd[i] = local_alpha * smoothed_psd[i-1] + (1 - local_alpha) * psd[i]
            
        # Compute Tikhonov regularization gain based on deviation from median PSD.
        noise_baseline = np.median(smoothed_psd)
        raw_gain = (smoothed_psd / (noise_baseline + eps)) - 1.0
        
        # Compute a causal-like gradient using the Savitzky-Golay filter.
        win_len = 11 if len(smoothed_psd) >= 11 else ((len(smoothed_psd)//2)*2+1)
        polyorder = 2 if win_len > 2 else 1
        delta_freq = np.mean(np.diff(freqs))
        grad_psd = savgol_filter(smoothed_psd, win_len, polyorder, deriv=1, delta=delta_freq, mode='interp')
        
        # Nonlinear scaling via sigmoid to enhance gradient differences.
        sigmoid = lambda x: 1.0 / (1.0 + np.exp(-x))
        scaling_factor = 1.0 + 2.0 * sigmoid(np.abs(grad_psd) / (np.median(smoothed_psd) + eps))
        
        # Compute adaptive gain factors with nonlinear scaling.
        gain = 1.0 - np.exp(-0.5 * scaling_factor * raw_gain)
        gain = np.clip(gain, -8.0, 8.0)
        
        # FFT-based whitening: interpolate gain and PSD onto FFT frequency bins.
        signal_fft = np.fft.rfft(centered)
        freq_bins = np.fft.rfftfreq(n_samples, d=dt)
        interp_gain = np.interp(freq_bins, freqs, gain, left=gain[0], right=gain[-1])
        interp_psd = np.interp(freq_bins, freqs, smoothed_psd, left=smoothed_psd[0], right=smoothed_psd[-1])
        denom = np.sqrt(interp_psd) * (np.abs(interp_gain) + eps)
        denom = np.maximum(denom, eps)
        white_fft = signal_fft / denom
        whitened = np.fft.irfft(white_fft, n=n_samples)
        return whitened

    # Whiten H1 and L1 channels using the adapted method.
    white_h1 = adaptive_whitening(detrended_h1)
    white_l1 = adaptive_whitening(detrended_l1)

    # -------------------- Stage 3: Coherent Time-Frequency Metric with Frequency-Conditioned Regularization --------------------
    def compute_coherent_metric(w1: np.ndarray, w2: np.ndarray) -> tuple[np.ndarray, np.ndarray]:
        # Compute complex spectrograms preserving phase information.
        f1, t_spec, Sxx1 = signal.spectrogram(w1, fs=fs, nperseg=base_nperseg,
                                              noverlap=base_noverlap, mode='complex', detrend=False)
        f2, t_spec2, Sxx2 = signal.spectrogram(w2, fs=fs, nperseg=base_nperseg,
                                               noverlap=base_noverlap, mode='complex', detrend=False)
        # Ensure common time axis length.
        common_len = min(len(t_spec), len(t_spec2))
        t_spec = t_spec[:common_len]
        Sxx1 = Sxx1[:, :common_len]
        Sxx2 = Sxx2[:, :common_len]
        
        # Compute phase differences and coherence between detectors.
        phase_diff = np.angle(Sxx1) - np.angle(Sxx2)
        phase_coherence = np.abs(np.cos(phase_diff))
        
        # Estimate median PSD per frequency bin from the spectrograms.
        psd1 = np.median(np.abs(Sxx1)**2, axis=1)
        psd2 = np.median(np.abs(Sxx2)**2, axis=1)
        
        # Frequency-conditioned regularization gain (reflection-guided).
        lambda_f = 0.5 * ((np.median(psd1) / (psd1 + eps)) + (np.median(psd2) / (psd2 + eps)))
        lambda_f = np.clip(lambda_f, 1e-4, 1e-2)
        # Regularization denominator integrating detector PSDs and lambda.
        reg_denom = (psd1[:, None] + psd2[:, None] + lambda_f[:, None] + eps)
        
        # Weighted phase coherence that balances phase alignment with noise levels.
        weighted_comp = phase_coherence / reg_denom
        
        # Compute axial (frequency) second derivatives as curvature estimates.
        d2_coh = np.gradient(np.gradient(phase_coherence, axis=0), axis=0)
        avg_curvature = np.mean(np.abs(d2_coh), axis=0)
        
        # Nonlinear activation boost using tanh for regions of high curvature.
        nonlinear_boost = np.tanh(5 * avg_curvature)
        linear_boost = 1.0 + 0.1 * avg_curvature
        
        # Cross-detector synergy: weight derived from global median consistency.
        novel_weight = np.mean((np.median(psd1) + np.median(psd2)) / (psd1[:, None] + psd2[:, None] + eps), axis=0)
        
        # Integrated time-frequency metric combining all enhancements.
        tf_metric = np.sum(weighted_comp * linear_boost * (1.0 + nonlinear_boost), axis=0) * novel_weight
        
        # Adjust the spectrogram time axis to account for window delay.
        metric_times = t_spec + times[0] + (base_nperseg / 2) / fs
        return tf_metric, metric_times

    tf_metric, metric_times = compute_coherent_metric(white_h1, white_l1)

    # -------------------- Stage 4: Multi-Resolution Thresholding with Octave-Spaced Dyadic Wavelet Validation --------------------
    def multi_resolution_thresholding(metric: np.ndarray, times_arr: np.ndarray) -> tuple[np.ndarray, np.ndarray, np.ndarray]:
        # Robust background estimation with median and MAD.
        bg_level = np.median(metric)
        mad_val = np.median(np.abs(metric - bg_level))
        robust_std = 1.4826 * mad_val
        threshold = bg_level + 1.5 * robust_std

        # Identify candidate peaks using prominence and minimum distance criteria.
        peaks, _ = signal.find_peaks(metric, height=threshold, distance=2, prominence=0.8 * robust_std)
        if peaks.size == 0:
            return np.array([]), np.array([]), np.array([])

        # Local uncertainty estimation using a Gaussian-weighted convolution.
        win_range = np.arange(-uncertainty_window, uncertainty_window + 1)
        sigma = uncertainty_window / 2.5
        gauss_kernel = np.exp(-0.5 * (win_range / sigma) ** 2)
        gauss_kernel /= np.sum(gauss_kernel)
        weighted_mean = np.convolve(metric, gauss_kernel, mode='same')
        weighted_sq = np.convolve(metric ** 2, gauss_kernel, mode='same')
        variances = np.maximum(weighted_sq - weighted_mean ** 2, 0.0)
        uncertainties = np.sqrt(variances)
        uncertainties = np.maximum(uncertainties, 0.01)

        valid_times = []
        valid_heights = []
        valid_uncerts = []
        n_metric = len(metric)

        # Compute a simple second derivative for local curvature checking.
        if n_metric > 2:
            second_deriv = np.diff(metric, n=2)
            second_deriv = np.pad(second_deriv, (1, 1), mode='edge')
        else:
            second_deriv = np.zeros_like(metric)

        # Use octave-spaced scales (dyadic wavelet validation) to validate peak significance.
        widths = np.arange(1, 9)  # approximate scales 1 to 8
        for peak in peaks:
            # Skip peaks lacking sufficient negative curvature.
            if second_deriv[peak] > -0.1 * robust_std:
                continue
            local_start = max(0, peak - uncertainty_window)
            local_end = min(n_metric, peak + uncertainty_window + 1)
            local_segment = metric[local_start:local_end]
            if len(local_segment) < 3:
                continue
            try:
                cwt_coeff = signal.cwt(local_segment, signal.ricker, widths)
            except Exception:
                continue
            max_coeff = np.max(np.abs(cwt_coeff))
            # Threshold for validating the candidate using local MAD.
            cwt_thresh = mad_val * np.sqrt(2 * np.log(len(local_segment) + eps))
            if max_coeff >= cwt_thresh:
                valid_times.append(times_arr[peak])
                valid_heights.append(metric[peak])
                valid_uncerts.append(uncertainties[peak])

        if len(valid_times) == 0:
            return np.array([]), np.array([]), np.array([])
        return np.array(valid_times), np.array(valid_heights), np.array(valid_uncerts)

    peak_times, peak_heights, peak_deltat = multi_resolution_thresholding(tf_metric, metric_times)
    return peak_times, peak_heights, peak_deltat

hewang@ucas.ac.cn

HW & ZL, arXiv:2508.03661

Interpretability Analysis

He Wang | ICTP-AP, UCAS

Interpretable Gravitational Wave Data Analysis with DL and LLMs

Out-of-distribution (OOD) detection

  • Generalization capability and robustness of the optimized algorithms

hewang@ucas.ac.cn

HW & ZL, arXiv:2508.03661

MCTS Depth-Stratified Performance Analysis.

  • Analyzed the relationship between MCTS tree depth and algorithm fitness across different optimization phases. The 10-layer MCTS structure was stratified into three depth groups: Depth I (depths 1-4), Depth II (depths 5-7), and Depth III (depths 8-10), representing shallow, intermediate, and deep exploration levels, respectively.

Algorithmic Component Impact Analysis.

  • A comprehensive technique impact analysis using controlled comparative methodology

Interpretability Analysis

He Wang | ICTP-AP, UCAS

Interpretable Gravitational Wave Data Analysis with DL and LLMs

Out-of-distribution (OOD) detection

  • Generalization capability and robustness of the optimized algorithms

hewang@ucas.ac.cn

HW & ZL, arXiv:2508.03661

MCTS Depth-Stratified Performance Analysis.

  • Analyzed the relationship between MCTS tree depth and algorithm fitness across different optimization phases. The 10-layer MCTS structure was stratified into three depth groups: Depth I (depths 1-4), Depth II (depths 5-7), and Depth III (depths 8-10), representing shallow, intermediate, and deep exploration levels, respectively.

Algorithmic Component Impact Analysis.

  • A comprehensive technique impact analysis using controlled comparative methodology
Please analyze the following Python code snippet for gravitational wave detection and
extract technical features in JSON format.

The code typically has three main stages:
1. Data Conditioning: preprocessing, filtering, whitening, etc.
2. Time-Frequency Analysis: spectrograms, FFT, wavelets, etc.
3. Trigger Analysis: peak detection, thresholding, validation, etc.

For each stage present in the code, extract:
- Technical methods used
- Libraries and functions called
- Algorithm complexity features
- Key parameters

Code to analyze:
```python
{code_snippet}
```

Please return a JSON object with this structure:
{
  "algorithm_id": "{algorithm_id}",
  "stages": {
    "data_conditioning": {
      "present": true/false,
      "techniques": ["technique1", "technique2"],
      "libraries": ["lib1", "lib2"],
      "functions": ["func1", "func2"],
      "parameters": {"param1": "value1"},
      "complexity": "low/medium/high"
    },
    "time_frequency_analysis": {...},
    "trigger_analysis": {...}
  },
  "overall_complexity": "low/medium/high",
  "total_lines": 0,
  "unique_libraries": ["lib1", "lib2"],
  "code_quality_score": 0.0
}

Only return the JSON object, no additional text.

Interpretability Analysis

He Wang | ICTP-AP, UCAS

Interpretable Gravitational Wave Data Analysis with DL and LLMs

hewang@ucas.ac.cn

HW & ZL, arXiv:2508.03661

MCTS Algorithmic Evolution Pathway

  • Complete MCTS tree structure showing all nodes associated with the optimal algorithm (node 486, fitness=5041.4).

Interpretability Analysis

He Wang | ICTP-AP, UCAS

Interpretable Gravitational Wave Data Analysis with DL and LLMs

MCTS Algorithmic Evolution Pathway

  • Complete MCTS tree structure showing all nodes associated with the optimal algorithm (node 486, fitness=5041.4).

hewang@ucas.ac.cn

HW & ZL, arXiv:2508.03661

Interpretability Analysis

He Wang | ICTP-AP, UCAS

Interpretable Gravitational Wave Data Analysis with DL and LLMs

hewang@ucas.ac.cn

HW & ZL, arXiv:2508.03661

Edge robustness analysis for three critical evolutionary transitions.

  • The distributions demonstrate the stochastic nature of LLM-driven code generation while confirming the consistent discovery of high-performance algorithmic variants. 

Framework Mechanism Analysis

He Wang | ICTP-AP, UCAS

Interpretable Gravitational Wave Data Analysis with DL and LLMs

Integrated Architecture Validation

  • A comprehensive comparison of our integrated
    Evo-MCTS framework against its constituent components operating in isolation.
    • Evo-MCTS: MCTS + Self-evolve + Reflection mech.
    • MCTS-AHD: MCTS framework for CO.
    • ReEvo: evolutionary framework for CO.

Contributions of knowledge synthesis

  • Compare to w/o external knowledge
    • non-linear vs linear only

hewang@ucas.ac.cn

LLM Model Selection and Robustness Analysis

  • Ablation study of various LLM contributions (code generator) and their robustness.
    • o3-mini-medium
      o1-2024-12-17
      gpt-4o-2024-11-20
      claude-3-7-sonnet-20250219-thinking

HW & ZL, arXiv:2508.03661

59.1%

Computational Resources and Parallelization

He Wang | ICTP-AP, UCAS

Interpretable Gravitational Wave Data Analysis with DL and LLMs

“东方”超算系统(ORISE,200P,北京)

  •  

hewang@ucas.ac.cn

HW & ZL, arXiv:2508.03661

第三方大模型推理服务

  • 闭源LLMs,访问外网需求,按token计费
  • ~ \(10^3\) dollars

Key Takeaways

He Wang | ICTP-AP, UCAS

Interpretable Gravitational Wave Data Analysis with DL and LLMs

hewang@ucas.ac.cn

动机1:需要探索空间引力波探测数据处理的新策略

动机2:地面引力波实测数据\(\Rightarrow\)算法开发\(\Rightarrow\)空间引力波探测

动机3:传统方法严重依赖人工经验构造滤波器与统计量

动机4:AI 可解释性挑战: Discoveries vs. Validation

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

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

Key Takeaways

He Wang | ICTP-AP, UCAS

Interpretable Gravitational Wave Data Analysis with DL and LLMs

hewang@ucas.ac.cn

动机1:需要探索空间引力波探测数据处理的新策略

动机2:地面引力波实测数据\(\Rightarrow\)算法开发\(\Rightarrow\)空间引力波探测

动机3:传统方法严重依赖人工经验构造滤波器与统计量

动机4:AI 可解释性挑战: Discoveries vs. Validation

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
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

🎯 OUR WORK

Key Takeaways

He Wang | ICTP-AP, UCAS

Interpretable Gravitational Wave Data Analysis with DL and LLMs

hewang@ucas.ac.cn

动机1:需要探索空间引力波探测数据处理的新策略

动机2:地面引力波实测数据\(\Rightarrow\)算法开发\(\Rightarrow\)空间引力波探测

动机3:传统方法严重依赖人工经验构造滤波器与统计量

动机4:AI 可解释性挑战: Discoveries vs. Validation

Interpretable AI Approach

The best of both worlds

Input

Physics-Informed
Algorithm

(High interpretability)

Output

Example: Our Approach
(In Preparation)

AI Model

Physics
Knowledge

任何算法的设计问题都可被看作是一个优化问题

  • 空间引力波数据处理的很多中间流程,都可以看做是“算法优化”问题,如 TDI 优化、噪声建模等等
  • 理论物理和宇宙学等中的很多解析建模和“符号回归”等方法,也都可以看做是“算法优化”问题

空间引力波数据分析的新策略

  1. 【全局拟合】Joint PE
  2. 【逐个扣除】Hierarchical Subtraction
  3. 【动态规划】强化学习(on-going work
He Wang | ICTP-AP, UCAS

Interpretable Gravitational Wave Data Analysis with DL and LLMs

hewang@ucas.ac.cn

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

Key Takeaways

动机1:需要探索空间引力波探测数据处理的新策略

动机2:地面引力波实测数据\(\Rightarrow\)算法开发\(\Rightarrow\)空间引力波探测

动机3:传统方法严重依赖人工经验构造滤波器与统计量

动机4:AI 可解释性挑战: Discoveries vs. Validation

Interpretable AI Approach

The best of both worlds

Input

Physics-Informed
Algorithm

(High interpretability)

Output

Example: Our Approach
(In Preparation)

AI Model

Physics
Knowledge

任何算法的设计问题都可被看作是一个优化问题

  • 空间引力波数据处理的很多中间流程,都可以看做是“算法优化”问题,如 TDI 优化、噪声建模等等
  • 理论物理和宇宙学等中的很多解析建模和“符号回归”等方法,也都可以看做是“算法优化”问题

空间引力波数据分析的新策略

  1. 【全局拟合】Joint PE
  2. 【逐个扣除】Hierarchical Subtraction
  3. 【动态规划】强化学习(on-going work

Bonus:

  1. Can LLMs truly generate novel content beyond their training data?
  2. Why can LLMs perform reasoning in ways that remain imperceptible to us?
  3. Why should you consider applying ML to gravitational wave astrophysics?
  4. In general, how to use AI for science?
He Wang | ICTP-AP, UCAS

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

Interpretable Gravitational Wave Data Analysis with DL and LLMs

hewang@ucas.ac.cn

He Wang | ICTP-AP, UCAS

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
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

Interpretable Gravitational Wave Data Analysis with DL and LLMs

🎯 OUR WORK

hewang@ucas.ac.cn

What is Gravitational wave?

GW Characteristics

  • 引力波是时空的涟漪。

  • 大物体的引力扭曲空间和时间,或称为“时空”,就像保龄球在弹跳床上滚动时改变其形状一样。较小的物体因此会以不同的方式移动——就像弹跳床上朝向保龄球大小的凹陷螺旋而去的弹珠,而不是坐在平坦的表面上。

He Wang | ICTP-AP, UCAS

Interpretable Gravitational Wave Data Analysis with DL and LLMs

hewang@ucas.ac.cn

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

双星并合系统产生的引力波波源

引力波振幅的测量

地面引力波探测器网络

GW Detection

  • 引力波探测打开了探索宇宙的新窗口

  • 不同波源,频率跨越 20 个数量级,不同探测器

He Wang | ICTP-AP, UCAS

Interpretable Gravitational Wave Data Analysis with DL and LLMs

hewang@ucas.ac.cn

The Scientific Significance

基础物理学

  • 引力子是否有质量

  • 引力波的传播速度

  • ...

He Wang | ICTP-AP, UCAS

Interpretable Gravitational Wave Data Analysis with DL and LLMs

天体物理学

  • 大质量恒星演化模型

  • 恒星级双黑洞的形成机制

  • ...

宇宙学

  • 哈勃常数的测量

  • 暗能量

  • ...

引力波暂现源星表 (GWTC-3)

hewang@ucas.ac.cn

首次探测双黑洞并合引力波事件 GW150914

人类成功观测到引力波的五条关键要素:

  1. 良好的探测器技术
  2. 良好的波形模板
  3. 良好的数据分析方法和技术
  4. 多个独立探测器间的一致性观测
  5. 引力波天文学和电磁波天文学的一致性观测


​​DOI:10.1063/1.1629411

伯纳德·舒尔茨

科学智能:AI for Science

  • 2016年,AlphaGo 第一版发表在了 Nature 杂志上
  • 2021年,AIphaFold 预测蛋白质结构登上 Science、Nature 年度技术突破
  • 2022年,DeepMind团队通过游戏训练AI发现矩阵乘法算法问题​
  • 《达摩院2022十大科技趋势》将 AI for Science 列为重要趋势
    • “人工智能成为科学家的新生产工具,催生科研新范式”
  • 2023年,DeepMind发布AI工具GNoME (Nature),成功预测220万种晶体结构
  • 2023年3月,为贯彻落实国家《新一代人工智能发展规划》,科技部会同自然科学基金委启动“人工智能驱动的科学研究”(AI for Science)专项部署工作,布局“人工智能驱动的科学研究”前沿科技研发体系​。
  • 2024.4:美国总统科学技术顾问委员会(PCAST)发布《赋能研究:利用人工智能应对全球挑战》报告
  • 2024.5: 《Science in the age of AI: How artificial intelligence is changing the nature and method of scientific research》 (Royal Soc.)
He Wang | ICTP-AP, UCAS

Interpretable Gravitational Wave Data Analysis with DL and LLMs

AlphaGo
围棋机器人

AlphaTensor
发现矩阵算法

AlphaFold
蛋白质结构预测

验证数学猜想

hewang@ucas.ac.cn

科学智能:AI for Science

  • 2016年,AlphaGo 第一版发表在了 Nature 杂志上
  • 2021年,AIphaFold 预测蛋白质结构登上 Science、Nature 年度技术突破
  • 2022年,DeepMind团队通过游戏训练AI发现矩阵乘法算法问题​
  • 《达摩院2022十大科技趋势》将 AI for Science 列为重要趋势
    • “人工智能成为科学家的新生产工具,催生科研新范式”
  • 2023年,DeepMind发布AI工具GNoME (Nature),成功预测220万种晶体结构
  • 2023年3月,为贯彻落实国家《新一代人工智能发展规划》,科技部会同自然科学基金委启动“人工智能驱动的科学研究”(AI for Science)专项部署工作,布局“人工智能驱动的科学研究”前沿科技研发体系​。
  • 2024.4:美国总统科学技术顾问委员会(PCAST)发布《赋能研究:利用人工智能应对全球挑战》报告
  • 2024.5: 《Science in the age of AI: How artificial intelligence is changing the nature and method of scientific research》 (Royal Soc.)
He Wang | ICTP-AP, UCAS

Interpretable Gravitational Wave Data Analysis with DL and LLMs

AlphaGo
围棋机器人

AlphaTensor
发现矩阵算法

AlphaFold
蛋白质结构预测

验证数学猜想

hewang@ucas.ac.cn

传统机器学习

深度学习

输入

特征提取

输入

特征

传统机器学习算法

输出

输入

自动特征提取 + 分类

输出

人工智能 > 机器学习 > 深度学习

人工智能

机器学习

深度学习

人工智能的一个分支。机器学习是用数据或以往的经验,以此优化计算机程序的性能标准

机器学习的一个分支。基于神经网络结构实现端到端的一种建模方法

任何能实现以人类智能相似的方式做出反应的技术

  • ​机器学习:

    • ​​线性回归模型、决策树模型、支撑向量机、马尔科夫链-蒙特卡洛方法 (MCMC) ...

  • 深度学习:

    • 用神经网络实现自动特征提取的模型

    • 深度神经网络是一个万能的函数拟合器​​,可以表征任意复杂度的非线性函数映射

    • 特点:端到端、数据驱动、过参数化 ...

  • 传统​引力波数据分析方法 ~ 传统机器学习方法

Bias:参考Sage

  •  

可解释性:feature extraction, Interpolation

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

LLM:

  •  
He Wang | ICTP-AP, UCAS

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?

Interpretable Gravitational Wave Data Analysis with DL and LLMs

hewang@ucas.ac.cn

Contents

01

GW

  • GW astronomy
  • AI for science
  • (Pros & Cons of AI)

02

AI for GW

  • GW Search
  • Parameter inference
  • (SBI method)

03

LLM for GW

  • Algorithm Heuristic Design
He Wang | ICTP-AP, UCAS
Interpretable Gravitational Wave Data Analysis with DL and LLMs

hewang@ucas.ac.cn

He Wang | ICTP-AP, UCAS

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

Interpretable Gravitational Wave Data Analysis with DL and LLMs

hewang@ucas.ac.cn

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

CNN for GW Detection: Pioneering Approaches

Interpretable Gravitational Wave Data Analysis with DL and LLMs

hewang@ucas.ac.cn

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

Interpretable Gravitational Wave Data Analysis with DL and LLMs

hewang@ucas.ac.cn

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

Interpretable Gravitational Wave Data Analysis with DL and LLMs

hewang@ucas.ac.cn

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

Interpretable Gravitational Wave Data Analysis with DL and LLMs

hewang@ucas.ac.cn

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)

Interpretable Gravitational Wave Data Analysis with DL and LLMs

hewang@ucas.ac.cn

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

Interpretable Gravitational Wave Data Analysis with DL and LLMs

hewang@ucas.ac.cn

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

Interpretable Gravitational Wave Data Analysis with DL and LLMs

hewang@ucas.ac.cn

He Wang | ICTP-AP, UCAS

CNN for GW Detection: Feature Extraction

signal

noise

signal + noise

glitch_H1 + noise

Is there GW or non-GW in it?

feature extraction

Convolutional Neural Network (ConvNet or CNN)

classifier

Interpretable Gravitational Wave Data Analysis with DL and LLMs

Jun Tian, HW, et al. ArXiv: 2505.20357

hewang@ucas.ac.cn

He Wang | ICTP-AP, UCAS

CNN for GW Detection: Feature Extraction

signal

noise

signal + noise

glitch_H1 + noise

Is there GW or non-GW in it?

feature extraction

Convolutional Neural Network (ConvNet or CNN)

classifier

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

Interpretable Gravitational Wave Data Analysis with DL and LLMs

Jun Tian, HW, et al. ArXiv: 2505.20357

hewang@ucas.ac.cn

He Wang | ICTP-AP, UCAS

CNN for GW Detection: Feature Extraction

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

GW / noise + Glitch

GW / noise / Glitch

GW / noise

GW / noise / Glitch

GW / noise

Random

Forest

Interpretable Gravitational Wave Data Analysis with DL and LLMs

Jun Tian, HW, et al. ArXiv: 2505.20357

hewang@ucas.ac.cn

  • 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 107, 023021 (2023)

Interpretable Gravitational Wave Data Analysis with DL and LLMs

hewang@ucas.ac.cn

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

Interpretable Gravitational Wave Data Analysis with DL and LLMs

hewang@ucas.ac.cn

He Wang | ICTP-AP, UCAS

Exploring Beyond General Relativity

Interpretable Gravitational Wave Data Analysis with DL and LLMs

hewang@ucas.ac.cn

B. P. Abbott et al. (LIGO-Virgo), PRD 100, 104036 (2019). 

  • Much of the discussion on model generalization has been within the GR framework.
  • Our work on beyond General Relativity (bGR) aims to demonstrate AI's potential advantages in detecting signals that surpass GR's limitations.
\begin{aligned} \psi & \sim \frac{3}{128 \eta}(\pi f M)^{-5 / 3} \sum_{i=0}^n \textcolor{red}{\varphi_i^{\mathrm{GR}}}(\pi f M)^{i / 3} \\ \varphi_i & \rightarrow\left(1+\delta \varphi_i\right) \textcolor{red}{\varphi_i^{\mathrm{GR}}} \end{aligned}

Yu-Xin Wang, Xiaotong Wei, Chun-Yue Li, Tian-Yang Sun, Shang-Jie Jin, He Wang*, Jing-Lei Cui, Jing-Fei Zhang, and Xin Zhang*. arXiv:2410.20129
PRD, accepted (2025)

Contents

01

GW

  • GW astronomy
  • AI for science
  • (Pros & Cons of AI)

02

AI for GW

  • GW Search
  • Parameter inference
  • (SBI method)

03

LLM for GW

  • Algorithm Heuristic Design
He Wang | ICTP-AP, UCAS
Interpretable Gravitational Wave Data Analysis with DL and LLMs

hewang@ucas.ac.cn

He Wang | ICTP-AP, UCAS

Parameter Estimation: Holy Grail of  GW data analysis

Interpretable Gravitational Wave Data Analysis with DL and LLMs

hewang@ucas.ac.cn

He Wang | ICTP-AP, UCAS

Interpretable Gravitational Wave Data Analysis with DL and LLMs

hewang@ucas.ac.cn

  • Bayesian inference, the Holy Grail of gravitational-wave data analysis, enables astrophysical interpretation and scientific discoveries.
  • Traditional parameter estimation (PE) techniques rely on Bayesian analysis methods (posteriors + evidence).
  • Computing the full 15-dimensional posterior distribution estimate is very time-consuming:
    • Template generation time-consuming
    • Calculating likelihood function

Bayesian statistics

Data quality improvement

Credit: Marco Cavaglià 

LIGO-Virgo data processing

GW searches

Astrophsical interpretation of GW sources

Parameter Estimation: Holy Grail of  GW data analysis

He Wang | ICTP-AP, UCAS

Interpretable Gravitational Wave Data Analysis with DL and LLMs

hewang@ucas.ac.cn

Nature Physics 18, 1 (2022) 112–17

  • A complete 15-dimensional posterior probability distribution, taking about 1 s (<< \(10^4\) s).
  • Capable of calculating evidence
  • Processing time: (using 64 CPU cores)
    • less than 1 hour with IMRPhenomXPHM,
    • approximately 10 hours with SEOBNRv4PHM

PRL 127, 24 (2021) 241103.

PRL 130, 17 (2023) 171403.

HW, et al. Big Data Mining and Analytics 5, 1 (2021) 53–63.

  • Prior Sampling: 50,000 Posterior samples in approximately 8 Seconds.

Parameter Estimation: AI application

He Wang | ICTP-AP, UCAS

Interpretable Gravitational Wave Data Analysis with DL and LLMs

hewang@ucas.ac.cn

ABC of Normalizing Flow Model (1/4)

He Wang | ICTP-AP, UCAS

Interpretable Gravitational Wave Data Analysis with DL and LLMs

hewang@ucas.ac.cn

ABC of Normalizing Flow Model (2/4)

He Wang | ICTP-AP, UCAS

Interpretable Gravitational Wave Data Analysis with DL and LLMs

hewang@ucas.ac.cn

ABC of Normalizing Flow Model (3/4)

Train

\vec\theta = (m_1,m_2,d_L, ...) \in P_{prior}
\vec{x}=\vec{h}_{\vec{\theta}} + \vec{n}

nflow

\vec{z} \Rightarrow \mathbb{N}(0,\mathbb{I})
He Wang | ICTP-AP, UCAS

Interpretable Gravitational Wave Data Analysis with DL and LLMs

hewang@ucas.ac.cn

ABC of Normalizing Flow Model (4/4)

Train

\vec\theta = (m_1,m_2,d_L, ...) \in P_{prior}
\vec{x}=\vec{h}_{\vec{\theta}} + \vec{n}

nflow

\vec{z} \Rightarrow \mathbb{N}(0,\mathbb{I})

归一化流模型示意图

Test

\vec\theta = (m_1,m_2,d_L, ...) \in P_{posterior}
\vec{x}=\vec{h}_{\vec{\theta}} + \vec{n}

nflow

\vec{z} \in \mathbb{N}(0,\mathbb{I})
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)

Interpretable Gravitational Wave Data Analysis with DL and LLMs

hewang@ucas.ac.cn

PRD 108, 4 (2023): 044029.

Neural Posterior Estimation with Guaranteed Exact Coverage: The Ringdown of GW150914

He Wang | ICTP-AP, UCAS

Appreciating the Ringdown Overtone Test of GW150914

  • A notable work involves ringdown overtone testing, which, acknowledging the difficulty in achieving DINGO-like precision for complex waveforms, leverages the speed advantage of AI.
  • By simulating the signal and \(10^3\) realizations of LIGO noise for each pixel, it accomplishes what is impossible for MCMC methods, prioritizing speed over precision in a strategic trade-off.

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

Interpretable Gravitational Wave Data Analysis with DL and LLMs

hewang@ucas.ac.cn

PRD 108, 4 (2023): 044029.

He Wang | ICTP-AP, UCAS

超分辨率初值面的哈密顿约束和动量约束修正(系统误差)

Numerical Relativity using AI

Interpretable Gravitational Wave Data Analysis with DL and LLMs

hewang@ucas.ac.cn

evolve

Thomas Helfer, et al. Super-Resolution without High-Resolution Labels for Black Hole Simulations.  arXiv:2411.02453

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

hewang@ucas.ac.cn

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

Contents

01

GW

  • GW astronomy
  • AI for science
  • (Pros & Cons of AI)

02

AI for GW

  • GW Search
  • Parameter inference
  • (SBI method)

03

LLM for GW

  • Algorithm Heuristic Design
He Wang | ICTP-AP, UCAS
Interpretable Gravitational Wave Data Analysis with DL and LLMs

hewang@ucas.ac.cn

LLMs for Gravitational Wave Data Analysis

  • From applied mathematics and fundamental physics to gravitational wave astronomy and complex systems analysis, scientific discovery relies on decisions driven by prior experience and data assumptions - yet faces persistent challenges in gravitational-wave signal identification.
  • While existing approaches like matched filtering (MF) and deep neural networks (DNNs) have achieved partial success, their limitations emerge through MF's excessive computational demands and dependence on theoretical assumptions requiring predefined waveform templates, and DNNs' black-box architectures that obscure decision logic while introducing hidden biases and overfitting tendencies.
  • We propose a synergistic framework where Monte Carlo Tree Search (MCTS) enables stepwise decision-making through strategic exploration, self-evolving (SelfEvo) optimization dynamically adjusts search policies via continuous performance feedback, and large language model (LLM)- generated heuristics inject domain-aware constraints - creating a closed-loop system that combines structured reasoning with adaptive learning.
He Wang | ICTP-AP, UCAS
Deep Learning Applications in Gravitational Wave Data Analysis

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

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

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

Interpretable Gravitational Wave Data Analysis with DL and LLMs

hewang@ucas.ac.cn

Algorithmic Synergy: MCTS, Evolution & LLM Agents

He Wang | ICTP-AP, UCAS

Interpretable Gravitational Wave Data Analysis with DL and LLMs

  • Within each evolutionary iteration, MCTS decomposes complex signal detection problems into manageable decision sequences, enabling depth-wise and path-wise exploration of algorithmic possibilities.
  • We propose four evolutionary operations for MCTS expansion: Parent Crossover (PC) combines information from nodes at the parent level, Sibling Crossover (SC) exchanges features between nodes sharing the same parent, Point Mutation (PM) introduces random perturbations to individual nodes, and Path-wise Crossover (PWC) synthesizes information along complete trajectories from root to leaf.

hewang@ucas.ac.cn

  • deepseek-R1 for reflection generation
  • o3-mini-medium for code generation

Algorithmic Synergy: MCTS, Evolution & LLM Agents

He Wang | ICTP-AP, UCAS

Interpretable Gravitational Wave Data Analysis with DL and LLMs

hewang@ucas.ac.cn

  • deepseek-R1 for reflection generation
  • o3-mini-medium for code generation

Algorithmic Synergy: MCTS, Evolution & LLM Agents

He Wang | ICTP-AP, UCAS

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
  • o3-mini-medium for code generation

Preliminary Results (February 2025)

Interpretable Gravitational Wave Data Analysis with DL and LLMs

hewang@ucas.ac.cn

He Wang | ICTP-AP, UCAS

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

Interpretable Gravitational Wave Data Analysis with DL and LLMs

Preliminary Results (February 2025)

hewang@ucas.ac.cn

MLGWSC1 Benchmark: Optimization Performance Results

Optimization Progress & Algorithm Diversity

He Wang | ICTP-AP, UCAS

Interpretable Gravitational Wave Data Analysis with DL and LLMs

HW et al., In preparation

Pipeline Workflow

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

Diversity in Evolutionary Computation

Population encoding:

  1. Removing comments and docstrings using abstract-syntax tree,
  2. standardizing code snippets into a common coding style (e.g., PEP81),
  3. Convert code snippets to vector representations using a code embedding model.

Pipeline Workflow

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

hewang@ucas.ac.cn

MLGWSC1 Benchmark: Optimization Performance Results

He Wang | ICTP-AP, UCAS

Interpretable Gravitational Wave Data Analysis with DL and LLMs

HW et al., In preparation

Refs of Benchmark Models

hewang@ucas.ac.cn

The algorithm first whitens and conditions dual-detector data by applying fixed-length (nperseg=256) Welch PSD estimation combined with a non-adaptive 0.5×tanh gain modulation, emphasizing spectral features where noise is minimal via an inverse dual‐detector weighting approach. It then computes a coherent time-frequency metric and extracts candidate gravitational wave events using cascaded multi-resolution thresholding and fixed-scale continuous wavelet transform (CWT) validation, propagating Gaussian uncertainty to refine each trigger’s timing accuracy.

The algorithm integrates adaptive median-based detrending and exponential adaptive whitening—where strain variance, spectral smoothing, and Tikhonov-regularized spectral inversion are prioritized—to produce a frequency-coherent metric that is further refined using both spectrogram phase coherence and local curvature boosting. It then employs a dynamically relaxed multi-resolution peak detection scheme, including dyadic CWT analysis and curvature checks, to robustly identify and validate candidate gravitational wave signals while balancing sensitivity against noise variability.

The algorithm begins by removing long-term nonstationarity via adaptive median filtering, then applies dynamic, frequency-dependent spectral whitening using an adaptive Kalman-inspired smoothing of the PSD to accentuate transients. It subsequently computes a coherent time-frequency metric through complex spectrogram cross-correlation and robust phase coherence, and finally identifies candidate gravitational wave signals via multi-resolution thresholding with CWT-based validation that emphasizes adaptive windowing and robust local uncertainty estimation.

This pipeline integrates robust median detrending and Kalman‐inspired PSD smoothing with gradient-adaptive whitening (via Savitzky–Golay filtering), emphasizing adaptive gain computations from high‐priority spectral PSD parameters while de-emphasizing global noise baseline variations. It then computes a coherent time-frequency metric—with axial second derivative curvature boosting and frequency‐conditioned regularization—and employs multi‐resolution thresholding using octave‐spaced dyadic wavelet validation to identify candidate gravitational wave events with precise timing uncertainty.

This pipeline robustly detrends and adaptively whitens the dual-channel gravitational wave data—with higher priority given to the adaptive PSD smoothing (via stationarity-based exponential smoothing and Savitzky–Golay spectral gradient scaling) and frequency-conditioned regularization—to compute a coherent time-frequency metric combining phase coherence and curvature boost. It then applies cascaded multi-resolution thresholding and octave-spaced Ricker wavelet validation with local uncertainty estimation to reliably isolate potential gravitational wave triggers, outputting their GPS time, significance, and timing uncertainty.

So, what went down during the Phase Transition (PT)?

PyCBC (linear-core)

cWB (nonlinear-core)

Simple non-linear filters

CNN-like (highly non-linear)

Interpretability Analysis: PT Level 5

He Wang | ICTP-AP, UCAS

Interpretable Gravitational Wave Data Analysis with DL and LLMs

HW et al., In preparation

import numpy as np
import scipy.signal as signal
from scipy.signal.windows import tukey
from scipy.signal import savgol_filter

def pipeline_v2(strain_h1: np.ndarray, strain_l1: np.ndarray, times: np.ndarray) -> tuple[np.ndarray, np.ndarray, np.ndarray]:
    """
    The pipeline function processes gravitational wave data from the H1 and L1 detectors to identify potential gravitational wave signals.
    It takes strain_h1 and strain_l1 numpy arrays containing detector data, and times array with corresponding time points.
    The function returns a tuple of three numpy arrays: peak_times containing GPS times of identified events,
    peak_heights with significance values of each peak, and peak_deltat showing time window uncertainty for each peak.
    """
    eps = np.finfo(float).tiny
    dt = times[1] - times[0]
    fs = 1.0 / dt
    # Base spectrogram parameters
    base_nperseg = 256
    base_noverlap = base_nperseg // 2
    medfilt_kernel = 101       # odd kernel size for robust detrending
    uncertainty_window = 5     # half-window for local timing uncertainty

    # -------------------- Stage 1: Robust Baseline Detrending --------------------
    # Remove long-term trends using a median filter for each channel.
    detrended_h1 = strain_h1 - signal.medfilt(strain_h1, kernel_size=medfilt_kernel)
    detrended_l1 = strain_l1 - signal.medfilt(strain_l1, kernel_size=medfilt_kernel)

    # -------------------- Stage 2: Adaptive Whitening with Enhanced PSD Smoothing --------------------
    def adaptive_whitening(strain: np.ndarray) -> np.ndarray:
        # Center the signal.
        centered = strain - np.mean(strain)
        n_samples = len(centered)
        # Adaptive window length: between 5 and 30 seconds
        win_length_sec = np.clip(n_samples / fs / 20, 5, 30)
        nperseg_adapt = int(win_length_sec * fs)
        nperseg_adapt = max(10, min(nperseg_adapt, n_samples))
        
        # Create a Tukey window with 75% overlap.
        tukey_alpha = 0.25
        win = tukey(nperseg_adapt, alpha=tukey_alpha)
        noverlap_adapt = int(nperseg_adapt * 0.75)
        if noverlap_adapt >= nperseg_adapt:
            noverlap_adapt = nperseg_adapt - 1
        
        # Estimate the power spectral density (PSD) using Welch's method.
        freqs, psd = signal.welch(centered, fs=fs, nperseg=nperseg_adapt,
                                  noverlap=noverlap_adapt, window=win, detrend='constant')
        psd = np.maximum(psd, eps)
        
        # Compute relative differences for PSD stationarity measure.
        diff_arr = np.abs(np.diff(psd)) / (psd[:-1] + eps)
        # Smooth the derivative with a moving average.
        if len(diff_arr) >= 3:
            smooth_diff = np.convolve(diff_arr, np.ones(3)/3, mode='same')
        else:
            smooth_diff = diff_arr
        
        # Exponential smoothing (Kalman-like) with adaptive alpha using PSD stationarity.
        smoothed_psd = np.copy(psd)
        for i in range(1, len(psd)):
            # Adaptive smoothing coefficient: base 0.8 modified by local stationarity (±0.05)
            local_alpha = np.clip(0.8 - 0.05 * smooth_diff[min(i-1, len(smooth_diff)-1)], 0.75, 0.85)
            smoothed_psd[i] = local_alpha * smoothed_psd[i-1] + (1 - local_alpha) * psd[i]
            
        # Compute Tikhonov regularization gain based on deviation from median PSD.
        noise_baseline = np.median(smoothed_psd)
        raw_gain = (smoothed_psd / (noise_baseline + eps)) - 1.0
        
        # Compute a causal-like gradient using the Savitzky-Golay filter.
        win_len = 11 if len(smoothed_psd) >= 11 else ((len(smoothed_psd)//2)*2+1)
        polyorder = 2 if win_len > 2 else 1
        delta_freq = np.mean(np.diff(freqs))
        grad_psd = savgol_filter(smoothed_psd, win_len, polyorder, deriv=1, delta=delta_freq, mode='interp')
        
        # Nonlinear scaling via sigmoid to enhance gradient differences.
        sigmoid = lambda x: 1.0 / (1.0 + np.exp(-x))
        scaling_factor = 1.0 + 2.0 * sigmoid(np.abs(grad_psd) / (np.median(smoothed_psd) + eps))
        
        # Compute adaptive gain factors with nonlinear scaling.
        gain = 1.0 - np.exp(-0.5 * scaling_factor * raw_gain)
        gain = np.clip(gain, -8.0, 8.0)
        
        # FFT-based whitening: interpolate gain and PSD onto FFT frequency bins.
        signal_fft = np.fft.rfft(centered)
        freq_bins = np.fft.rfftfreq(n_samples, d=dt)
        interp_gain = np.interp(freq_bins, freqs, gain, left=gain[0], right=gain[-1])
        interp_psd = np.interp(freq_bins, freqs, smoothed_psd, left=smoothed_psd[0], right=smoothed_psd[-1])
        denom = np.sqrt(interp_psd) * (np.abs(interp_gain) + eps)
        denom = np.maximum(denom, eps)
        white_fft = signal_fft / denom
        whitened = np.fft.irfft(white_fft, n=n_samples)
        return whitened

    # Whiten H1 and L1 channels using the adapted method.
    white_h1 = adaptive_whitening(detrended_h1)
    white_l1 = adaptive_whitening(detrended_l1)

    # -------------------- Stage 3: Coherent Time-Frequency Metric with Frequency-Conditioned Regularization --------------------
    def compute_coherent_metric(w1: np.ndarray, w2: np.ndarray) -> tuple[np.ndarray, np.ndarray]:
        # Compute complex spectrograms preserving phase information.
        f1, t_spec, Sxx1 = signal.spectrogram(w1, fs=fs, nperseg=base_nperseg,
                                              noverlap=base_noverlap, mode='complex', detrend=False)
        f2, t_spec2, Sxx2 = signal.spectrogram(w2, fs=fs, nperseg=base_nperseg,
                                               noverlap=base_noverlap, mode='complex', detrend=False)
        # Ensure common time axis length.
        common_len = min(len(t_spec), len(t_spec2))
        t_spec = t_spec[:common_len]
        Sxx1 = Sxx1[:, :common_len]
        Sxx2 = Sxx2[:, :common_len]
        
        # Compute phase differences and coherence between detectors.
        phase_diff = np.angle(Sxx1) - np.angle(Sxx2)
        phase_coherence = np.abs(np.cos(phase_diff))
        
        # Estimate median PSD per frequency bin from the spectrograms.
        psd1 = np.median(np.abs(Sxx1)**2, axis=1)
        psd2 = np.median(np.abs(Sxx2)**2, axis=1)
        
        # Frequency-conditioned regularization gain (reflection-guided).
        lambda_f = 0.5 * ((np.median(psd1) / (psd1 + eps)) + (np.median(psd2) / (psd2 + eps)))
        lambda_f = np.clip(lambda_f, 1e-4, 1e-2)
        # Regularization denominator integrating detector PSDs and lambda.
        reg_denom = (psd1[:, None] + psd2[:, None] + lambda_f[:, None] + eps)
        
        # Weighted phase coherence that balances phase alignment with noise levels.
        weighted_comp = phase_coherence / reg_denom
        
        # Compute axial (frequency) second derivatives as curvature estimates.
        d2_coh = np.gradient(np.gradient(phase_coherence, axis=0), axis=0)
        avg_curvature = np.mean(np.abs(d2_coh), axis=0)
        
        # Nonlinear activation boost using tanh for regions of high curvature.
        nonlinear_boost = np.tanh(5 * avg_curvature)
        linear_boost = 1.0 + 0.1 * avg_curvature
        
        # Cross-detector synergy: weight derived from global median consistency.
        novel_weight = np.mean((np.median(psd1) + np.median(psd2)) / (psd1[:, None] + psd2[:, None] + eps), axis=0)
        
        # Integrated time-frequency metric combining all enhancements.
        tf_metric = np.sum(weighted_comp * linear_boost * (1.0 + nonlinear_boost), axis=0) * novel_weight
        
        # Adjust the spectrogram time axis to account for window delay.
        metric_times = t_spec + times[0] + (base_nperseg / 2) / fs
        return tf_metric, metric_times

    tf_metric, metric_times = compute_coherent_metric(white_h1, white_l1)

    # -------------------- Stage 4: Multi-Resolution Thresholding with Octave-Spaced Dyadic Wavelet Validation --------------------
    def multi_resolution_thresholding(metric: np.ndarray, times_arr: np.ndarray) -> tuple[np.ndarray, np.ndarray, np.ndarray]:
        # Robust background estimation with median and MAD.
        bg_level = np.median(metric)
        mad_val = np.median(np.abs(metric - bg_level))
        robust_std = 1.4826 * mad_val
        threshold = bg_level + 1.5 * robust_std

        # Identify candidate peaks using prominence and minimum distance criteria.
        peaks, _ = signal.find_peaks(metric, height=threshold, distance=2, prominence=0.8 * robust_std)
        if peaks.size == 0:
            return np.array([]), np.array([]), np.array([])

        # Local uncertainty estimation using a Gaussian-weighted convolution.
        win_range = np.arange(-uncertainty_window, uncertainty_window + 1)
        sigma = uncertainty_window / 2.5
        gauss_kernel = np.exp(-0.5 * (win_range / sigma) ** 2)
        gauss_kernel /= np.sum(gauss_kernel)
        weighted_mean = np.convolve(metric, gauss_kernel, mode='same')
        weighted_sq = np.convolve(metric ** 2, gauss_kernel, mode='same')
        variances = np.maximum(weighted_sq - weighted_mean ** 2, 0.0)
        uncertainties = np.sqrt(variances)
        uncertainties = np.maximum(uncertainties, 0.01)

        valid_times = []
        valid_heights = []
        valid_uncerts = []
        n_metric = len(metric)

        # Compute a simple second derivative for local curvature checking.
        if n_metric > 2:
            second_deriv = np.diff(metric, n=2)
            second_deriv = np.pad(second_deriv, (1, 1), mode='edge')
        else:
            second_deriv = np.zeros_like(metric)

        # Use octave-spaced scales (dyadic wavelet validation) to validate peak significance.
        widths = np.arange(1, 9)  # approximate scales 1 to 8
        for peak in peaks:
            # Skip peaks lacking sufficient negative curvature.
            if second_deriv[peak] > -0.1 * robust_std:
                continue
            local_start = max(0, peak - uncertainty_window)
            local_end = min(n_metric, peak + uncertainty_window + 1)
            local_segment = metric[local_start:local_end]
            if len(local_segment) < 3:
                continue
            try:
                cwt_coeff = signal.cwt(local_segment, signal.ricker, widths)
            except Exception:
                continue
            max_coeff = np.max(np.abs(cwt_coeff))
            # Threshold for validating the candidate using local MAD.
            cwt_thresh = mad_val * np.sqrt(2 * np.log(len(local_segment) + eps))
            if max_coeff >= cwt_thresh:
                valid_times.append(times_arr[peak])
                valid_heights.append(metric[peak])
                valid_uncerts.append(uncertainties[peak])

        if len(valid_times) == 0:
            return np.array([]), np.array([]), np.array([])
        return np.array(valid_times), np.array(valid_heights), np.array(valid_uncerts)

    peak_times, peak_heights, peak_deltat = multi_resolution_thresholding(tf_metric, metric_times)
    return peak_times, peak_heights, peak_deltat

hewang@ucas.ac.cn

Interpretability Analysis: Generalization

He Wang | ICTP-AP, UCAS

Interpretable Gravitational Wave Data Analysis with DL and LLMs

HW et al., In preparation

Out-of-distribution (OOD) detection

  • The process of identifying data points (1 day) that are not representative of the data distribution the model was trained on (7 days).

Explainable Robustness

  • Assess the top 30 algorithms on the 1-day test dataset, fine-tuning trigger uncertainty for robust with a certain level of interpretability.

hewang@ucas.ac.cn

Interpretability Analysis

He Wang | ICTP-AP, UCAS

Interpretable Gravitational Wave Data Analysis with DL and LLMs

HW et al., In preparation

Out-of-distribution (OOD) detection

  • Generalization capability and robustness of the optimized algorithms

MCTS Depth-Stratified Performance Analysis.

  • Analyzed the relationship between MCTS tree depth and algorithm fitness across different optimization phases. The 10-layer MCTS structure was stratified into three depth groups: Depth I (depths 1-4), Depth II (depths 5-7), and Depth III (depths 8-10), representing shallow, intermediate, and deep exploration levels, respectively.

hewang@ucas.ac.cn

Algorithmic Component Impact Analysis.

  • A comprehensive technique impact analysis using controlled comparative methodology

GW150914

Framework Mechanism Analysis

He Wang | ICTP-AP, UCAS

Interpretable Gravitational Wave Data Analysis with DL and LLMs

HW et al., In preparation

Effect of scale

  • Ablation study of various LLM contributions (code generator) and their robustness (Each curve is averaged over at least 5 runs)

Contributions of knowledge synthesis

  • Compare to w/o external knowledge (linear only; no content used)

hewang@ucas.ac.cn

He Wang | ICTP-AP, UCAS

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

Interpretable Gravitational Wave Data Analysis with DL and LLMs

🎯 OUR WORK

hewang@ucas.ac.cn

引力波数据分析:知识框架

He Wang | ICTP-AP, UCAS

Interpretable Gravitational Wave Data Analysis with DL and LLMs

hewang@ucas.ac.cn

  1. 理论基础:

    • 引力波物理

    • 数字信号处理

    • 数理统计

  2. 编程基础:

    •  

    •  

    •  

  3. 硬件基础:

    •  

    •  

Miller, M.C., Yunes, N. The new frontier of gravitational waves. Nature 568, 469–476 (2019).

引力波物理与引力波天文学

数字信号处理

R.C. Cofer, Benjamin F. Harding, in Rapid System Prototyping with FPGAs, 2006

Dieter Rasch, Dieter Schott. Mathematical Statistics, (2018)

数理统计

引力波数据分析:知识框架

He Wang | ICTP-AP, UCAS

Interpretable Gravitational Wave Data Analysis with DL and LLMs

hewang@ucas.ac.cn

  1. 理论基础:

    • 引力波物理 (pycbc, lalsuite, lisacode, bilby, ... )

    • 数字信号处理 (scipy, stat, ...)

    • 数理统计 (bilby, emcee, ptemcee, ptmcmc, …)

  2. 编程基础:

    • Python (numpy, pandas; matplotlib; ...),

    • AI (scikit-learn, XGBoost, PyTorch, TensorFlow, JAX, ...)

    • Linux (docker, github, bash, vim, emacs …)

  3. 硬件基础:

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

Interpretable Gravitational Wave Data Analysis with DL and LLMs

hewang@ucas.ac.cn

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

Interpretable Gravitational Wave Data Analysis with DL and LLMs

hewang@ucas.ac.cn

He Wang | ICTP-AP, UCAS

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.

hewang@ucas.ac.cn

Interpretable Gravitational Wave Data Analysis with DL and LLMs

  • 引力波物理和引力波天文学
  • 引力波数据分析
  • 人工智能时代下的科学研究
    • 乐观?悲观?
    • 探索物理的新途径 + 理解问题的新视角
for _ in range(num_of_audiences):
    print('Thank you for your attention! 🙏')
He Wang | ICTP-AP, UCAS

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

Interpretable Gravitational Wave Data Analysis with DL and LLMs

🤖 Black-Box AI

Powerful but opaque

🌊 GW Data

Deep Neural
Network

✓ High performance
✗ "Black box"

Detection Result

🧠 CNN, DINGO, ResNet, ...
~95% sensitivity @ 1/month FAR

📐 Traditional Physics

Trusted but limited

🌊 GW Data

Human-Designed
Algorithm

✓ Interpretable
✗ Performance ceiling

Detection Result

📊 Matched Filtering, χ² tests, ...
~90% sensitivity @ 1/month FAR

Key Innovation: Agent-based LLMs iteratively optimize physics-based algorithms,
creating transparent AI systems that scientists can trust and understand

Algorithm Optimization

Best of both worlds!

🌊 GW Data

Physics-Informed
Algorithm

✓ Interpretable
✓ High performance

Detection Result

🚀 Automated Heuristic Design
Target: >95% sensitivity with interpretability

📚 Physics
Knowledge

🤖 AI Agent
Optimizer

Interpretable AI for GW Detection

Combining the interpretability of physics with the power of AI

🎯 OUR WORK

He Wang | ICTP-AP, UCAS

Interpretable Gravitational Wave Data Analysis with DL and LLMs

hewang@ucas.ac.cn

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 1-1000 false alarms per-month range, balancing detection sensitivity and false alarm rates across algorithm generations

He Wang | ICTP-AP, UCAS

Our 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

Interpretable Gravitational Wave Data Analysis with DL and LLMs

MLGWSC1 Benchmark: Optimization Performance Results

Preliminary Results (February 2025)

Optimization Progress & Algorithm Diversity

He Wang | ICTP-AP, UCAS

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.

Optimization Target: Maximizing Area Under Curve (AUC) in the 1-1000 false alarms per-month range, balancing detection sensitivity and false alarm rates across algorithm generations

Interpretable Gravitational Wave Data Analysis with DL and LLMs

Our framework (agent-based 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

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

Optimization Target: Maximizing Area Under Curve (AUC) in the 1-1000 false alarms per-month range, balancing detection sensitivity and false alarm rates across algorithm generations

PyCBC (linear-like)

cWB (linear-like)

Simple non-linear filters

CNN-like (highly non-linear)

Interpretable Gravitational Wave Data Analysis with DL and LLMs

Key Questions

Q1: Can LLMs truly generate novel content beyond their training data?

Q2: Why can LLMs perform reasoning in ways that remain imperceptible to us?

He Wang | ICTP-AP, UCAS

Interpretable Gravitational Wave Data Analysis with DL and LLMs

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

GPT-3 (2020)

ChatGPT (2022)

Magic: Code + Text

Interpretable Gravitational Wave Data Analysis with DL and LLMs

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

The Optimization Potential of Large Language Models

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

Interpretable Gravitational Wave Data Analysis with DL and LLMs

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

Interpretable Gravitational Wave Data Analysis with DL and LLMs

Theoretical Understanding of LLMs' Emergent Abilities

Real-world Case: FunSearch (Nature, 2023)

  • Google DeepMind's FunSearch system pairs LLMs with evaluators in an evolutionary process
  • Discovered new mathematical knowledge for the cap set problem in combinatorics, improving on best known bounds
  • Also created novel algorithms for online bin packing that outperform traditional methods
  • Demonstrates LLMs can make verifiable scientific discoveries beyond their training data
He Wang | ICTP-AP, UCAS

Interpretable Gravitational Wave Data Analysis with DL and LLMs

Key Questions

Q1: Can LLMs truly generate novel content beyond their training data?

Q2: Why can LLMs perform reasoning in ways that remain imperceptible to us?

He Wang | ICTP-AP, UCAS

Interpretable Gravitational Wave Data Analysis with DL and LLMs

Iterative Inference: The New Frontier of LLM Scaling

He Wang | ICTP-AP, UCAS

📄 Google DeepMind: "Scaling LLM Test-Time Compute Optimally" (arXiv:2408.03314)

🔗 OpenAI: Learning to Reason with LLMs

Iterative refinement during inference dramatically improves reasoning capabilities without increasing model size or retraining

Performance improvements with test-time compute scaling

From pre-training to test-time:
Three scaling regimes

Different search methods for iterative reasoning

Interpretable Gravitational Wave Data Analysis with DL and LLMs

He Wang | ICTP-AP, UCAS

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
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

Interpretable Gravitational Wave Data Analysis with DL and LLMs

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

Interpretable Gravitational Wave Data Analysis with DL and LLMs

He Wang | ICTP-AP, UCAS

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

Interpretable Gravitational Wave Data Analysis with DL and LLMs

Key Questions

Q1: Can LLMs truly generate novel content beyond their training data?

Q2: Why can LLMs perform reasoning in ways that remain imperceptible to us?

He Wang | ICTP-AP, UCAS

Interpretable Gravitational Wave Data Analysis with DL and LLMs

Q3: Why should you consider applying ML to gravitational wave astrophysics?

Why should you consider applying ML to gravitational wave astrophysics?

He Wang | ICTP-AP, UCAS

Interpretable Gravitational Wave Data Analysis with DL and LLMs

 

我们为什么要考虑用 AI tool 来替换传统方法做研究呢?

hewang@ucas.ac.cn

He Wang | ICTP-AP, UCAS

The Rise of Machine Learning

AI is taking over the world... literally everywhere

Interpretable Gravitational Wave Data Analysis with DL and LLMs

hewang@ucas.ac.cn

He Wang | ICTP-AP, UCAS

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)

Interpretable Gravitational Wave Data Analysis with DL and LLMs

 

严肃的讲,上述 motivation 并不应该是成为从事科学研究的思路和方向。

hewang@ucas.ac.cn

He Wang | ICTP-AP, UCAS

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)

Interpretable Gravitational Wave Data Analysis with DL and LLMs

hewang@ucas.ac.cn

He Wang | ICTP-AP, UCAS

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)

Interpretable Gravitational Wave Data Analysis with DL and LLMs

hewang@ucas.ac.cn

但杀鸡焉用牛刀?!

He Wang | ICTP-AP, UCAS

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_

Interpretable Gravitational Wave Data Analysis with DL and LLMs

hewang@ucas.ac.cn

本质上,都可以归结为“黑箱”或“可解释性差”的问题

He Wang | ICTP-AP, UCAS

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.

Interpretable Gravitational Wave Data Analysis with DL and LLMs

hewang@ucas.ac.cn

尽管种种,还是应该报以理性的期待和足够的乐观

Key Questions

Q1: Can LLMs truly generate novel content beyond their training data?

Q2: Why can LLMs perform reasoning in ways that remain imperceptible to us?

He Wang | ICTP-AP, UCAS

Interpretable Gravitational Wave Data Analysis with DL and LLMs

Q4:In general, how to use AI for science?

Q3: Why should you consider applying ML to gravitational wave astrophysics?

Application of AI

Interpretable Gravitational Wave Data Analysis with DL and LLMs

He Wang | ICTP-AP, UCAS

hewang@ucas.ac.cn

Gebru et al. ICCV (2017)

Zhou et al. CVPR (2018)

Shen et al. CVPR (2018)

Image courtesy of Tesla (2020)

从AI应用的原理理解技术相同点

eg: GW search

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

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

Interpretable Gravitational Wave Data Analysis with DL and LLMs

hewang@ucas.ac.cn

AI for Science

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

From 李宏毅

Interpretable Gravitational Wave Data Analysis with DL and LLMs

He Wang | ICTP-AP, UCAS

hewang@ucas.ac.cn

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

AI for Science

Interpretable Gravitational Wave Data Analysis with DL and LLMs

He Wang | ICTP-AP, UCAS

Test of General Relatively

2403.18936

hewang@ucas.ac.cn

2407.07229

2103.01641

Key Questions

Q1: Can LLMs truly generate novel content beyond their training data?

Q2: Why can LLMs perform reasoning in ways that remain imperceptible to us?

Q3: Does our framework require special design to achieve these capabilities?

He Wang | ICTP-AP, UCAS

Interpretable Gravitational Wave Data Analysis with DL and LLMs

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?

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:

  1. hard control for opt direction(when to balance between exploration and exploitation)
  2. sensitive to prompt template / LLM version;
  3. 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

自己实验的符号回归

Mathematics of HAD ?

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)

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

可解释 AI 与强化学习协同驱动的引力波数据处理新方法探索

By He Wang

可解释 AI 与强化学习协同驱动的引力波数据处理新方法探索

2025/08/08 11:30-12:00 @某温泉酒店

  • 12