Training AI to Reason: A Clever New Technique Using Logic Traces
Generative AI and large language models (LLMs) are rapidly evolving, with AI developers constantly searching for innovative ways to improve performance. One of the latest and most promising techniques involves training these models on how to effectively employ logical reasoning. This approach utilizes logic-based reasoning traces derived from more advanced AI systems, feeding them into developing AI models. Through a process of pattern-matching, the new AI learns to incorporate logical reasoning into its processes, leading to dramatic improvements in its ability to formulate and explain answers.
The Power of Logical Reasoning
Humans naturally expect logical reasoning to be a fundamental component of any interaction. When presented with information – for instance, someone expressing a preference for an unusual food combination – we invariably seek the logical rationale behind it. Similarly, we want generative AI and LLMs to demonstrate the logical steps they have taken to formulate an answer.
Experienced users of generative AI are likely familiar with the chain-of-thought (CoT) prompting technique. This approach involves instructing the AI to generate a response in a stepwise manner, making the reasoning process transparent. However, the effectiveness of this approach can be limited.
Just because an AI presents a series of steps doesn’t guarantee the validity or accuracy of those steps. The danger lies in the potential for flawed or “foul” logic, which can undermine the credibility of the AI’s output.
How Logical Reasoning Can Go Awry
Consider an example: someone who enjoys blueberries on their cheeseburgers. Their provided reasoning might be logical, explaining how early exposure to the food combination led to a preference. But what if their explanation cited their love of pickles as the reason for their blueberry-burger enjoyment? This kind of explanation reveals a flaw in the logic. It underscores the need to ensure that generative AI models not only present a chain of steps, but also utilize sound, well-crafted logic.
Training AI on Logical Reasoning
A new strategy focuses on enhancing the logical reasoning capabilities of generative AI and LLMs. This approach begins by leveraging an existing, high-performing generative AI model. After this, the system is prompted with a series of questions, paired with instructions to show the logical reasoning used to reach the correct answer. The prompt, answer, and logical reasoning traces are then collected.
Next, AI developers or researchers meticulously review this collected data, identifying and removing instances of subpar logic. The goal is to curate a subset of examples containing only robust and valid reasoning.
This curated subset is then used to train a new or developing generative AI model. This model uses computational pattern-matching to determine the best way of using logical reasoning, creating an inductive learning environment. The new AI gains an understanding of general principles based on the examples.
Illustrative Example
To illustrate this process, let’s look at an example. When asked “Sarah is 22 years old. The legal drinking age is 21. Can Sarah legally drink alcohol?” a popular generative AI provided the following response:
“Reasoning trace: (1) Identify the facts, (2) Use a comparison rule that compares the facts, (3) Determine the answer based on the rule outcome. Fact 1: Sarah is 22 years old. Fact 2: The minimum required age for drinking is 21. Comparison rule: If the given value is less than the designated threshold then deny the aspect else grant its approval. The comparison here is 22 > 21. Conclusion: Sara can legally drink.”
The AI correctly determined that Sarah could legally drink. The chain-of-thought demonstrated solid logic: facts are identified, compared using a rule, which led to the correct conclusion. The prompt, the answer and the reasoning trace are then included to the dataset.
Combining the Datasets for Training AI
The same process would then be used across multiple cases, providing a wide range of logical reasoning examples. The instances are then placed into a file or database. Instances that provide the correct answer with solid reasoning are kept. The instances with incorrect answers are discarded. The vetted data is provided to a new generative AI during its training period. The new AI examines prompts, answers, and the logical reasoning traces provided.
The new AI can then use computational pattern-matching to try and gauge how the three elements relate to each other.
For example, when prompted with ”Michael has a credit score of 640. The minimum required credit score for a loan is 700. Does Michael qualify for a loan?” The new AI can successfully use the patterns learned in order to provide the correct answer.
Newbie Generative AI response: “This is similar to prior examples that I’ve seen. I will use my learned logical reasoning, consisting of: (1) Identify the facts, (2) Use a comparison rule that compares the facts, (3) Determine the answer based on the rule outcome. Fact 1: Michael has a credit score of 640. Fact 2: The minimum required credit score is 700. Learned rule: If a given value is less than a designated threshold then deny else grant approval. The comparison here is 640 < 700. Conclusion: Michael does not qualify for a loan.”
Overall Vital Considerations
While the effectiveness of this approach is demonstrated, the real-world requires a broad range of problem-solving. The success of this method may depend on the quantity of examples provided, with many experts suggesting that thousands or even millions of instances are needed to help the AI pattern out how to apply logical steps.
The AI industry’s use of logical reasoning is at an early stage of development. As Charles Sanders Peirce noted, “Bad reasoning as well as good reasoning is possible; and this fact is the foundation of the practical side of logic.” While the AI may present logical reasoning, users must remain aware of the possibility of flawed logic.
As Thomas Paine said, “To argue with a person who has renounced the use of reason is like administering medicine to the dead.” Let’s wholeheartedly try to refrain from AI falling into the same troublesome trap. Go ahead and give a hearty round of applause for the genuine use of logic.