Postprocessing of P300 Speller Output with a Large Language Model
Discuss this preprint
Start a discussion What are Sciety discussions?Listed in
This article is not in any list yet, why not save it to one of your lists.Abstract
P300 spellers convert electroencephalographic (EEG) activity into text by presenting users with a matrix of flickering characters. While these systems can achieve high classification accuracy, communication is severely slowed by the need for many stimulus repetitions to obtain a reliable signal. Reducing repetitions accelerates spelling but introduces character-level errors: insertions, deletions, and substitutions that degrade usability and increase user fatigue. Although substantial research has focused on improving performance at the signal acquisition and decoding stages, here we investigate a complementary text post-processing approach that leverages large language models (LLMs) to restore corrupted P300 speller output. We constructed a dataset derived from cLang-8 and simulated realistic P300-style text corruption using both random and empirically derived human-like error strategies. We evaluated several instruction-tuned LLMs alongside an optical character recognition (OCR)-fine-tuned ByT5 model under zero-shot and few-shot prompting conditions. We found that LLMs effectively recovered clean text from noisy inputs. Models employing SentencePiece tokenization consistently outperformed byte-pair encoding (BPE)-based counterparts, and few-shot in-context learning further improved restoration accuracy, with Gemma 3 achieving the strongest performance across all settings. These results suggest that LLM-based post-processing could enable P300 speller systems to operate with fewer repetitions and lower latency while maintaining or improving output accuracy, offering a practical path toward more efficient daily communication for users with motor and speech disabilities.