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

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
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
4090生成器:与A100平台相比,token生成速度仅低于18%,上交推理引擎赢得热议4090生成器:与A100平台相比,token生成速度仅低于18%,上交推理引擎赢得热议Dec 21, 2023 pm 03:25 PM

PowerInfer提高了在消费级硬件上运行AI的效率上海交大团队最新推出了超强CPU/GPULLM高速推理引擎PowerInfer。PowerInfer和llama.cpp都在相同的硬件上运行,并充分利用了RTX4090上的VRAM。这个推理引擎速度有多快?在单个NVIDIARTX4090GPU上运行LLM,PowerInfer的平均token生成速率为13.20tokens/s,峰值为29.08tokens/s,仅比顶级服务器A100GPU低18%,可适用于各种LLM。PowerInfer与

快手双边市场的复杂实验设计问题快手双边市场的复杂实验设计问题Apr 15, 2023 pm 07:40 PM

一、问题背景1、双边市场实验介绍双边市场,即平台,包含生产者与消费者两方参与者,双方相互促进。比如快手有视频的生产者,视频的消费者,两种身份可能存在一定程度重合。双边实验是在生产者和消费者端组合分组的实验方式。双边实验具有以下优点:(1)可以同时检测新策略对两方面的影响,例如产品DAU和上传作品人数变化。双边平台往往有跨边网络效应,读者越多,作者越活跃,作者越活跃,读者也会跟着增加。(2)可以检测效果溢出和转移。(3)帮助我们更好得理解作用的机制,AB实验本身不能告诉我们原因和结果之间的关系,只

公理训练让LLM学会因果推理:6700万参数模型比肩万亿参数级GPT-4公理训练让LLM学会因果推理:6700万参数模型比肩万亿参数级GPT-4Jul 17, 2024 am 10:14 AM

把因果链展示给LLM,它就能学会公理。AI已经在帮助数学家和科学家做研究了,比如著名数学家陶哲轩就曾多次分享自己借助GPT等AI工具研究探索的经历。AI要在这些领域大战拳脚,强大可靠的因果推理能力是必不可少的。本文要介绍的这项研究发现:在小图谱的因果传递性公理演示上训练的Transformer模型可以泛化用于大图谱的传递性公理。也就是说,如果让Transformer学会执行简单的因果推理,就可能将其用于更为复杂的因果推理。该团队提出的公理训练框架是一种基于被动数据来学习因果推理的新范式,只有演示

思维链CoT进化成思维图GoT,比思维树更优秀的提示工程技术诞生了思维链CoT进化成思维图GoT,比思维树更优秀的提示工程技术诞生了Sep 05, 2023 pm 05:53 PM

要让大型语言模型(LLM)充分发挥其能力,有效的prompt设计方案是必不可少的,为此甚至出现了promptengineering(提示工程)这一新兴领域。在各种prompt设计方案中,思维链(CoT)凭借其强大的推理能力吸引了许多研究者和用户的眼球,基于其改进的CoT-SC以及更进一步的思维树(ToT)也收获了大量关注。近日,苏黎世联邦理工学院、Cledar和华沙理工大学的一个研究团队提出了更进一步的想法:思维图(GoT)。让思维从链到树到图,为LLM构建推理过程的能力不断得到提升,研究者也通

复旦NLP团队发布80页大模型Agent综述,一文纵览AI智能体的现状与未来复旦NLP团队发布80页大模型Agent综述,一文纵览AI智能体的现状与未来Sep 23, 2023 am 09:01 AM

近期,复旦大学自然语言处理团队(FudanNLP)推出LLM-basedAgents综述论文,全文长达86页,共有600余篇参考文献!作者们从AIAgent的历史出发,全面梳理了基于大型语言模型的智能代理现状,包括:LLM-basedAgent的背景、构成、应用场景、以及备受关注的代理社会。同时,作者们探讨了Agent相关的前瞻开放问题,对于相关领域的未来发展趋势具有重要价值。论文链接:https://arxiv.org/pdf/2309.07864.pdfLLM-basedAgent论文列表:

大模型也有小偷?为保护你的参数,上交大给大模型制作「人类可读指纹」大模型也有小偷?为保护你的参数,上交大给大模型制作「人类可读指纹」Feb 02, 2024 pm 09:33 PM

将不同的基模型象征为不同品种的狗,其中相同的「狗形指纹」表明它们源自同一个基模型。大模型的预训练需要耗费大量的计算资源和数据,因此预训练模型的参数成为各大机构重点保护的核心竞争力和资产。然而,与传统软件知识产权保护不同,对预训练模型参数盗用的判断存在以下两个新问题:1)预训练模型的参数,尤其是千亿级别模型的参数,通常不会开源。预训练模型的输出和参数会受到后续处理步骤(如SFT、RLHF、continuepretraining等)的影响,这使得判断一个模型是否基于另一个现有模型微调得来变得困难。无

FATE 2.0发布:实现异构联邦学习系统互联FATE 2.0发布:实现异构联邦学习系统互联Jan 16, 2024 am 11:48 AM

FATE2.0全面升级,推动隐私计算联邦学习规模化应用FATE开源平台宣布发布FATE2.0版本,作为全球领先的联邦学习工业级开源框架。此次更新实现了联邦异构系统之间的互联互通,持续增强了隐私计算平台的互联互通能力。这一进展进一步推动了联邦学习与隐私计算规模化应用的发展。FATE2.0以全面互通为设计理念,采用开源方式对应用层、调度、通信、异构计算(算法)四个层面进行改造,实现了系统与系统、系统与算法、算法与算法之间异构互通的能力。FATE2.0的设计兼容了北京金融科技产业联盟的《金融业隐私计算

220亿晶体管,IBM机器学习专用处理器NorthPole,能效25倍提升220亿晶体管,IBM机器学习专用处理器NorthPole,能效25倍提升Oct 23, 2023 pm 03:13 PM

IBM再度发力。随着AI系统的飞速发展,其能源需求也在不断增加。训练新系统需要大量的数据集和处理器时间,因此能耗极高。在某些情况下,执行一些训练好的系统,智能手机就能轻松胜任。但是,执行的次数太多,能耗也会增加。幸运的是,有很多方法可以降低后者的能耗。IBM和英特尔已经试验过模仿实际神经元行为设计的处理器。IBM还测试了在相变存储器中执行神经网络计算,以避免重复访问RAM。现在,IBM又推出了另一种方法。该公司的新型NorthPole处理器综合了上述方法的一些理念,并将其与一种非常精简的计算运行

See all articles

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

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software