{"id":32513472,"url":"https://github.com/DEEP-PolyU/LinearRAG","last_synced_at":"2025-10-27T23:03:01.634Z","repository":{"id":320977975,"uuid":"1083953029","full_name":"DEEP-PolyU/LinearRAG","owner":"DEEP-PolyU","description":"A relation-free graph constrcution method for efficient GraphRAG.","archived":false,"fork":false,"pushed_at":"2025-10-27T05:20:01.000Z","size":853,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-27T05:25:04.739Z","etag":null,"topics":["graphrag","rag"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DEEP-PolyU.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-27T02:16:18.000Z","updated_at":"2025-10-27T05:22:47.000Z","dependencies_parsed_at":"2025-10-27T05:25:42.901Z","dependency_job_id":"80355e51-17e6-4de6-aed5-6f6b8db799ee","html_url":"https://github.com/DEEP-PolyU/LinearRAG","commit_stats":null,"previous_names":["deep-polyu/linearrag"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/DEEP-PolyU/LinearRAG","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DEEP-PolyU%2FLinearRAG","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DEEP-PolyU%2FLinearRAG/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DEEP-PolyU%2FLinearRAG/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DEEP-PolyU%2FLinearRAG/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DEEP-PolyU","download_url":"https://codeload.github.com/DEEP-PolyU/LinearRAG/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DEEP-PolyU%2FLinearRAG/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281355344,"owners_count":26486896,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-27T02:00:05.855Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["graphrag","rag"],"created_at":"2025-10-27T23:00:56.325Z","updated_at":"2025-10-27T23:03:01.630Z","avatar_url":"https://github.com/DEEP-PolyU.png","language":"Python","funding_links":[],"categories":["Uncategorized"],"sub_categories":["Uncategorized"],"readme":"# **LinearRAG: Linear Graph Retrieval-Augmented Generation on Large-scale Corpora**  \n\n\u003e A relation-free graph construction method for efficient GraphRAG. It eliminates LLM token costs during graph construction, making GraphRAG faster and more efficient than ever.\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://arxiv.org/abs/2510.10114\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Paper-Arxiv-red?logo=arxiv\u0026style=flat-square\" alt=\"arXiv:2506.08938\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://huggingface.co/datasets/Zly0523/linear-rag/tree/main\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/HuggingFace-Model-yellow?logo=huggingface\u0026style=flat-square\" alt=\"HuggingFace\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/LuyaoZhuang/linear-rag\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/GitHub-Project-181717?logo=github\u0026style=flat-square\" alt=\"GitHub\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n---\n\n## 🚀 **Highlights**\n- ✅ **Context-Preserving**: Relation-free graph construction, relying on lightweight entity recognition and semantic linking to achieve comprehensive contextual comprehension. \n- ✅ **Complex Reasoning**: Enables deep retrieval via semantic bridging, achieving multi-hop reasoning in a single retrieval pass without requiring explicit relational graphs.\n- ✅ **High Scalability**: Zero LLM token consumption, faster processing speed, and linear time/space complexity.\n  \n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"figure/main_figure.png\" width=\"95%\" alt=\"Framework Overview\"\u003e\n\u003c/p\u003e\n\n---\n## 🎉 **News**\n- **[2025-10-27]** We release **[LinearRAG](https://github.com/DEEP-PolyU/LinearRAG)**, a relation-free graph construction method for efficient GraphRAG.\n- **[2025-06-06]** We release **[GraphRAG-Bench](https://github.com/GraphRAG-Bench/GraphRAG-Benchmark.git)**, the benchmark for evaluating GraphRAG models.\n- **[2025-01-21]** We release the **[GraphRAG survey](https://github.com/DEEP-PolyU/Awesome-GraphRAG)**.\n\n---\n\n## 🛠️ **Usage**\n\n### 1️⃣ Install Dependencies  \n\n**Step 1: Install Python packages**\n\n```bash\npip install -r requirements.txt\n```\n\n**Step 2: Download Spacy language model**\n\n```bash\npython -m spacy download en_core_web_trf\n```\n\n\u003e **Note:** For the `medical` dataset, you need to install the scientific/biomedical Spacy model:\n```bash\npip install https://s3-us-west-2.amazonaws.com/ai2-s2-scispacy/releases/v0.5.3/en_core_sci_scibert-0.5.3.tar.gz\n```\n\n**Step 3: Set up your OpenAI API key**\n\n```bash\nexport OPENAI_API_KEY=\"your-api-key-here\"\nexport OPENAI_BASE_URL=\"your-base-url-here\"\n```\n\n**Step 4: Download Datasets**\n\nDownload the datasets from HuggingFace and place them in the `dataset/` folder:\n\n```bash\ngit clone https://huggingface.co/datasets/Zly0523/linear-rag\ncp -r linear-rag/dataset/* dataset/\n```\n\n**Step 5: Prepare Embedding Model**\n\nMake sure the embedding model is available at:\n\n```\nmodel/all-mpnet-base-v2/\n```\n\n### 2️⃣ Quick Start Example\n\n```bash\nSPACY_MODEL=\"en_core_web_trf\"\nEMBEDDING_MODEL=\"model/bge-large-en-v1.5\"\nDATASET_NAME=\"2wikimultihop\"\nLLM_MODEL=\"gpt-4o-mini\"\nMAX_WORKERS=16\n\npython run.py \\\n    --spacy_model ${SPACY_MODEL} \\\n    --embedding_model ${EMBEDDING_MODEL} \\\n    --dataset_name ${DATASET_NAME} \\\n    --llm_model ${LLM_MODEL} \\\n    --max_workers ${MAX_WORKERS}\n```\n\n## 🎯 **Performance**\n\n\u003cdiv align=\"center\"\u003e\n\u003cimg src=\"figure/generation_results.png\" alt=\"framework\" width=\"1000\"\u003e\n\n**Main results of end-to-end performance**\n\u003c/div\u003e\n\u003cdiv align=\"center\"\u003e\n\u003cimg src=\"figure/efficiency_result.png\" alt=\"framework\" width=\"1000\"\u003e\n\n**Efficiency and performance comparison.**\n\u003c/div\u003e\n\n\n## 📖 Citation\n\nIf you find this work helpful, please consider citing us:\n```bibtex\n@article{zhuang2025linearrag,\n  title={LinearRAG: Linear Graph Retrieval Augmented Generation on Large-scale Corpora},\n  author={Zhuang, Luyao and Chen, Shengyuan and Xiao, Yilin and Zhou, Huachi and Zhang, Yujing and Chen, Hao and Zhang, Qinggang and Huang, Xiao},\n  journal={arXiv preprint arXiv:2510.10114},\n  year={2025}\n}\n```\n## 📬 Contact\n✉️ Email: zhuangluyao523@gmail.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDEEP-PolyU%2FLinearRAG","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FDEEP-PolyU%2FLinearRAG","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDEEP-PolyU%2FLinearRAG/lists"}