Skip to content

KennyCaty/NeuroPath

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NeuroPath: Neurobiology-Inspired Path Tracking and Reflection for Semantically Coherent Retrieval

Official repo of NeurIPS 2025 paper: NeuroPath: Neurobiology-Inspired Path Tracking and Reflection for Semantically Coherent Retrieval

Setup

conda create -n neuropath python==3.11
conda activate neuropath

It is recommended to install torch first. As specified in our reproducibility requirements, version 2.4.0 should be used.

The following is an example of torch installation under CUDA 12.4. Please install according to your actual device requirements.

pip install torch==2.4.0 torchvision==0.19.0 torchaudio==2.4.0 --index-url https://download.pytorch.org/whl/cu124

Install other dependencies.

# Install faiss-gpu
conda install -c pytorch -c nvidia faiss-gpu=1.9.0

# Install requirements.txt
pip install -r requirements.txt 

Reproduction

Datasets

All datasets used in the experiments are stored in the data directory, including three multi-hop QA datasets and two simple QA datasets.

Optional environment variables configuration

export HF_HOME="your_hf_home_path"
export OPENAI_API_KEY="your_api_key"
export OPENAI_BASE_URL="your_base_url" # default: https://api.openai.com/v1

# To avoid network issues when connecting to Hugging Face, we recommend downloading the model in advance and using it in local mode.
export TRANSFORMERS_OFFLINE=1  # Optional 

Run NeuroPath

Please first check the script content and specify a specific dataset for the experiment. Specific parameters can be set in the script.

Indexing

bash src/setup_neuropath_main_exps.sh

Retrieval

bash src/run_neuropath_main_exps.sh

The zero-shot setting is used by default. If you need to enable One-Shot, change --one_shot f to --one_shot t in the script.

QA

If you want to perform QA, refer to the README.md in src\qa directory

Baselines

Please refer to the README.md file in the src/baselines directory for detailed instructions.

Note: If you need to use BM25, you must install ElasticSearch separately and uncomment the line from elasticsearch import Elasticsearch in the relevant code. We recommend using elasticsearch==9.0.1.

For HippoRAG, LightRAG, and PathRAG, please refer to their respective repositories.

SFT Data

The data/sft_data directory includes an additional 1,500 questions selected from the 2WikiMultihopQA dataset for fine-tuning purposes, along with the fine-tuning dataset 2wiki_sft.json generated by performing retrieval with DeepSeek-V3.

About

Accepted by NeurIPS 2025

Resources

License

Stars

Watchers

Forks