Official repo of NeurIPS 2025 paper: NeuroPath: Neurobiology-Inspired Path Tracking and Reflection for Semantically Coherent Retrieval
conda create -n neuropath python==3.11
conda activate neuropathIt 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/cu124Install other dependencies.
# Install faiss-gpu
conda install -c pytorch -c nvidia faiss-gpu=1.9.0
# Install requirements.txt
pip install -r requirements.txt All datasets used in the experiments are stored in the data directory, including three multi-hop QA datasets and two simple QA datasets.
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 Please first check the script content and specify a specific dataset for the experiment. Specific parameters can be set in the script.
bash src/setup_neuropath_main_exps.shbash src/run_neuropath_main_exps.shThe 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.
If you want to perform QA, refer to the README.md in src\qa directory
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.
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.