Home Technology peripherals AI Axiomatic training allows LLM to learn causal reasoning: the 67 million parameter model is comparable to the trillion parameter level GPT-4

Axiomatic training allows LLM to learn causal reasoning: the 67 million parameter model is comparable to the trillion parameter level GPT-4

Jul 17, 2024 am 10:14 AM
project causal reasoning Axiom training

Show the causal chain to LLM and it will learn the axioms.

AI is already helping mathematicians and scientists do research. For example, the famous mathematician Tao Zhexuan has repeatedly shared his research and exploration experience with the help of GPT and other AI tools. For AI to compete in these fields, strong and reliable causal reasoning capabilities are essential.

The research to be introduced in this article found that Transformer models trained on demonstrations of the causal transitivity axiom for small graphs can generalize to the transitivity axiom for large graphs.

In other words, if Transformer learns to perform simple causal reasoning, it may be used for more complex causal reasoning. The axiom training framework proposed by the team is a new paradigm for learning causal reasoning based on passive data, which can be used to learn arbitrary axioms as long as the demonstration is sufficient.

Introduction

Causal reasoning can be defined as a set of reasoning processes that conform to predefined axioms or rules specifically for causality. For example, the d-separation (directed separation) and do-calculus rules can be considered axioms, while the specifications of a collider set or a backdoor set can be considered rules derived from the axioms.

Generally speaking, causal inference uses data that correspond to variables in a system. Axioms or rules can be integrated into machine learning models in the form of inductive biases through regularization, model architecture, or specific variable selection.

Based on the differences in available data types (observation data, intervention data, counterfactual data), the "causal ladder" proposed by Judea Pearl defines possible types of causal inference.

Since axioms are the cornerstone of causality, we can’t help but wonder if we can directly use machine learning models to learn axioms. That is, what if the way to learn axioms is not to learn data obtained through some data generation process, but directly to learn symbolic demonstrations of axioms (and thus to learn causal reasoning)?

Compared with task-specific causal models built using specific data distributions, such a model has an advantage: it can achieve causal reasoning in a variety of different downstream scenarios. This issue becomes important as language models gain the ability to learn symbolic data expressed in natural language.

In fact, some recent research has evaluated whether large language models (LLMs) are capable of performing causal inference by creating benchmarks that encode causal inference problems in natural language.

Research teams from Microsoft, MIT, and the Indian Institute of Technology Hyderabad (IIT Hyderabad) have also taken an important step in this direction: proposing a method for learning causal inference through axiomatic training .

Axiomatic training allows LLM to learn causal reasoning: the 67 million parameter model is comparable to the trillion parameter level GPT-4

  • Paper title: Teaching Transformers Causal Reasoning through Axiomatic Training
  • Paper address: https://arxiv.org/pdf/2407.07612

Axiomatic Training

They assume, The causal axiom can be expressed as the following symbolic tuple 〈premise, hypothesis, result〉. Among them, hypothesis refers to the hypothesis, that is, a causal statement; premise is the premise, which refers to any relevant information used to determine whether the statement is "true"; result is naturally the result. The result can be a simple "yes" or "no".

For example, the collider axiom from the paper "Can large language models infer causation from correlation?" can be expressed as: Axiomatic training allows LLM to learn causal reasoning: the 67 million parameter model is comparable to the trillion parameter level GPT-4, and the conclusion is "yes".

Based on this template, a large number of synthetic tuples can be generated by modifying variable names, variable numbers, variable order, etc.

In order to use Transformer to learn causal axioms and achieve axiom training, the team used the following methods to construct data sets, loss functions and position embeddings.

Axiomatic training: Data set, loss function and position compilation

Training data

Based on a specific axiom, "hypothesis" can be mapped to appropriate label based on "premise" ( Yes or No). To create the training data set, the team enumerates all possible tuples {(P, H, L)}_N under specific variable settings X, Y, Z, A, where P is the premise and H is the hypothesis , L is the label (Yes or No).

Given a premise P based on some causal diagram, if the hypothesis P can be derived by using a specific axiom (one or more times), then the label L is Yes; otherwise it is No.

For example, assume that the underlying real causal graph of a system has a chain topology: X_1 → X_2 → X_3 →・・・→ X_n. Then, a possible premise is X_1 → X_2 ∧ X_2 → X_3, then suppose X_1 → The above axioms can be used inductively many times to generate more complex training tuples.

For the training setup, build a synthetic dataset D using N axiom instances generated by the transitivity axiom. Each instance in D is constructed of the form (P_i, H_ij, L_ij), Axiomatic training allows LLM to learn causal reasoning: the 67 million parameter model is comparable to the trillion parameter level GPT-4, where n is the number of nodes in each i-th premise. P is the premise, that is, a natural language expression of a certain causal structure (such as X causes Y, Y causes Z); followed by the question H (such as does X cause Y?); L is the label (Yes or No). This form effectively covers all pairs of nodes for each unique chain in a given causal graph.

Loss function

Given a data set, the loss function is defined based on the ground truth label of each tuple, expressed as: Axiomatic training allows LLM to learn causal reasoning: the 67 million parameter model is comparable to the trillion parameter level GPT-4The analysis shows that compared to the next token prediction, using this Losses can yield promising results.

Positional encoding

In addition to training and loss functions, the choice of positional encoding is also another important factor. Positional encoding can provide key information about the absolute and relative position of a token in a sequence.

The famous paper "Attention is all you need" proposes an absolute position coding strategy that uses periodic functions (sine or cosine functions) to initialize these codes.

Absolute position encoding can provide certain values ​​for all positions of any sequence length. However, some research shows that absolute position encoding is difficult to cope with the length generalization task of Transformer. In the learnable APE variant, each position embedding is randomly initialized and trained using the model. This method struggles with sequences that are longer than those during training, because the new position embeddings are still untrained and uninitialized.

Interestingly, recent findings have shown that removing position embeddings in autoregressive models can improve the length generalization ability of the model, and the attention mechanism during autoregressive decoding is sufficient to encode position information. The team used different position encodings to understand their impact on generalization in causal tasks, including learnable position encoding (LPE), sinusoidal position encoding (SPE), and no position encoding (NoPE).

In order to improve the generalization ability of the model, the team also used data perturbations, including perturbations of length, node name, chain order and branch status.

Experiment

The following question arises: If a model is trained using this data, can the model learn to apply this axiom to new scenarios?

To answer this question, the team trained a Transformer model from scratch using this symbolic demonstration of the causally independent axiom.

To evaluate its generalization performance, they trained on simple causally independent axiom chains of size 3-6 nodes, and then tested several different aspects of generalization performance, including length generalization performance (chains of size 7-15), name generalization (longer variable names), sequential generalization (chains with reversed edges or shuffled nodes), structural generalization (graphs with branches) ). Figure 1 illustrates how to evaluate Transformer's structural generalization.

Axiomatic training allows LLM to learn causal reasoning: the 67 million parameter model is comparable to the trillion parameter level GPT-4

Specifically, they trained a decoder-based model with 67 million parameters based on the GPT-2 architecture. The model has 12 attention layers, 8 attention heads, and 512 embedding dimensions. They trained the model from scratch on each training dataset. To understand the impact of positional embedding, they also studied three positional embedding settings: sinusoidal positional encoding (SPE), learnable positional encoding (LPE), and no positional encoding (NoPE).

The results are shown in Table 1, Figure 3 and Figure 4.

Axiomatic training allows LLM to learn causal reasoning: the 67 million parameter model is comparable to the trillion parameter level GPT-4

Table 1 gives the accuracy of different models when evaluated on larger causal chains not seen during training. It can be seen that the performance of the new model TS2 (NoPE) is comparable to the trillion-parameter scale GPT-4.

Figure 3 is the results of the generalization ability evaluation on causal sequences with longer node names (longer than the training set) and the impact of different position embeddings.

Axiomatic training allows LLM to learn causal reasoning: the 67 million parameter model is comparable to the trillion parameter level GPT-4

Figure 4 evaluates the generalization ability on longer unseen causal sequences.

Axiomatic training allows LLM to learn causal reasoning: the 67 million parameter model is comparable to the trillion parameter level GPT-4

They found that models trained on simple chains can generalize to multiple applications of axioms on larger chains, but cannot generalize to more complex scenarios such as sequential or structural generalization. However, if the model is trained on a mixed dataset consisting of simple chains as well as chains with random reverse edges, the model generalizes well to various evaluation scenarios.

Extending results on length generalization on NLP tasks, they discovered the importance of positional embeddings in ensuring causal generalization across length and other dimensions. Their best-performing model had no positional encoding, but they also found that sinusoidal encoding worked well in some cases.

This axiom training method can also be generalized to a more difficult problem, as shown in Figure 5. That is, based on premises containing statements of statistical independence, the task goal is to discern correlation from causation. Solving this task requires knowledge of several axioms, including d-separation and Markov properties.

Axiomatic training allows LLM to learn causal reasoning: the 67 million parameter model is comparable to the trillion parameter level GPT-4

The team generated synthetic training data using the same method as above, and then trained a model. It was found that the Transformer trained on a task demonstration containing 3-4 variables could learn to solve problems containing 5 variables. Map tasks. And on this task, the model is more accurate than larger LLMs such as GPT-4 and Gemini Pro.

Axiomatic training allows LLM to learn causal reasoning: the 67 million parameter model is comparable to the trillion parameter level GPT-4

The team said: "Our research provides a new paradigm for teaching models to learn causal reasoning through symbolic demonstrations of axioms, which we call axiomatic training." Data generation and training of this method The procedure is general: as long as an axiom can be expressed in the format of symbolic tuples, it can be learned using this method.

The above is the detailed content of Axiomatic training allows LLM to learn causal reasoning: the 67 million parameter model is comparable to the trillion parameter level GPT-4. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

The author of ControlNet has another hit! The whole process of generating a painting from a picture, earning 1.4k stars in two days The author of ControlNet has another hit! The whole process of generating a painting from a picture, earning 1.4k stars in two days Jul 17, 2024 am 01:56 AM

It is also a Tusheng video, but PaintsUndo has taken a different route. ControlNet author LvminZhang started to live again! This time I aim at the field of painting. The new project PaintsUndo has received 1.4kstar (still rising crazily) not long after it was launched. Project address: https://github.com/lllyasviel/Paints-UNDO Through this project, the user inputs a static image, and PaintsUndo can automatically help you generate a video of the entire painting process, from line draft to finished product. follow. During the drawing process, the line changes are amazing. The final video result is very similar to the original image: Let’s take a look at a complete drawing.

Topping the list of open source AI software engineers, UIUC's agent-less solution easily solves SWE-bench real programming problems Topping the list of open source AI software engineers, UIUC's agent-less solution easily solves SWE-bench real programming problems Jul 17, 2024 pm 10:02 PM

The AIxiv column is a column where this site publishes academic and technical content. In the past few years, the AIxiv column of this site has received more than 2,000 reports, covering top laboratories from major universities and companies around the world, effectively promoting academic exchanges and dissemination. If you have excellent work that you want to share, please feel free to contribute or contact us for reporting. Submission email: liyazhou@jiqizhixin.com; zhaoyunfeng@jiqizhixin.com The authors of this paper are all from the team of teacher Zhang Lingming at the University of Illinois at Urbana-Champaign (UIUC), including: Steven Code repair; Deng Yinlin, fourth-year doctoral student, researcher

From RLHF to DPO to TDPO, large model alignment algorithms are already 'token-level' From RLHF to DPO to TDPO, large model alignment algorithms are already 'token-level' Jun 24, 2024 pm 03:04 PM

The AIxiv column is a column where this site publishes academic and technical content. In the past few years, the AIxiv column of this site has received more than 2,000 reports, covering top laboratories from major universities and companies around the world, effectively promoting academic exchanges and dissemination. If you have excellent work that you want to share, please feel free to contribute or contact us for reporting. Submission email: liyazhou@jiqizhixin.com; zhaoyunfeng@jiqizhixin.com In the development process of artificial intelligence, the control and guidance of large language models (LLM) has always been one of the core challenges, aiming to ensure that these models are both powerful and safe serve human society. Early efforts focused on reinforcement learning methods through human feedback (RL

Posthumous work of the OpenAI Super Alignment Team: Two large models play a game, and the output becomes more understandable Posthumous work of the OpenAI Super Alignment Team: Two large models play a game, and the output becomes more understandable Jul 19, 2024 am 01:29 AM

If the answer given by the AI ​​model is incomprehensible at all, would you dare to use it? As machine learning systems are used in more important areas, it becomes increasingly important to demonstrate why we can trust their output, and when not to trust them. One possible way to gain trust in the output of a complex system is to require the system to produce an interpretation of its output that is readable to a human or another trusted system, that is, fully understandable to the point that any possible errors can be found. For example, to build trust in the judicial system, we require courts to provide clear and readable written opinions that explain and support their decisions. For large language models, we can also adopt a similar approach. However, when taking this approach, ensure that the language model generates

A significant breakthrough in the Riemann Hypothesis! Tao Zhexuan strongly recommends new papers from MIT and Oxford, and the 37-year-old Fields Medal winner participated A significant breakthrough in the Riemann Hypothesis! Tao Zhexuan strongly recommends new papers from MIT and Oxford, and the 37-year-old Fields Medal winner participated Aug 05, 2024 pm 03:32 PM

Recently, the Riemann Hypothesis, known as one of the seven major problems of the millennium, has achieved a new breakthrough. The Riemann Hypothesis is a very important unsolved problem in mathematics, related to the precise properties of the distribution of prime numbers (primes are those numbers that are only divisible by 1 and themselves, and they play a fundamental role in number theory). In today's mathematical literature, there are more than a thousand mathematical propositions based on the establishment of the Riemann Hypothesis (or its generalized form). In other words, once the Riemann Hypothesis and its generalized form are proven, these more than a thousand propositions will be established as theorems, which will have a profound impact on the field of mathematics; and if the Riemann Hypothesis is proven wrong, then among these propositions part of it will also lose its effectiveness. New breakthrough comes from MIT mathematics professor Larry Guth and Oxford University

arXiv papers can be posted as 'barrage', Stanford alphaXiv discussion platform is online, LeCun likes it arXiv papers can be posted as 'barrage', Stanford alphaXiv discussion platform is online, LeCun likes it Aug 01, 2024 pm 05:18 PM

cheers! What is it like when a paper discussion is down to words? Recently, students at Stanford University created alphaXiv, an open discussion forum for arXiv papers that allows questions and comments to be posted directly on any arXiv paper. Website link: https://alphaxiv.org/ In fact, there is no need to visit this website specifically. Just change arXiv in any URL to alphaXiv to directly open the corresponding paper on the alphaXiv forum: you can accurately locate the paragraphs in the paper, Sentence: In the discussion area on the right, users can post questions to ask the author about the ideas and details of the paper. For example, they can also comment on the content of the paper, such as: "Given to

The first Mamba-based MLLM is here! Model weights, training code, etc. have all been open source The first Mamba-based MLLM is here! Model weights, training code, etc. have all been open source Jul 17, 2024 am 02:46 AM

The AIxiv column is a column where this site publishes academic and technical content. In the past few years, the AIxiv column of this site has received more than 2,000 reports, covering top laboratories from major universities and companies around the world, effectively promoting academic exchanges and dissemination. If you have excellent work that you want to share, please feel free to contribute or contact us for reporting. Submission email: liyazhou@jiqizhixin.com; zhaoyunfeng@jiqizhixin.com. Introduction In recent years, the application of multimodal large language models (MLLM) in various fields has achieved remarkable success. However, as the basic model for many downstream tasks, current MLLM consists of the well-known Transformer network, which

Axiomatic training allows LLM to learn causal reasoning: the 67 million parameter model is comparable to the trillion parameter level GPT-4 Axiomatic training allows LLM to learn causal reasoning: the 67 million parameter model is comparable to the trillion parameter level GPT-4 Jul 17, 2024 am 10:14 AM

Show the causal chain to LLM and it learns the axioms. AI is already helping mathematicians and scientists conduct research. For example, the famous mathematician Terence Tao has repeatedly shared his research and exploration experience with the help of AI tools such as GPT. For AI to compete in these fields, strong and reliable causal reasoning capabilities are essential. The research to be introduced in this article found that a Transformer model trained on the demonstration of the causal transitivity axiom on small graphs can generalize to the transitive axiom on large graphs. In other words, if the Transformer learns to perform simple causal reasoning, it may be used for more complex causal reasoning. The axiomatic training framework proposed by the team is a new paradigm for learning causal reasoning based on passive data, with only demonstrations

See all articles