複雜數學推理是評估大語言模型推理能力的重要指標,目前常用的數學推理資料集樣本量有限且問題多樣性不足,導致大語言模型存在[逆轉詛咒] 的現象,即一個訓練於「A 是B」的語言模式無法推廣到「B 是A」[1]。此現像在數學推理任務中的具體形式是:即給定一個數學問題,語言模型擅於用正向推理解答問題但缺乏逆向推理解決問題的能力。逆向推理在數學問題中十分常見,如下 2 個例子。
1. 經典問題- 雞兔同籠
- 正向推理:籠子裡有23 隻雞和12 隻兔,問籠子裡有幾個頭和多少隻腳?
- 逆向推理:有若干隻雞兔同在一個籠子裡,從上面數,有 35 個頭,從下面數,有 94 隻腳。問籠中各有幾隻雞和兔子?
2. GSM8K 問題
- 正向推理: James buys 5 packs of beef that are 4 pounds each. The price of beef is $5.50 per pound. How much did he pay?
- 逆向推理: James buys x packs of beef that are 4 pounds each. The price of beef is $5.50 per pound . How much did he pay? If we know the answer to the above question is 110, what is the value of unknown variable x?
#為了提升模型的正向和逆向推理能力,劍橋、港科大、華為的研究者基於兩個常用的數學資料集(GSM8K 和MATH)提出了MetaMathQA 資料集:一個覆蓋面廣、品質高的數學推理資料集。 MetaMathQA 由 395K 個大語言模型產生的正向逆向數學問答對組成。他們在 MetaMathQA 資料集上基於 LLaMA-2 微調得到專注於數學推理 (正向和逆向) 的大語言模型 MetaMath,在數學推理資料集上達到了 SOTA。 MetaMathQA 資料集和不同規模的 MetaMath 模型已開源供研究人員使用。
- 計畫網址:https://meta-math.github.io/
- 論文網址:https://arxiv.org/abs/2309.12284
- 資料位址:https://huggingface.co/datasets/meta-math/MetaMathQA
- 模型位址:https://huggingface.co/meta-math
- #程式碼位址:https://github.com/meta-math/MetaMath
在GSM8K-Backward資料集中,我們建構了一個逆向推理的實驗。實驗結果顯示,與SFT、RFT和WizardMath等方法相比,目前的方法在逆向推理問題上表現較差。與之相反,MetaMath模型在正向和反向推理方面都取得了出色的性能
方法
#MetaMathQA 包含了四種資料增強的方法:
1. Answer Augmentation (答案增強):給定問題,透過大語言模型產生能得到正確結果的思維鏈作為資料增廣。
- Question: James buys 5 packs of beef that are 4 pounds each. The price of beef is $5.50 per pound. How much did he pay?
######################################################################### ######Answer: James buys 5 packs of beef that are 4 pounds each, so he buys a total of 5 * 4 = 20 pounds of beef. The price of beef is $5.50 per pound, pay he 5020 * = $110. The answer is: 110.###################2. Rephrasing Question (問題改寫增強):##########給定元問題,透過大語言模型重寫問題並產生正確結果的思維鏈作為資料增廣。 ######
- Question: What is the total amount that James paid when he purchased 5 packs of beef, each weighing 4 pounds, at a price of $5.50 per pound?
#Answer: Each pack of beef weighs 4 pounds, so 5 packs weigh 4 * 5 = 20 pounds in total. The price per pound of beef is $5.50, so the total cost for 20 pounds is 20 * $5.50, so the total cost 為 20 pounds is 20 * $1.50. James paid a total of $110. The answer is: 110.
3. FOBAR Question (FOBAR 逆向問題增強):######### #給定元問題,透過遮罩條件中的數字為x,給定原有答案並反推x 來產生逆向問題,並基於該逆向問題生成正確的思維鏈過程來進行資料增廣(反推樣例:「If we know the answer to the above question is 110, what is the value of unknown variable x?」)。 ###############Question: James buys x packs of beef that are 4 pounds each. The price of beef is $5.50 per pound. How much did he pay? If we know the answer to the above question is 110, what is the value of unknown variable x?###########Answer: James buys x packs of beef that are 4 pounds each, so he buys a total of 4x pounds of beef. The price of beef is $5.50 per pound, so the total cost of the beef is 5.50 * 4x = 22x. We are given that the total cost is $110, so we can write: 222x = 10. we get: x = 5. The value of x is 5.##################4. Self-Verification Question (Self-Verification 逆向問題增強):### ######在FOBAR 的基礎上,透過大語言模型改寫逆向問題部分為陳述的語句來進行資料增廣(改寫樣例:「How much did he pay?」 (with the answer 110) 被改寫成“He paid 110”)。 ###############Question: James buys x packs of beef that are 4 pounds each. The price of beef is $5.50 per pound. He paid 110. What is the value of unknown variable x ?############Answer: To solve this problem, we need to determine the value of x, which represents the number of packs of beef that James bought. Each pack of beef weighs 4 pounds and costs $5.50 per pound. The total amount James paid is $110. We can set up the equation as follows: Number of packs of beef * Weight per pack * Price per pound = Total amount paid; x * 4 * $5.50 = $110; solve for x: 4x * $5.50 = $110; 22x = $110; To isolate x, we divide both sides of the equation by 22: 22x / 22 = $110 / 22; x = $5; The value of x is 5.##is 5; The value of x 是 5. ############實驗結果###############################在兩個常見的數學推理資料集(GSM8K和MATH)的實驗結果表明,MetaMath在效能上顯著優於現有的開源LLM模型,而且不需要藉助外部工具(例如程式碼解釋器)。其中,我們的MetaMath-7B模型在GSM8K上達到了66.5%的準確率,在MATH上達到了19.8%的準確率,分別比相同規模的最先進模型高出11.6%和9.1%。特別值得一提的是,MetaMath-70B在GSM8K上達到了82.3%的準確率,超過了GPT-3.5-Turbo############根據《表面對齊假設》[2],大型語言模型的能力來自於預訓練,而來自下游任務的資料則會啟動預訓練期間所學習到的語言模型的內在能力。因此,這引發了兩個重要問題:(一)哪種類型的資料可以最有效地激活潛在知識,以及(二)為什麼一個資料集在這種活化中比另一個資料集更好? ###############為什麼 MetaMathQA 有用?提高了思維鏈資料的品質(Perplexity)###############################根據上圖所示,研究人員計算了LLaMA-2-7B 模型在僅答案資料、GSM8K CoT 和MetaMathQA 資料集的各個部分上的困惑度。 MetaMathQA 資料集的困惑度明顯低於其他兩個資料集,這表明它具有較高的易學性,可能更有助於揭示模型的潛在知識###############為什麼MetaMathQA 有用?增加了思維鏈資料的多樣性 (Diversity)#########
通过比较数据的多样性增益和模型的准确率增益,研究人员发现,重新表述、FOBAR和SV的引入相同数量的增广数据都带来了明显的多样性增益,并显著提高了模型的准确率。相比之下,仅仅使用答案增强会导致准确率明显饱和。在准确率达到饱和后,增加AnsAug数据只会带来有限的性能提升
以上是逆向思考:MetaMath新數學推理語言模型訓練大型模型的詳細內容。更多資訊請關注PHP中文網其他相關文章!

軟AI(被定義為AI系統,旨在使用近似推理,模式識別和靈活的決策執行特定的狹窄任務 - 試圖通過擁抱歧義來模仿類似人類的思維。 但是這對業務意味著什麼

答案很明確 - 只是雲計算需要向雲本地安全工具轉變,AI需要專門為AI獨特需求而設計的新型安全解決方案。 雲計算和安全課程的興起 在

企業家,並使用AI和Generative AI來改善其業務。同時,重要的是要記住生成的AI,就像所有技術一樣,都是一個放大器 - 使得偉大和平庸,更糟。嚴格的2024研究O

解鎖嵌入模型的力量:深入研究安德魯·NG的新課程 想像一個未來,機器可以完全準確地理解和回答您的問題。 這不是科幻小說;多虧了AI的進步,它已成為R

大型語言模型(LLM)和不可避免的幻覺問題 您可能使用了諸如Chatgpt,Claude和Gemini之類的AI模型。 這些都是大型語言模型(LLM)的示例,在大規模文本數據集上訓練的功能強大的AI系統

最近的研究表明,根據行業和搜索類型,AI概述可能導致有機交通下降15-64%。這種根本性的變化導致營銷人員重新考慮其在數字可見性方面的整個策略。 新的

埃隆大學(Elon University)想像的數字未來中心的最新報告對近300名全球技術專家進行了調查。由此產生的報告“ 2035年成為人類”,得出的結論是,大多數人擔心AI系統加深的採用


熱AI工具

Undresser.AI Undress
人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover
用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool
免費脫衣圖片

Clothoff.io
AI脫衣器

AI Hentai Generator
免費產生 AI 無盡。

熱門文章

熱工具

ZendStudio 13.5.1 Mac
強大的PHP整合開發環境

PhpStorm Mac 版本
最新(2018.2.1 )專業的PHP整合開發工具

Dreamweaver CS6
視覺化網頁開發工具

VSCode Windows 64位元 下載
微軟推出的免費、功能強大的一款IDE編輯器

Dreamweaver Mac版
視覺化網頁開發工具