| name | llm-eeg-graph-refinement |
| description | LLM as Clinical Graph Structure Refiner for EEG seizure diagnosis. Two-stage framework using LLMs to refine graph edges for cleaner, more interpretable graph representations in automated seizure detection. Accepted by IJCAI-ECAI 2026. |
| version | 1.0.0 |
| author | Research Synthesis |
| license | MIT |
| metadata | {"hermes":{"tags":["eeg","seizure-detection","graph-neural-network","llm","clinical-ai","graph-refinement"],"source_paper":"LLM as Clinical Graph Structure Refiner: Enhancing Representation Learning in EEG Seizure Diagnosis (arXiv:2604.28178)","citations":0,"venue":"IJCAI-ECAI 2026"}} |
LLM-EEG Graph Refinement
Overview
Methodology from arXiv:2604.28178 (accepted by IJCAI-ECAI 2026). Uses Large Language Models as clinical graph structure refiners to enhance EEG representation learning for automated seizure detection. Addresses the problem of redundant/irrelevant edges in graph construction from noisy EEG data.
Core Problem
EEG signals are inherently noisy, making robust graph construction challenging. Existing methods (correlation-based or learning-based) often generate:
- Redundant edges between unrelated channels
- Irrelevant connections that impair downstream task performance
- Uninterpretable graph structures for clinical use
Two-Stage Framework
Stage 1: LLM-Based Edge Refinement (Verification)
- Construct initial graph using correlation or learning-based methods
- Extract features for each node pair:
- Statistical features (correlation, coherence, mutual information)
- Textual descriptions of channel properties (anatomical location, frequency band)
- Prompt LLM to decide whether each edge should exist
- Remove edges deemed redundant by LLM
- Verify improvement in seizure detection accuracy
Stage 2: Robust Graph Learning Pipeline
Raw EEG โ Transformer Edge Predictor โ MLP Scoring โ Threshold โ Initial Graph โ LLM Refiner โ Refined Graph โ GNN โ Seizure Classification
Components:
- Transformer-based edge predictor: Assigns probability scores to potential edges
- Multilayer Perceptron (MLP): Processes node pair features
- Threshold mechanism: Determines edge existence based on probability scores
- LLM edge set refiner: Makes informed decisions using textual + statistical features
Key Insights
- LLMs understand clinical context: LLMs can leverage medical knowledge to identify which EEG channel connections are physiologically meaningful vs. spurious
- Graph quality matters more than quantity: Fewer, cleaner edges yield better GNN performance than dense, noisy graphs
- Interpretability improves: LLM-refined graphs produce more clinically meaningful connectivity patterns
- Two-stage validation: First verify LLM can improve graphs, then build robust pipeline
Implementation Pattern
import torch
import torch.nn as nn
from transformers import AutoTokenizer, AutoModelForCausalLLM
class EEGEdgeRefiner:
"""LLM-based EEG graph edge refinement."""
def __init__(self, llm_name="meta-llama/Llama-3-8b"):
self.tokenizer = AutoTokenizer.from_pretrained(llm_name)
self.llm = AutoModelForCausalLLM.from_pretrained(llm_name)
def extract_node_features(self, eeg_data, channel_info):
"""Extract statistical and textual features for each channel pair."""
corr_matrix = torch.corrcoef(eeg_data)
coherence = compute_coherence(eeg_data)
features = []
for i in range(eeg_data.shape[0]):
for j in range(i+1, eeg_data.shape[0]):
feat = {
'correlation': corr_matrix[i, j].item(),
'coherence': coherence[i, j].item(),
'channel_i': channel_info[i],
'channel_j': channel_info[j],
}
features.append(feat)
return features
def llm_refine_edges(self, features, threshold=):
refined_edges = []
feat features:
prompt = ._build_prompt(feat)
decision = ._query_llm(prompt)
decision[]:
refined_edges.append({
: feat[],
: feat[],
: feat[],
: decision[]
})
refined_edges
():
():
inputs = .tokenizer(prompt, return_tensors=)
outputs = .llm.generate(**inputs, max_new_tokens=)
response = .tokenizer.decode(outputs[], skip_special_tokens=)
{: , : }
Applications
- Automated seizure detection: Cleaner graphs improve GNN classification accuracy
- Clinical decision support: Interpretable connectivity patterns aid neurologists
- Epilepsy focus localization: Refined graphs highlight pathological connections
- EEG biomarker discovery: Remove noise-induced spurious connections
Limitations
- LLM inference adds computational overhead
- Requires careful prompt engineering for clinical accuracy
- Performance depends on LLM's medical knowledge
- May not generalize across different EEG montages without adaptation
References
- Li, L., Chen, Z., & Dong, Y. (2026). "LLM as Clinical Graph Structure Refiner: Enhancing Representation Learning in EEG Seizure Diagnosis." arXiv:2604.28178. Accepted by IJCAI-ECAI 2026.
- TUSZ (Temple University Seizure) dataset for evaluation
Related Skills
- [[eeg-hopfield-emotion-energy]] - EEG-based Hopfield energy analysis
- [[brain-graph-neural]] - Graph Neural Network methods for brain connectivity
- [[explainable-gnn-eeg-neurological]] - Explainable GNN for EEG evaluation
- [[irene-eeg-seizure-detection]] - Information Bottleneck-guided EEG seizure detection
Activation Keywords
- llm eeg graph refinement
- clinical graph structure refiner
- EEG seizure detection LLM
- graph edge refinement
- ่็ตๅพๅพ็ปๆไผๅ
- LLM ่็ตๅพ
- seizure diagnosis graph