ChatBCI, a P300 speller BCI with context-driven word prediction leveraging large language models, from concept to evaluation
摘要
P300 speller brain computer interfaces (BCIs) allow users to compose sentences by selecting target keys on a graphical user interface (GUI) through the detection of P300 component in their electroencephalogram (EEG) signals following visual stimuli. Most existing P300 speller BCIs require users to spell all or the first few initial letters of the intended word, letter by letter. Consequently, a large number of keystrokes could be required to write an intended sentence, thereby, increasing user’s time and cognitive load. There is a need for more efficient and user-friendly methods for faster, and practical sentence composition. In this work, we introduce ChatBCI, a P300 speller BCI that leverages the zero-shot learning capabilities of large language models (LLMs) to suggest words from user-spelled initial letters or predict the subsequent word(s), reducing keystrokes and accelerating sentence composition. ChatBCI retrieves word suggestions through remote queries to the GPT-3.5 API. A modified GUI, displaying GPT-3.5 word suggestions as extra keys is designed. Stepwise linear discriminant analysis (SWLDA) is used for the P300 classification. Seven subjects completed two online spelling tasks: 1) copy-spelling a self-composed sentence using ChatBCI, and 2) improvising a sentence using ChatBCI’s word suggestions. Results demonstrate that for the copy-spelling task, on average, ChatBCI outperforms letter-by-letter BCI spellers, reducing time and keystrokes by