The AI Neuroscientist: An Interactive Agentic Interface for Neuroimaging Analysis

Aakash Patel, Panos Ketonis, Shreya Saxena, Smita Krishnaswamy, David van DijkarXiv 2026

TL;DR

The AI Neuroscientist is an interactive, LLM-based language agent designed to make neuroimaging analysis accessible via natural language. By constraining the agent to a curated registry of specialist tools and enforcing strict workflow phases, it successfully automates quality control, modeling, and visualization for functional near-infrared spectroscopy (fNIRS) data, significantly outperforming general-purpose coding agents.

What Problem Does This Paper Address?

Neuroimaging data analysis (such as fNIRS or fMRI) is a highly complex, multi-step process. Researchers must navigate specialized libraries, strict file format conventions (like BIDS), and a maze of methodological choices—such as selecting filter frequencies, setting motion artifact thresholds, and fitting statistical models. This creates a steep technical barrier for experimentalists and clinicians who lack advanced scripting backgrounds.

While standardized pipelines exist, they still require programming fluency to execute and audit. Attempts to use general-purpose LLM coding agents to bridge this gap often fail; when left unconstrained in a code sandbox, these models frequently introduce algorithmic errors, exhibit high run-to-run variance, and lack critical scientific safeguards (such as skipping multiple-comparison corrections).

Methods

The authors developed the AI Neuroscientist using a LangGraph/LangChain ReAct agent architecture. Instead of allowing the LLM to generate arbitrary Python code from scratch, they constrained its execution to a fixed, curated registry of domain-specific neuroimaging tools (e.g., detect_heartbeat_channels, clean_and_convert_snirf, fit_fnirs_glm_snirf).

The workflow progresses through a strict, policy-driven sequence of four phases:

  1. Discovery & Quality Control (QC): Locating recordings and flagging unusable channels.
  2. Execution & Statistical Correction: Converting raw intensity to hemodynamic signals and fitting General Linear Models (GLMs).
  3. Interactive Visualization: Generating dashboards and topographic plots.
  4. Multimodal Interpretation: Providing neuroscientific reasoning grounded in the data.

To interpret visual data, the architecture utilizes a two-pass multimodal interpretation loop. In the first turn, the agent queries an image store to list and select relevant generated figures. The system's orchestrator then intercepts this state, encodes the requested images into base64, and appends them directly to the context window for a second reasoning pass. This ensures that the agent's final text interpretation is strictly grounded in visual evidence rather than text-only memory.

Figure 1: The Agent-Driven Neuroimaging Workflow. The workflow progresses temporally across four phases: Discovery and Quality Control, Execution and Statistical Correction, Interactive Visu- alization, and Interpretation. The top lane captures user queries and system feedback. The middle lane details the LangGraph-based ReAct agent logic, which routes natural language instructions to specific functions within a curated specialist tool registry. The bottom lane tracks the corresponding data transformations and generated outputs.

Datasets

To evaluate the system, the authors introduced fnirs_bench, a custom, agent-agnostic benchmarking suite designed to evaluate physiology-aware quality control, artifact localization, and anatomical plausibility. The benchmark includes both easy synthetic tasks and challenging real-world tasks:

  • Synthetic Data: Controlled ground-truth data derived from a shared MNE finger-thumb tapping motor template.
  • Real-World Data: Messy, real recordings drawn from OpenNeuro BIDS exports, specifically datasets ds007554 (an n-back cognitive task) and ds007420 (a dataset containing heavy motion artifacts).

Key Insights and Ideas

  • Coordination Over Generation: The core value of a scientific LLM agent lies in its ability to act as an accessible coordination layer over established, reliable domain tools, rather than attempting to generate end-to-end analytical code from scratch.
  • Strict Phase Ordering as a Safeguard: Forcing a rigid sequence of operations serves as a vital scientific safeguard. For example, the agent automatically applies False Discovery Rate (FDR) correction to GLM beta estimates before generating final topographies, preventing the common conversational failure mode of reporting uncorrected p-values.
  • Token and Computational Efficiency: General-purpose coding agents waste substantial token budgets repeatedly re-implementing standard signal processing routines in Python sandboxes. By contrast, a specialized tool-calling agent achieves deterministic, stable results with a fraction of the token overhead.

Key Results

On the fnirs_bench suite, the AI Neuroscientist achieved the highest overall score of 0.79 ± 0.05, substantially outperforming a sandbox-constrained Claude-Sonnet-5 (0.45 ± 0.07) and GPT-5-nano (0.14 ± 0.06).

The performance gains were most dramatic on real-world, poor signal-to-noise ratio (SNR) quality control and spike-detection tasks. In these scenarios, the general-purpose sandbox LLMs scored near zero due to inconsistent code generation and false positives, while the specialized agent maintained high accuracy (~0.90).

Figure 2: Benchmark diagnostics. (a) Base artifact score versus final score after the reliability penalty. (b) Final score versus total tokens (log scale).

Limitations and Future Work

  • Targeted Scope: The system is designed for small-scale, interactive data exploration (one subject or a small set of runs) and is not intended for unattended batch processing or clinical decision-making.
  • No Algorithmic Novelty: The interface wraps existing statistical functions; it does not inherently improve the underlying statistical validity or accuracy compared to an expert-scripted pipeline.
  • Future Directions: The authors plan to implement an autonomous, closed-loop QC system where the agent can iteratively inspect its own outputs and re-run pipelines with optimized parameters. They also plan to expand the toolset to support other neural recording modalities, including fMRI, EEG, and calcium imaging, utilizing standardized formats like NIfTI.

Summary updated

BibTeX
@misc{patel2026ai,
  author = {Aakash Patel and Panos Ketonis and Shreya Saxena and Smita Krishnaswamy and David van Dijk},
  title = {{The AI Neuroscientist: An Interactive Agentic Interface for Neuroimaging Analysis}},
  year = {2026},
  eprint = {2609.25254},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2609.25254},
}
Figure