低通道EEG智能体的边界感知上下文锚定机制
Boundary-Aware Context Grounding for A Low-Channel EEG Agent
摘要
大型语言模型可以使得科学软件更易于使用。然而,通用模型并不自动知道某个传感器能够支持哪些测量方式、当前软件中使用了哪些算法,以及哪些结论可以通过计算结果来验证。这些细节对于低通道脑电图技术来说尤为重要,因为稀疏的空间覆盖和不稳定的信号质量容易导致各种无根据的解释出现。我们提出了NeuraDock Agent这一开源架构,它将确定性本地脑电图处理引擎与考虑硬件特性的语言层分开处理。该数值处理引擎负责解析数据、进行质量检查、执行经过验证的频谱处理流程,并生成机器可读取的文件。而大型语言模型则只接收简洁且经过筛选的摘要信息以及带有版本信息的上下文数据。该上下文数据包含了七通道硬件信息、经过验证的处理流程、结果字段、实现限制、科学限制以及参考案例等内容。原始脑电图数据以及每样本的密集数据仍然保留在本地。 我们在三个层面对该系统进行了评估。首先,12次数据记录在十次重复实验中都得到了相同的结果;而完整的Rest/Task运行则在三次重复实验中也得到了相同的结果、报告和图表哈希值。其次,通过请求捕获和故障注入实验,确认了在HTTP传输、异常输出以及连接失败情况下,测试数据的保留情况以及本地数据的保存机制。第三,通过边界感知测试,我们在四种上下文设置和两种大型语言模型下对36个普通问题和对抗性问题进行了测试,得到了288个输出结果。这些结果表明,考虑硬件和实现限制的机制确实有助于确定脑电图代理所接受、符合或拒绝的内容;不过,这些结果并未证明其临床有效性或某种有效的认知负荷指标的有效性。
English Abstract
Large language models (LLMs) can make scientific software easier to use. However, a general model does not automatically know which measurements a particular sensor can support, which algorithms are implemented in the current software, or which conclusions are justified by a computed result. These distinctions are especially important for low-channel electroencephalography (EEG), where sparse spatial coverage and variable signal quality make plausible but unsupported interpretations easy to produce. We present NeuraDock Agent, an open-source architecture that separates a deterministic local EEG engine from a hardware-aware language layer. The numerical engine parses recordings, performs quality control, executes reviewed spectral workflows, and writes machine-readable artifacts. The LLM receives only a compact, allowlisted summary and a versioned context pack. The context describes the seven-channel hardware, reviewed workflows, result fields, implementation boundaries, scientific limits, and reference cases. Raw EEG and dense per-sample arrays remain local We evaluate the system at three levels. First, 12 recordings produced identical structured results over ten numerical repetitions, and a complete Rest/Task run produced identical result, report, and figure hashes over three repetitions. Second, request-capture and failure-injection experiments confirmed the tested data boundary and preservation of local artifacts under HTTP, malformed-output, and connection failures. Third, a boundary-awareness benchmark tested 36 ordinary and adversarial questions under four context ablations and two LLMs, yielding 288 outputs.These results support hardware- and implementation-aware grounding as a practical mechanism for calibrating what an EEG agent accepts, qualifies, or refuses; they do not establish clinical validity or a validated absolute cognitive-load index.