面向低通道脑电代理的边界感知上下文基础
Boundary-Aware Context Grounding for A Low-Channel EEG Agent
June 25, 2026
作者: Zhiyuan Xu, Yueqing Dai, Junling Li, Junwen Luo
cs.AI
摘要
大型语言模型可提升科学软件易用性,但通用模型无法自动获知特定传感器支持的测量类型、当前软件实现的算法,或计算结果可证实的结论。这些区分对低通道脑电图尤为重要——稀疏的空间覆盖与多变的信号质量,容易产生看似合理但缺乏依据的解释。我们提出NeuraDock Agent这一开源架构,将确定性的本地脑电图计算引擎与感知硬件的语言层分离。数值引擎负责解析记录、执行质量控制、运行经审阅的频谱工作流程,并生成机器可读的工件。语言模型仅接收精简的白名单摘要与带版本控制的上下文包,内容包括七通道硬件说明、经审阅的工作流程、结果字段、实现边界、科学限制及参考案例。原始脑电图信号与高密度逐样本数组则始终保留在本地。
我们从三个层面评估系统:首先,12组记录经十次数值重复运算产生完全一致的结构化结果,完整静息态/任务态运行在三轮重复中产生相同的哈希值(结果、报告与图表均一致);其次,通过请求捕获与故障注入实验,验证了HTTP、异常输出及连接故障场景下已测试的数据边界与本地工件保留机制;第三,边界感知基准测试包含36个常规与对抗性问题,覆盖四种上下文消融与两种语言模型,共生成288个输出。上述结果支持将硬件与实现感知的约束锚定作为校准脑电图智能体接受、限定或拒绝内容的具体机制,但未确立临床有效性或经验证的绝对认知负荷指数。
English
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.