Faithful Logical Reasoning- Symbolic Chain-of-Thought & GNN-RAG - Graph Neural Retrieval for Large Language Model Reasoning
Aditi Khare
AWS & AI Research Specialist-Principal Machine Learning Scientist & AI Architect | IIM-A | Author | AI Research [Portfolio] Build Production-Grade AI Products from Scratch | Vision Transformers??Open-Source Contributor
Chain-of-Thought (CoT) technique enhances reasoning ability of large language models (LLMs) with the theory of mind, it might still struggle in handling logical reasoning that relies much on symbolic expressions and rigid deducing rules. For Strengthening the logical reasoning capability of LLMs - Symbolic Chain-of-Thought, namely SymbCoT, a fully LLM-based framework that integrates symbolic expressions and logic rules with CoT prompting.
Building upon an LLM, SymbCoT -
SymbCoT comprises four main modules: Translator, Planner, Solver, and Verifier. Characterized by the following three core aspects:
Summarizing Technical Contributions -
This paper Proposes a fully LLM-based logical reasoning framework based on CoT, demonstrating that LLMs can achieve robust logical reasoning capabilities without external reasoning tools. Compared to existing SoTA solutions relying on external resolvers, SymbCoT offers better robustness against translation errors and more human-understandable explanations.
? Innovatively integrating the strengths of symbolic forms and natural language expressions, enabling precise reasoning calculations while fully interpreting implicit information and capturing rich contexts.
? Introducing a plan-then-solve architecture for CoT reasoning, along with a retrospective verification mechanism, enhancing the faithfulness of the reasoning process.
Reference Reading Links -
Paper - https://arxiv.org/abs/2405.18357
GNN-RAG: Graph Neural Retrieval for Large Language Model Reasoning -
Large Language Models (LLMs) are the state-of-the-art models in many NLP tasks due to their remarkable ability to understand natural language.
LLM’s power stems from pretraining on large corpora of textual data to obtain general human knowledge.
However, because pretraining is costly and time-consuming. LLMs cannot easily adapt to new or in-domain knowledge and are prone to hallucinations. Knowledge Graphs (KGs) are databases that store information in structured form that can be easily updated.
KGs represent human-crafted factual knowledge in the form of triplets (head, relation, tail), which collectively form a graph. In the case of KGs, the stored knowledge is updated by fact addition or removal. As KGs capture complex interactions between the stored entities. e.g - multi-hop relations, they are widely used for knowledge-intensive task, such as Question Answering (QA).
Retrieval-augmented generation (RAG) is a framework that alleviates LLM hallucinations by enriching the input context with up-to-date and accurate information e.g., obtained from the KG. In the KGQA task, the goal is to answer natural questions grounding the reasoning to the information provided by the KG. For instance, the input for RAG becomes “Knowledge: Jamaica → language_spoken → English \n Question: Which language do Jamaican people speak?”, where the LLM has access to KG information for answering the question. RAG’s performance highly depends on the KG facts that are retrieved.
The challenge is that KGs store complex graph information (they usually consist of millions of facts) and retrieving the right information requires effective graph processing, while retrieving irrelevant information may confuse the LLM during its KGQA reasoning.
Existing retrieval methods that rely on LLMs to retrieve relevant KG information (LLM-based retrieval) underperform on multi-hop KGQA as they cannot handle complex graph information or they need the internal knowledge of very large LMs, e.g., GPT-4, to compensate for missing information during KG retrieval.
GNN-RAG is a method for improving RAG for KGQA. GNN-RAG relies on Graph Neural Networks (GNNs) which are powerful graph representation learners, to handle the complex graph information stored in the KG.
领英推荐
Although GNNs cannot understand natural language the same way LLMs do, GNN-RAG repurposes their graph processing power for retrieval.
GNN-RAG repurposes GNNs for KGQA retrieval to enhance the reasoning abilities of LLMs. In GNN-RAG Framework GNN acts as a dense subgraph reasoner to extract useful graph information, while the LLM leverages its natural language processing ability for ultimate KGQA. Moreover, our retrieval analysis guides the design of a retrieval augmentation (RA) technique to boost GNN-RAG’s performance.
GNN-RAG's Effectiveness & Faithfulness
GNN-RAG achieves state-of-the-art performance in two widely used KGQA benchmarks (WebQSP and CWQ). GNN-RAG retrieves multi-hop information that is necessary for faithful LLM reasoning on complex questions (8.9–15.5% improvement.
GNN-RAG Efficeincy improves vanilla LLMs on KGQA performance without incurring additional LLM calls as existing RAG systems for KGQA require. In addition, GNN-RAG outperforms or matches GPT-4 performance with a 7B tuned LLMs.
LLMs for KGQA use KG information to perform retrieval-augmented generation (RAG) as follows:
The retrieved subgraph is first converted into natural language so that it can be processed by the LLM. The input given to the LLM contains the KG factual information along with the question and a prompt. For instance, the input becomes “Knowledge: Jamaica → language_spoken → English \n Question: Which language do Jamaican people speak?”, where the LLM has access to KG information for answering the question. Landscape of KGQA methods. Figure 2 presents the landscape of existing KGQA methods with respect to KG retrieval and reasoning. GNN-based methods, such as GraftNet and ReaRev reason over a dense KG subgraph leveraging the GNN’s ability to handle complex graph information.
Recent LLM-based methods leverage the LLM’s power for both retrieval and reasoning. ToG [Sun et al., 2024] uses the LLM to retrieve relevant facts hop-by-hop. RoG [Luo et al., 2024] uses the LLM to generate plausible relation paths which are then mapped on the KG to retrieve the relevant information.
LLM-based Retriever. We present an example of an LLM-based retriever. Given training question-answer pairs, RoG extracts the shortest paths to the answers starting from question entities for fine-tuning the retriever. Based on the extracted paths, an LLM (LLaMA2-Chat7B is fine-tuned to generate reasoning paths given a question q as LLM(prompt, q) =? {r1 → · · · → rt}k, (2) where the prompt is “Please generate a valid relation path that can be helpful for answering the following question: {Question}”. Beam-search decoding is used to generate k diverse sets of reasoning paths for better answer coverage. e.g relations {, } for the question “Which language do Jamaican people speak?”. The generated paths are mapped on the KG, starting from the question entities, in order to retrieve the intermediate entities for RAG.
GNN-RAG We introduce GNN-RAG, a novel method for combining language understanding abilities of LLMs with the reasoning abilities of GNNs in a retrieval-augmented generation (RAG) style.
GNN reasons over a dense KG subgraph to retrieve answer candidates for a given question. Second, the shortest paths in the KG that connect question entities and GNN-based answers are extracted to represent useful KG reasoning paths.
The extracted paths are verbalized and given as input for LLM reasoning with RAG. In our GNN-RAG framework, the GNN acts as a dense subgraph reasoner to extract useful graph information, while the LLM leverages its natural language processing ability for ultimate KGQA.
Reference Reading Links -
For more information on AI Research Papers you can visit my Github Profile -
For Receving latest updates on Advancements in AI Research Gen-AI, Quantum AI & Computer Vision you can subscribe to my AI Research Papers Summaries Newsletter using below link -
Thank you & Happy Reading !