Source-linked AI summary
Structured Driving-State Narratives for Small Language Model-Based GNSS Spoofing Detection
Abyad Enan, Sagar Dasgupta, Mizanur Rahman, Mashrur Chowdhury
TL;DR
GNSS spoofing can make autonomous-vehicle states appear plausible but incorrect, creating a need for reliable onboard detection and classification. The paper converts independently derived GNSS and sensor driving states into structured narratives for SLM classification, achieving performance comparable to LLMs while using less computational resources.
Problem
The study examines whether structured driving-state narratives can enable accurate, low-latency detection and classification of sophisticated GNSS spoofing attacks in autonomous vehicles.
Method
The framework compares independently derived GNSS and sensor states encoded as structured narratives, which a fine-tuned SLM uses to classify normal driving and four spoofing scenarios.
Results
96.99% accuracy and 97.18% macro F1-score were achieved by the best-performing SLM, which performed comparably to the evaluated LLMs on held-out data.
Takeaways & Limitations
The framework supports real-time GNSS spoofing detection and classification with relatively low computational and memory requirements for resource-constrained vehicular platforms.
Takeaways & Limitations
Broader geographic generalizability remains unestablished because additional regions and driving conditions require evaluation.
Abstract
from arXiv · showhide
Autonomous vehicles (AVs) depend on reliable Global Navigation Satellite System (GNSS) positioning. However, spoofed GNSS signals can induce plausible but incorrect vehicle states. This study develops a small language model (SLM)-based framework for detecting and classifying GNSS spoofing attacks by comparing vehicle behaviors independently derived from GNSS and other sensing sources. The framework converts independent driving states from GNSS and other sensing sources into structured semantic narratives that are provided to an SLM for spoofing detection and attack classification. The performance of the SLM-based framework is compared with large language models (LLMs) fine-tuned on identical training data and evaluated on the same test set. The evaluation considers five classes: no attack, overshoot attack, stopped attack, turn-by-turn attack, and wrong-turn attack. The framework is also evaluated with geographically unseen field data collected in Clemson, South Carolina, United States. Experimental results indicate that the evaluated SLMs achieve performance similar to the LLMs, achieving an average accuracy of 96.99%, precision of 99.05%, recall of 95.59%, and F1-score of 97.18%. In terms of computational efficiency and resource utilization, the SLMs demonstrate advantages over the LLMs by requiring lower inference latency and less GPU memory during both fine-tuning and inference. Evaluation using field data collected in a geographically distinct location further demonstrated its efficacy. The presented framework can detect and classify GNSS spoofing attacks in real-time while requiring relatively low computational and memory resources, and is therefore suitable for deployment on resource-constrained vehicular computing platforms.
INTRODUCTION
The introduction motivates semantic consistency analysis for GNSS spoofing detection because sophisticated attacks can preserve plausible signal behavior. It presents a structured-narrative framework in which an SLM compares independently derived GNSS and onboard-sensor vehicle states for unified multiclass classification.
- AVs rely on trustworthy GNSS-derived position, velocity, and timing solutions for safety-critical functions including localization, planning, trajectory following, and turning decisions.
- Existing signal-level and multi-sensor methods face limitations when sophisticated or gradual spoofing attacks preserve plausible signal behavior.
- The proposed approach converts independently derived GNSS and onboard-sensor movement, maneuver, speed, and heading states into structured textual narratives for semantic consistency evaluation.
- The study investigates whether structured narratives enable spoofing detection, discrimination among stopped, overshoot, turn-by-turn, and wrong-turn attacks, low detection latency, and effective onboard monitoring.
- A fine-tuned SLM performs unified multiclass classification of normal behavior and four sophisticated spoofing scenarios without processing raw sensor time-series data.
DATA PREPARATION
The study prepares synchronized KITTI benchmark data and geographically distinct field data by deriving GNSS and independent vehicle-motion streams for driving-state comparison. Routes are segmented by movement and maneuvers to construct the evaluated spoofing scenarios.
- KITTI benchmark data: KITTI provides synchronized camera, LiDAR, GNSS, and inertial-navigation data across urban, rural, and highway driving conditions.The vehicle used an OXTS RT3003 GNSS and inertial navigation system, supplying position and motion variables for scenario construction.
- State-stream construction: Latitude and longitude form the GNSS position stream, while OXTS motion-state outputs provide the independent comparison stream.Recorded variables include position, heading, speed, acceleration, angular rate, accuracy indicators, satellite information, and navigation-status fields.
- Sampling and scenario generation: The OXTS unit operates at 100 Hz, whereas KITTI measurements are synchronized at 10 Hz for analysis.Routes are plotted and segmented according to vehicle movement and maneuvers before generating stopped, overshoot, turn-by-turn, and wrong-turn scenarios.
- Field-data preparation: Field data use a Cohda Wireless MK6C platform with multi-constellation GNSS and dual CAN interfaces recorded at 10 Hz.GNSS supplies latitude and longitude, while CAN supplies vehicle speed and heading-related kinematic measurements, matching KITTI’s sampling frequency.
SLM-BASED ATTACK DETECTION FRAMEWORK · System Overview
The framework detects GNSS spoofing by comparing independently derived vehicle states from GNSS and GNSS-independent onboard sensors. It converts these comparisons into structured representations for an SLM to evaluate semantic consistency.
- System Overview: The framework detects spoofing by examining consistency between vehicle states independently obtained from GNSS and other onboard sensors.GNSS supplies latitude and longitude, while other sensors supply vehicle speed and heading.
- System Overview: GNSS coordinates are compared with corresponding vehicle states derived from GNSS-independent onboard sensors.For KITTI-based development and evaluation, the framework compares states derived from GNSS coordinates with corresponding sensor-derived states.
- System Overview: During vehicle operation, the system collects GNSS latitude and longitude sequences together with onboard speed and heading measurements.These measurements form the two independent sources used for state comparison.
- System Overview: Displacements between consecutive GNSS coordinates estimate GNSS-based speed, while movement directions between coordinates determine GNSS-based heading.Both quantities are derived from successive latitude and longitude observations.
- System Overview: The resulting features are converted into a structured representation that can be processed by an SLM.Each instance describes the vehicle state inferred from GNSS and the corresponding state obtained from other sensors.
- System Overview: The SLM evaluates semantic consistency between the two independently derived vehicle states.The representation supports comparisons such as GNSS indicating motion while a motion sensor indicates stopping, or differing turn directions.
Data Acquisition and Preprocessing
The framework synchronizes and processes GNSS and sensor measurements into window-level movement and maneuver states, then converts them into structured narratives for SLM classification. These narratives preserve categorical states and numerical differences between sensing modalities.
- Data synchronization: Measurements are already synchronized at 10 Hz, timestamped, and use latitude, longitude, GNSS speed, and heading as GNSS inputs.No further synchronization is required because the data are already synchronized.
- GNSS-derived measurements: Distance is computed with the Haversine formula, while GNSS speed uses ∆t = 0.1 second and is converted from km/s to mph by multiplying by 2236.94.The heading is calculated in radians from successive coordinate measurements.
- Driving state extraction: Fixed-length temporal windows reduce isolated sensor noise and convert continuous measurements into interpretable vehicle-behavior descriptions.Each window contains consecutive timestamped data and represents a short interval of vehicle operation.
- Movement classification: Movement is labeled moving or stopped using each modality’s average window speed, with 1 mph selected because GNSS and OXTS agree on stopped status in approximately 99% of unspoofed training windows.Speeds below 1 mph are labeled stopped; otherwise, the state is moving.
- Maneuver classification: Maneuver states are inferred from circularity-adjusted heading change, with |∆θ| ≥ T indicating a turning window and direction distinguishing left from right turns.Heading change compares the first and last measurements in each observation window.
- Narrative construction: A deterministic narrative template presents GNSS- and sensor-derived movement, turn, speed, and final-heading attributes, retaining numerical values to expose modality differences.The model receives structured system and user messages during inference, while the assistant label is used as the supervised ground truth during training.
EXPERIMENTS AND RESULTS · SLM Fine-Tuning
The study fine-tunes two instruction-tuned small language models selected for resource-constrained deployment and compares them with larger baseline language models under controlled conditions. All models use identical data and fine-tuning procedures, with model-specific chat templates accommodating architectural differences.
- SLM Fine-Tuning: Qwen3-1.7B and Llama-3.2-1B-Instruct are selected as instruction-tuned SLMs for GNSS spoofing detection.Their parameter sizes are 1.7 billion and 1.23 billion, respectively, supporting potentially edge-based deployment while retaining instruction-following capabilities.
- SLM Fine-Tuning: Qwen3-8B and Mistral-7B-Instruct-v0.3 serve as baseline LLMs to test whether larger models improve performance.The comparison evaluates whether any performance gains justify the larger models.
- SLM Fine-Tuning: All models share the same data partitions, feature order, class definitions, output requirements, and LoRA-based fine-tuning procedure.Model-specific chat templates accommodate differences in tokenizer and architecture, preserving a controlled comparison.
Evaluation of the Detection Framework
The evaluated models achieved high spoofing-detection performance, with Qwen3-1.7B matching the highest accuracy and attaining the best macro precision and F1-score. It also offered lower latency, GPU-memory use, and fine-tuning time, while transferring effectively to geographically unseen field data.
- Held-out test-set performance: 96.99% accuracy and 97.18% macro F1-score were achieved by Qwen3-1.7B, which also attained the highest macro precision at 99.05%.Mistral-7B shared the highest accuracy of 96.99%.
- Class-wise performance: Perfect precision, recall, and F1-score were achieved for stopped attacks by all models, while Qwen3-1.7B correctly identified every no-attack observation.Qwen3-1.7B also achieved the highest no-attack F1-score at 97.57%, indicating no false alarms.
- Computational efficiency: 81.62% lower average inference latency was achieved by Qwen3-1.7B versus Mistral-7B, while its overall runtime was 81.44% lower.Its inference latency was also 22.29% lower than Qwen3-8B, and Mistral-7B required approximately 5.44 times longer per observation window.
- Resource utilization: 2.30 GB peak training GPU memory was used by Qwen3-1.7B, 85.99% less than Qwen3-8B and 83.33% less than Mistral-7B.Qwen3-1.7B also reduced fine-tuning time by 64.9% versus Qwen3-8B and 88.24% versus Mistral-7B.
- Evaluation on unseen field data: Comparable performance on geographically independent Clemson field data indicated that the framework transferred learned relationships between GNSS- and IMU-derived vehicle states.Broader geographic generalizability would require evaluation across additional regions and driving conditions.