TL;DR
Can Large Language Models (LLMs) act as reliable copilots for processing complex sensor data? This paper introduces SensorBench, a systematic benchmark evaluating LLMs on digital signal processing (DSP) tasks. The findings reveal that while LLMs match human experts on simple, API-driven tasks, they fall significantly short on complex, compositional tasks requiring parameter tuning—though advanced prompting like self-verification can narrow the gap.
What Problem Does This Paper Address?
Sensor data processing (from ECGs to audio and machine vibrations) underpins modern IoT and cyber-physical systems. Traditionally, extracting meaning from these streams requires deep expertise in digital signal processing (DSP) to filter noise, detect outliers, and reconstruct signals.
While recent studies hint that LLMs can assist in analyzing this data, the research has been highly fragmented, using inconsistent datasets and metrics. Moreover, there is skepticism about whether LLMs can handle the multi-step planning and reasoning required to build robust signal-processing pipelines. The authors address this by creating a unified, rigorous benchmark to evaluate LLMs against human experts.
Methods
The authors evaluate four leading LLMs (GPT-4o, GPT-4, GPT-3.5-turbo, and Llama-3.1-70b) across three interaction modalities:
- Coding with APIs: The LLM writes code leveraging standard libraries like
scipyandnumpy. - Coding without APIs: The LLM writes raw Python algorithms from scratch.
- Text-based interaction: Pure conversational analysis of digitized signal values.
To boost performance, they test advanced prompting strategies: Chain-of-Thought (CoT), ReAct, and Self-verification (which uses an LLM-backed internal sanity checker to iteratively refine code over up to 5 rounds). They also explore supervised fine-tuning (SFT) via LoRA on a custom-built dataset of 11,266 DSP query-response pairs.
Datasets
The authors introduce SensorBench, which categorizes tasks by difficulty based on whether they are single vs. compositional and parameterized vs. non-parameterized.
SensorBench comprises 11 distinct tasks across 9 data modalities, yielding 25 unique modality-task pairs (totaling 250 challenges). It incorporates real-world datasets including:
- ECG & PPG data (Goldberger et al. / Zhang et al.) for imputation, extrapolation, and heart rate calculation.
- Gait/Pressure data (Luo et al.) for delay and period detection.
- Spoken Digits audio data (Jackson et al.) for speech filtering and echo cancellation.
- Yahoo network traffic data for outlier detection.
Key Insights and Ideas
- Knowledge Retrieval vs. Actual Reasoning: LLMs excel at tasks that can be solved by simply recalling and calling a standard API function (e.g., applying a standard bandpass filter to an ECG signal). However, they fail when they must dynamically analyze a signal to select parameters (e.g., guessing the exact stop-band frequency for an audio signal without actual spectral analysis).
- The Power of Self-Correction: Mimicking a human engineer's trial-and-error process via Self-verification prompting yields massive improvements. Giving the model an automated way to run sanity checks and reflect on execution errors prevents common hallucinations.
- Diminishing Returns of Fine-Tuning: Fine-tuning significantly boosts smaller models (Llama-3B), but provides almost no benefit to larger models (Llama-70B). This suggests large models already possess the necessary domain knowledge; their bottleneck is core architectural reasoning and planning, not a lack of data.
Key Results
- Coding with APIs Wins: LLMs perform best when allowed to use predefined libraries, consistently outperforming text-only or raw coding approaches.
- The Expert Gap: Human experts significantly outperform LLMs on complex tasks like change point detection, speech filtering, outlier detection, and echo cancellation—often by over 50% in metrics like Signal-to-Distortion Ratio (SDR) or F1 score.
- LLMs Tie on Simple Tasks: On straightforward tasks (difficulty score $\le$ 3) like ECG filtering, resampling, and signal imputation, LLMs achieve parity with human experts.
- Prompting Breakthrough: On GPT-4o, the Self-verification strategy emerged as the most effective approach, achieving a 48% win rate across tasks and dropping the failure rate to just 5.75%.
Limitations and Future Work
- Single-Channel Focus: The current benchmark is limited to single-channel temporal sensor signals. Real-world applications often require spatiotemporal and multimodal sensor fusion (e.g., combining video + IMU data).
- Alternative Modalities Ignored: The study does not explore feeding raw sensor data into LLMs via alternative representations, such as tokenized/quantized discrete data or visual spectrograms.
- Small Human Baseline: The human baseline relies on only three engineering experts, which may limit the generalizability of the comparative findings.
Summary updated