<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">

<head>  <title>[2408.07089] InfinityMATH: A Scalable Instruction Tuning Dataset in Programmatic Mathematical Reasoning</title>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="apple-touch-icon" sizes="180x180" href="/static/browse/0.3.4/images/icons/apple-touch-icon.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/static/browse/0.3.4/images/icons/favicon-32x32.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/static/browse/0.3.4/images/icons/favicon-16x16.png">
  <link rel="manifest" href="/static/browse/0.3.4/images/icons/site.webmanifest">
  <link rel="mask-icon" href="/static/browse/0.3.4/images/icons/safari-pinned-tab.svg" color="#5bbad5">
  <meta name="msapplication-TileColor" content="#da532c">
  <meta name="theme-color" content="#ffffff">
  <link rel="stylesheet" type="text/css" media="screen" href="/static/browse/0.3.4/css/arXiv.css?v=20240822" />
  <link rel="stylesheet" type="text/css" media="print" href="/static/browse/0.3.4/css/arXiv-print.css?v=20200611" />
  <link rel="stylesheet" type="text/css" media="screen" href="/static/browse/0.3.4/css/browse_search.css" />
  <script language="javascript" src="/static/browse/0.3.4/js/accordion.js" /></script>
  
    <link rel="stylesheet" type="text/css" media="screen" href="/static/browse/0.3.4/css/slider.css?v=1.14" />
    <script src="//code.jquery.com/jquery-latest.min.js" type="text/javascript"></script>
    <script type="text/javascript" src="/static/browse/0.3.4/js/donate.js?v=1.11"></script><link rel="canonical" href="/abs/2408.07089"/><meta property="og:type" content="website" />
<meta property="og:site_name" content="arXiv.org" />
<meta property="og:title" content="InfinityMATH: A Scalable Instruction Tuning Dataset in Programmatic Mathematical Reasoning" />
<meta property="og:url" content="https://arxiv.org/abs/2408.07089v1" />
<meta property="og:image" content="/static/browse/0.3.4/images/arxiv-logo-fb.png" />
<meta property="og:image:secure_url" content="/static/browse/0.3.4/images/arxiv-logo-fb.png" />
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="700" />
<meta property="og:image:alt" content="arXiv logo"/>
<meta property="og:description" content="Recent advancements in Chain-of-Thoughts (CoT) and Program-of-Thoughts (PoT) methods have greatly enhanced language models&#39; mathematical reasoning capabilities, facilitating their integration into instruction tuning datasets with LLMs. However, existing methods for large-scale dataset creation require substantial seed data and high computational costs for data synthesis, posing significant challenges for scalability. We introduce InfinityMATH, a scalable instruction tuning dataset for programmatic mathematical reasoning. The construction pipeline emphasizes decoupling numbers from mathematical problems to synthesize number-independent programs, enabling efficient and flexible scaling while minimizing dependency on specific numerical values. Fine-tuning experiments with open-source language and code models, such as Llama2 and CodeLlama, demonstrate the practical benefits of InfinityMATH. These fine-tuned models, showed significant relative improvements on both in-domain and out-of-domain benchmarks, ranging from 184.7% to 514.3% on average. Additionally, these models exhibited high robustness on the GSM8K+ and MATH+ benchmarks, which are enhanced version of test sets with simply the number variations. InfinityMATH ensures that models are more versatile and effective across a broader range of mathematical problems. The data is available at https://huggingface.co/datasets/flagopen/InfinityMATH."/>
<meta name="twitter:site" content="@arxiv"/>
<meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="InfinityMATH: A Scalable Instruction Tuning Dataset in..."/>
<meta name="twitter:description" content="Recent advancements in Chain-of-Thoughts (CoT) and Program-of-Thoughts (PoT) methods have greatly enhanced language models&#39; mathematical reasoning capabilities, facilitating their integration into..."/>
<meta name="twitter:image" content="https://static.arxiv.org/icons/twitter/arxiv-logo-twitter-square.png"/>
<meta name="twitter:image:alt" content="arXiv logo"/>
  <link rel="stylesheet" media="screen" type="text/css" href="/static/browse/0.3.4/css/tooltip.css"/><link rel="stylesheet" media="screen" type="text/css" href="https://static.arxiv.org/js/bibex-dev/bibex.css?20200709"/>  <script src="/static/browse/0.3.4/js/mathjaxToggle.min.js" type="text/javascript"></script>  <script src="//code.jquery.com/jquery-latest.min.js" type="text/javascript"></script>
  <script src="//cdn.jsdelivr.net/npm/js-cookie@2/src/js.cookie.min.js" type="text/javascript"></script>
  <script src="//cdn.jsdelivr.net/npm/dompurify@2.3.5/dist/purify.min.js"></script>
  <script src="/static/browse/0.3.4/js/toggle-labs.js?20230622" type="text/javascript"></script>
  <script src="/static/browse/0.3.4/js/cite.js" type="text/javascript"></script><meta name="citation_title" content="InfinityMATH: A Scalable Instruction Tuning Dataset in Programmatic Mathematical Reasoning" /><meta name="citation_author" content="Zhang, Bo-Wen" /><meta name="citation_author" content="Yan, Yan" /><meta name="citation_author" content="Li, Lin" /><meta name="citation_author" content="Liu, Guang" /><meta name="citation_doi" content="10.1145/3627673.3679122" /><meta name="citation_date" content="2024/08/09" /><meta name="citation_online_date" content="2024/08/09" /><meta name="citation_pdf_url" content="http://arxiv.org/pdf/2408.07089" /><meta name="citation_arxiv_id" content="2408.07089" /><meta name="citation_abstract" content="Recent advancements in Chain-of-Thoughts (CoT) and Program-of-Thoughts (PoT) methods have greatly enhanced language models&#39; mathematical reasoning capabilities, facilitating their integration into instruction tuning datasets with LLMs. However, existing methods for large-scale dataset creation require substantial seed data and high computational costs for data synthesis, posing significant challenges for scalability. We introduce InfinityMATH, a scalable instruction tuning dataset for programmatic mathematical reasoning. The construction pipeline emphasizes decoupling numbers from mathematical problems to synthesize number-independent programs, enabling efficient and flexible scaling while minimizing dependency on specific numerical values. Fine-tuning experiments with open-source language and code models, such as Llama2 and CodeLlama, demonstrate the practical benefits of InfinityMATH. These fine-tuned models, showed significant relative improvements on both in-domain and out-of-domain benchmarks, ranging from 184.7% to 514.3% on average. Additionally, these models exhibited high robustness on the GSM8K+ and MATH+ benchmarks, which are enhanced version of test sets with simply the number variations. InfinityMATH ensures that models are more versatile and effective across a broader range of mathematical problems. The data is available at https://huggingface.co/datasets/flagopen/InfinityMATH." />
</head>

<body  class="with-cu-identity">
  
  <aside class="slider-wrapper bps-banner forum grey">
    <a class="close-slider bps-banner" href="#"><img src="/static/browse/0.3.4/images/icons/close-slider.png" alt="close this message"></a>
  	<div class="columns">
      <img role="presentation" class="bps-banner-image" src="/static/browse/0.3.4/images/events/arxiv-forum-logotype-title.png" alt="arXiv Accessibility Forum 2024">
      <div class="copy-donation bps-banner">
        <h2 id="forum-session-title"></h2>
        <p id="forum-session-link-small"></p>
      </div>
      <div class="amount-donation bps-banner">
          <div id="forum-session-link-box" class="donate-cta"></div>
      </div>
    </div>
  </aside>
  <script src="/static/browse/0.3.4/js/rotate_forum_info.js" type="text/javascript"></script>
  <div class="flex-wrap-footer">
    <header>
      <a href="#content" class="is-sr-only">Skip to main content</a>
      <!-- start desktop header -->
      <div class="columns is-vcentered is-hidden-mobile" id="cu-identity">
        <div class="column" id="cu-logo">
          <a href="https://www.cornell.edu/"><img src="/static/browse/0.3.4/images/icons/cu/cornell-reduced-white-SMALL.svg" alt="Cornell University" /></a>
        </div><div class="column banner-minimal forum">
            <!-- /from July 7 at 1:00 AM to Sept 2 at 1:00 AM --><p>This week: the arXiv Accessibility Forum</p>
            <a href="https://accessibility2024.arxiv.org/schedule" target="_blank">Forum Schedule</a></div><div class="column" id="support-ack">
          <span id="support-ack-url">We gratefully acknowledge support from the Simons Foundation, <a href="https://info.arxiv.org/about/ourmembers.html">member institutions</a>, and all contributors.</span>
          <a href="https://info.arxiv.org/about/donate.html" class="btn-header-donate">Donate</a>
        </div>
      </div>

      <div id="header" class="is-hidden-mobile">
<a aria-hidden="true" href="{url_path('ignore_me')}"></a>
  <div class="header-breadcrumbs is-hidden-mobile">
    <a href="/"><img src="/static/browse/0.3.4/images/arxiv-logo-one-color-white.svg" alt="arxiv logo" style="height:40px;"/></a> <span>&gt;</span> <a href="/list/cs/recent">cs</a> <span>&gt;</span> arXiv:2408.07089
  </div>
          <div class="search-block level-right">
    <form class="level-item mini-search" method="GET" action="https://arxiv.org/search">
      <div class="field has-addons">
        <div class="control">
          <input class="input is-small" type="text" name="query" placeholder="Search..." aria-label="Search term or terms" />
          <p class="help"><a href="https://info.arxiv.org/help">Help</a> | <a href="https://arxiv.org/search/advanced">Advanced Search</a></p>
        </div>
        <div class="control">
          <div class="select is-small">
            <select name="searchtype" aria-label="Field to search">
              <option value="all" selected="selected">All fields</option>
              <option value="title">Title</option>
              <option value="author">Author</option>
              <option value="abstract">Abstract</option>
              <option value="comments">Comments</option>
              <option value="journal_ref">Journal reference</option>
              <option value="acm_class">ACM classification</option>
              <option value="msc_class">MSC classification</option>
              <option value="report_num">Report number</option>
              <option value="paper_id">arXiv identifier</option>
              <option value="doi">DOI</option>
              <option value="orcid">ORCID</option>
              <option value="author_id">arXiv author ID</option>
              <option value="help">Help pages</option>
              <option value="full_text">Full text</option>
            </select>
          </div>
        </div>
        <input type="hidden" name="source" value="header">
        <button class="button is-small is-cul-darker">Search</button>
      </div>
    </form>
  </div>
     </div><!-- /end desktop header -->

      <div class="mobile-header">
        <div class="columns is-mobile">
          <div class="column logo-arxiv"><a href="https://arxiv.org/"><img src="/static/browse/0.3.4/images/arxiv-logomark-small-white.svg" alt="arXiv logo" style="height:60px;" /></a></div>
          <div class="column logo-cornell"><a href="https://www.cornell.edu/">
            <picture>
              <source media="(min-width: 501px)"
                srcset="/static/browse/0.3.4/images/icons/cu/cornell-reduced-white-SMALL.svg  400w"
                sizes="400w" />
              <source srcset="/static/browse/0.3.4/images/icons/cu/cornell_seal_simple_black.svg 2x" />
              <img src="/static/browse/0.3.4/images/icons/cu/cornell-reduced-white-SMALL.svg" alt="Cornell University Logo" />
            </picture>
          </a></div>
          <div class="column nav" id="toggle-container" role="menubar">
            <button class="toggle-control"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="icon filter-white"><title>open search</title><path d="M505 442.7L405.3 343c-4.5-4.5-10.6-7-17-7H372c27.6-35.3 44-79.7 44-128C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c48.3 0 92.7-16.4 128-44v16.3c0 6.4 2.5 12.5 7 17l99.7 99.7c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.6.1-34zM208 336c-70.7 0-128-57.2-128-128 0-70.7 57.2-128 128-128 70.7 0 128 57.2 128 128 0 70.7-57.2 128-128 128z"/></svg></button>
            <div class="mobile-toggle-block toggle-target">
              <form class="mobile-search-form" method="GET" action="https://arxiv.org/search">
                <div class="field has-addons">
                  <input class="input" type="text" name="query" placeholder="Search..." aria-label="Search term or terms" />
                  <input type="hidden" name="source" value="header">
                  <input type="hidden" name="searchtype" value="all">
                  <button class="button">GO</button>
                </div>
              </form>
            </div>

            <button class="toggle-control"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512" class="icon filter-white" role="menu"><title>open navigation menu</title><path d="M16 132h416c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H16C7.163 60 0 67.163 0 76v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z"/ ></svg></button>
            <div class="mobile-toggle-block toggle-target">
              <nav class="mobile-menu" aria-labelledby="mobilemenulabel">
                <h2 id="mobilemenulabel">quick links</h2>
                <ul>
                    <li><a href="https://arxiv.org/login">Login</a></li>
                    <li><a href="https://info.arxiv.org/help">Help Pages</a></li>
                    <li><a href="https://info.arxiv.org/about">About</a></li>
                </ul>
              </nav>
            </div>
          </div>
        </div>
      </div><!-- /end mobile-header -->
    </header>

    <main>
      <div id="content">
<!--
rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
         xmlns:dc="http://purl.org/dc/elements/1.1/"
         xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
    <rdf:Description
        rdf:about="/abs/2408.07089"
        dc:identifier="/abs/2408.07089"
        dc:title="InfinityMATH: A Scalable Instruction Tuning Dataset in Programmatic Mathematical Reasoning"
        trackback:ping="/trackback/2408.07089" />
    </rdf:RDF>
--><div id="abs-outer">

  <div class="leftcolumn">
    <div class="subheader">
      <h1>Computer Science > Machine Learning</h1>
    </div>

    <div class="header-breadcrumbs-mobile">
      <strong>arXiv:2408.07089</strong> (cs)
    </div>
<link rel="stylesheet" type="text/css" href="/static/base/1.0.1/css/abs.css">
<div id="content-inner">
  <div id="abs">
    <div class="dateline">
  [Submitted on 9 Aug 2024]</div>
    <h1 class="title mathjax"><span class="descriptor">Title:</span>InfinityMATH: A Scalable Instruction Tuning Dataset in Programmatic Mathematical Reasoning</h1>
    <div class="authors"><span class="descriptor">Authors:</span><a href="https://arxiv.org/search/cs?searchtype=author&amp;query=Zhang,+B">Bo-Wen Zhang</a>, <a href="https://arxiv.org/search/cs?searchtype=author&amp;query=Yan,+Y">Yan Yan</a>, <a href="https://arxiv.org/search/cs?searchtype=author&amp;query=Li,+L">Lin Li</a>, <a href="https://arxiv.org/search/cs?searchtype=author&amp;query=Liu,+G">Guang Liu</a></div>            <div id="download-button-info" hidden>View a PDF of the paper titled InfinityMATH: A Scalable Instruction Tuning Dataset in Programmatic Mathematical Reasoning, by Bo-Wen Zhang and 3 other authors</div>
    <a class="mobile-submission-download" href="/pdf/2408.07089">View PDF</a>
    <a class="mobile-submission-download" href="https://arxiv.org/html/2408.07089v1">HTML (experimental)</a>



    <blockquote class="abstract mathjax">
            <span class="descriptor">Abstract:</span>Recent advancements in Chain-of-Thoughts (CoT) and Program-of-Thoughts (PoT) methods have greatly enhanced language models&#39; mathematical reasoning capabilities, facilitating their integration into instruction tuning datasets with LLMs. However, existing methods for large-scale dataset creation require substantial seed data and high computational costs for data synthesis, posing significant challenges for scalability. We introduce InfinityMATH, a scalable instruction tuning dataset for programmatic mathematical reasoning. The construction pipeline emphasizes decoupling numbers from mathematical problems to synthesize number-independent programs, enabling efficient and flexible scaling while minimizing dependency on specific numerical values. Fine-tuning experiments with open-source language and code models, such as Llama2 and CodeLlama, demonstrate the practical benefits of InfinityMATH. These fine-tuned models, showed significant relative improvements on both in-domain and out-of-domain benchmarks, ranging from 184.7% to 514.3% on average. Additionally, these models exhibited high robustness on the GSM8K+ and MATH+ benchmarks, which are enhanced version of test sets with simply the number variations. InfinityMATH ensures that models are more versatile and effective across a broader range of mathematical problems. The data is available at <a href="https://huggingface.co/datasets/flagopen/InfinityMATH" rel="external noopener nofollow" class="link-external link-https">this https URL</a>.
    </blockquote>

    <!--CONTEXT-->
    <div class="metatable">
      <table summary="Additional metadata">        <tr>
          <td class="tablecell label">Comments:</td>
          <td class="tablecell comments mathjax">Accepted by CIKM 2024</td>
        </tr>
<tr>
          <td class="tablecell label">Subjects:</td>
          <td class="tablecell subjects">
            <span class="primary-subject">Machine Learning (cs.LG)</span>; Artificial Intelligence (cs.AI)</td>
        </tr>        <tr>
          <td class="tablecell label"><abbr title="Association of Computing Machinery Classification">ACM</abbr>&nbsp;classes:</td>
          <td class="tablecell acm-classes">I.2.7</td>
        </tr>
<tr>
          <td class="tablecell label">Cite as:</td>
          <td class="tablecell arxivid"><span class="arxivid"><a href="https://arxiv.org/abs/2408.07089">arXiv:2408.07089</a> [cs.LG]</span></td>
        </tr>
        <tr>
          <td class="tablecell label">&nbsp;</td>
          <td class="tablecell arxividv">(or <span class="arxivid">
              <a href="https://arxiv.org/abs/2408.07089v1">arXiv:2408.07089v1</a> [cs.LG]</span> for this version)
          </td>
        </tr>
        <tr>
          <td class="tablecell label">&nbsp;</td>
          <td class="tablecell arxivdoi">              <a href="https://doi.org/10.48550/arXiv.2408.07089"  id="arxiv-doi-link">https://doi.org/10.48550/arXiv.2408.07089</a><div class="button-and-tooltip">
              <button class="more-info" aria-describedby="more-info-desc-1">
                <svg height="15" role="presentation" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z" class=""></path></svg>
                <span class="visually-hidden">Focus to learn more</span>
              </button>
              <!-- tooltip description -->
              <div role="tooltip" id="more-info-desc-1">
                <span class="left-corner"></span>                  arXiv-issued DOI via DataCite</div>
            </div>
          </td>
        </tr>        <tr>
          <td class="tablecell label">
            <abbr title="Digital Object Identifier">Related DOI</abbr>:
          </td>
          <td class="tablecell doi"><a href="https://doi.org/10.1145/3627673.3679122" data-doi="10.1145/3627673.3679122" class="link-https link-external" rel="external noopener nofollow">https://doi.org/10.1145/3627673.3679122</a>

            <!-- accessible tooltip example -->
            <div class="button-and-tooltip">
              <button class="more-info" aria-describedby="more-info-desc-1">
                <svg height="15" role="presentation" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z" class=""></path></svg>
                <span class="visually-hidden">Focus to learn more</span>
              </button>
              <!-- tooltip description -->
              <div role="tooltip" id="more-info-desc-1">
                <span class="left-corner"></span>
                DOI(s) linking to related resources
              </div>
            </div>
          </td>
        </tr>
</table>
    </div>
  </div>
</div>
    <div class="submission-history">
      <h2>Submission history</h2> From: Bo-Wen Zhang [<a href="/show-email/b62a29b6/2408.07089">view email</a>]      <br/>    <strong>[v1]</strong>
        Fri, 9 Aug 2024 08:18:20 UTC (3,021 KB)<br/>
</div>
  </div>
  <!--end leftcolumn-->
<div class="extra-services">    <div class="full-text">
      <a name="other"></a>
      <span class="descriptor">Full-text links:</span>
      <h2>Access Paper:</h2>
      <ul>
  <div id="download-button-info" hidden>
View a PDF of the paper titled InfinityMATH: A Scalable Instruction Tuning Dataset in Programmatic Mathematical Reasoning, by Bo-Wen Zhang and 3 other authors</div><li><a href="/pdf/2408.07089" aria-describedby="download-button-info" accesskey="f" class="abs-button download-pdf">View PDF</a></li><li><a href="https://arxiv.org/html/2408.07089v1" class="abs-button" id="latexml-download-link">HTML (experimental)</a></li><li><a href="/src/2408.07089" class="abs-button download-eprint">TeX Source</a></li><li><a href="/format/2408.07089" class="abs-button download-format">Other Formats</a></li></ul>
      <div class="abs-license"><a href="http://creativecommons.org/licenses/by-nc-sa/4.0/" title="Rights to this article" class="has_license">
          <img alt="license icon" role="presentation" src="https://arxiv.org/icons/licenses/by-nc-sa-4.0.png"/>
          <span>view license</span>
        </a></div>
    </div>
    <!--end full-text-->    <div class="browse">
    Current browse context: <div class="current">cs.LG</div>

  <div class="prevnext">
<span class="arrow">
      <a class="abs-button prev-url" href="/prevnext?id=2408.07089&amp;function=prev&amp;context=cs.LG"
         accesskey="p" title="previous in cs.LG (accesskey p)">&lt;&nbsp;prev</a>
    </span>
    <span class="is-hidden-mobile">&nbsp; | &nbsp;</span>    <span class="arrow">
      <a class="abs-button next-url" href="/prevnext?id=2408.07089&amp;function=next&amp;context=cs.LG" accesskey="n"
         title="next in cs.LG (accesskey n)">next&nbsp;&gt;</a>
    </span><br/>
  </div><div class="list">
    <a class="abs-button abs-button-grey abs-button-small context-new" href="/list/cs.LG/new">new</a>
    <span class="is-hidden-mobile"> | </span>
    <a class="abs-button abs-button-grey abs-button-small context-recent" href="/list/cs.LG/recent">recent</a>
    <span class="is-hidden-mobile"> | </span><a class="abs-button abs-button-grey abs-button-small context-id" href="/list/cs.LG/2024-08">2024-08</a>
  </div><div class="abs-switch-cat">
    Change to browse by:
    <div class="switch context-change">
        <a href="/abs/2408.07089?context=cs">cs</a><br class="is-hidden-mobile">
        <a class="subclass" href="/abs/2408.07089?context=cs.AI">cs.AI</a><br class="is-hidden-mobile">
    </div>
  </div>

    </div>

    <div class="extra-ref-cite">
      <h3>References &amp; Citations</h3>
      <ul>
        <li><a  class="abs-button abs-button-small cite-ads" href="https://ui.adsabs.harvard.edu/abs/arXiv:2408.07089">NASA ADS</a></li><li><a  class="abs-button abs-button-small cite-google-scholar" href="https://scholar.google.com/scholar_lookup?arxiv_id=2408.07089" target="_blank" rel="noopener">Google Scholar</a></li>
        <li><a  class="abs-button abs-button-small cite-semantic-scholar" href="https://api.semanticscholar.org/arXiv:2408.07089" target="_blank" rel="noopener">Semantic Scholar</a></li>
      </ul>
      <div style="clear:both;"></div>
    </div>

<div class='extra-ref-cite'>
    <a id='bib-cite-css' hidden='true' href='/static/browse/0.3.4/css/cite.css'>a</a>

    <span id='bib-cite-trigger' class="bib-cite-button abs-button">export BibTeX citation</span>
    <span id='bib-cite-loading' hidden='true'>Loading...</span>
</div>

<div id='bib-cite-modal' class='bib-modal' hidden='true'>
    <div class='bib-modal-content'>
        <div class='bib-modal-title'>
            <h2>BibTeX formatted citation</h2>
            <span class='bib-modal-close' >&times;</span>
        </div>
        <div>
            <textarea id='bib-cite-target' class="bib-citation-content" aria-label="loading the citation">loading...</textarea>
        </div>
        <div>
            <span>Data provided by: </span>
            <a id='bib-cite-source-api'></a>
        </div>
    </div>
</div><div class="bookmarks">
  <div><h3>Bookmark</h3></div><a class="abs-button abs-button-grey abs-button-small" href="http://www.bibsonomy.org/BibtexHandler?requTask=upload&amp;url=https://arxiv.org/abs/2408.07089&amp;description=InfinityMATH: A Scalable Instruction Tuning Dataset in Programmatic Mathematical Reasoning"
     title="Bookmark on BibSonomy">
    <img src="/static/browse/0.3.4/images/icons/social/bibsonomy.png"
         alt="BibSonomy logo"/>
  </a>
  <a class="abs-button abs-button-grey abs-button-small" href="https://reddit.com/submit?url=https://arxiv.org/abs/2408.07089&amp;title=InfinityMATH: A Scalable Instruction Tuning Dataset in Programmatic Mathematical Reasoning"
     title="Bookmark on Reddit">
    <img src="/static/browse/0.3.4/images/icons/social/reddit.png"
         alt="Reddit logo"/>
  </a>
</div>  </div>
  <!--end extra-services-->
<!-- LABS AREA -->
<div id="labstabs">
  <div class="labstabs"><input type="radio" name="tabs" id="tabone"checked="checked">
    <label for="tabone">Bibliographic Tools</label>
    <div class="tab labs-display-bib">
      <h1>Bibliographic and Citation Tools</h1>
      <div class="toggle">
        <div class="columns is-mobile lab-row">
          <div class="column lab-switch">
            <label class="switch">
              <input id="bibex-toggle" type="checkbox" class="lab-toggle">
              <span class="slider"></span>
              <span class="is-sr-only">Bibliographic Explorer Toggle</span>
            </label>
          </div>
          <div class="column lab-name">
            <span id="label-for-bibex">Bibliographic Explorer</span> <em>(<a href="https://info.arxiv.org/labs/showcase.html#arxiv-bibliographic-explorer">What is the Explorer?</a>)</em>
          </div>
        </div>
<div class="columns is-mobile lab-row">
          <div class="column lab-switch">
            <label class="switch">
              <input
                id="litmaps-toggle"
                type="checkbox"
                class="lab-toggle"
                data-script-url="/static/browse/0.3.4/js/litmaps.js?20210617"
                aria-labelledby="label-for-litmaps">
              <span class="slider"></span>
              <span class="is-sr-only">Litmaps Toggle</span>
            </label>
          </div>
          <div class="column lab-name">
            <span id="label-for-litmaps">Litmaps</span> <em>(<a href="https://www.litmaps.co/" target="_blank">What is Litmaps?</a>)</em>
          </div>
        </div>
        <div class="columns is-mobile lab-row">
          <div class="column lab-switch">
            <label class="switch">
              <input
                id="scite-toggle"
                type="checkbox"
                class="lab-toggle"
                data-script-url="/static/browse/0.3.4/js/scite.js?20210617"
                aria-labelledby="label-for-scite">
              <span class="slider"></span>
              <span class="is-sr-only">scite.ai Toggle</span>
            </label>
          </div>
          <div class="column lab-name">
            <span id="label-for-scite">scite Smart Citations</span> <em>(<a href="https://www.scite.ai/" target="_blank">What are Smart Citations?</a>)</em>
          </div>
        </div>
      </div>
        <div class="labs-content-placeholder labs-display" style="display: none;"></div>
        <div style="min-height: 15px" id="litmaps-open-in"></div>
        <div style="min-height: 15px" id="scite-open-in"></div>
    </div>


    <input type="radio" name="tabs" id="tabtwo">
    <label for="tabtwo">Code, Data, Media</label>
    <div class="tab">
      <h1>Code, Data and Media Associated with this Article</h1>
      <div class="toggle">
        <div class="columns is-mobile lab-row">
          <div class="column lab-switch">
            <label class="switch">
              <input        
                id="catalyzex-toggle"
                data-script-url="/static/browse/0.3.4/js/catalyzex.js"
                type="checkbox" class="lab-toggle" aria-labelledby="label-for-cx">
              <span class="slider"></span>
              <span class="is-sr-only">Links to Code Toggle</span>
            </label>
          </div>
          <div class="column lab-name">
            <span id="label-for-cx">CatalyzeX Code Finder for Papers</span> <em>(<a href="https://www.catalyzex.com" target="_blank">What is CatalyzeX?</a>)</em>
          </div>
        </div>

        <div class="columns is-mobile lab-row">
          <div class="column lab-switch">
            <label class="switch">
              <input
                id="dagshub-toggle"
                data-script-url="/static/browse/0.3.4/js/dagshub.js"
                type="checkbox" class="lab-toggle" aria-labelledby="label-for-dagshub">
              <span class="slider"></span>
              <span class="is-sr-only">DagsHub Toggle</span>
            </label>
          </div>
          <div class="column lab-name">
            <span id="label-for-dagshub">DagsHub</span> <em>(<a href="https://dagshub.com/" target="_blank">What is DagsHub?</a>)</em>
          </div>
        </div>
  
        <div class="columns is-mobile lab-row">
          <div class="column lab-switch">
            <label class="switch">
              <input
                id="gotitpub-toggle"
                data-script-url="/static/browse/0.3.4/js/gotitpub.js"
                type="checkbox" class="lab-toggle" aria-labelledby="label-for-gotitpub">
              <span class="slider"></span>
              <span class="is-sr-only">GotitPub Toggle</span>
            </label>
          </div>
          <div class="column lab-name">
            <span id="label-for-gotitpub">Gotit.pub</span> <em>(<a href="http://gotit.pub/faq" target="_blank">What is GotitPub?</a>)</em>
          </div>
        </div>

        <div class="columns is-mobile lab-row">
          <div class="column lab-switch">
            <label class="switch">
              <input
                id="paperwithcode-toggle"
                data-script-url="/static/browse/0.3.4/js/paperswithcode.js"
                type="checkbox" class="lab-toggle" aria-labelledby="label-for-pwc">
              <span class="slider"></span>
              <span class="is-sr-only">Links to Code Toggle</span>
            </label>
          </div>
          <div class="column lab-name">
            <span id="label-for-pwc">Papers with Code</span> <em>(<a href="https://paperswithcode.com/" target="_blank">What is Papers with Code?</a>)</em>
          </div>
        </div>


        <div class="columns is-mobile lab-row">
          <div class="column lab-switch">
            <label class="switch">
              <input
                id="sciencecast-toggle"
                data-script-url="/static/browse/0.3.4/js/sciencecast.js"
                type="checkbox" class="lab-toggle" aria-labelledby="label-for-sciencecast">
              <span class="slider"></span>
              <span class="is-sr-only">ScienceCast Toggle</span>
            </label>
          </div>
          <div class="column lab-name">
            <span id="label-for-sciencecast">ScienceCast</span> <em>(<a href="https://sciencecast.org/welcome" target="_blank">What is ScienceCast?</a>)</em>
          </div>
        </div>
      </div>

      <div id="catalyzex-output" style="display:none"></div>
      <div id="dagshub-output" style="display:none"></div>
      <div id="gotitpub-output" style="display:none"></div>
      <div id="pwc-output" style="display:none"></div>
      <div id="pwc-data-output" style="display:none"></div>
      <div id="sciencecast-output" style="display:none"></div>
    </div>


      <input type="radio" name="tabs" id="labstabs-demos-input">
      <label for="labstabs-demos-input" id="labstabs-demos-label">Demos</label>
      <div class="tab">
        <h1>Demos</h1>
        <div class="toggle">
          <div class="columns is-mobile lab-row">
            <div class="column lab-switch">
              <label class="switch">
                <input
                  id="replicate-toggle"
                  data-script-url="/static/browse/0.3.4/js/replicate.js"
                  type="checkbox" class="lab-toggle" aria-labelledby="label-for-replicate">
                <span class="slider"></span>
                <span class="is-sr-only">Replicate Toggle</span>
              </label>
            </div>
            <div class="column lab-name">
              <span id="label-for-replicate">Replicate</span> <em>(<a href="https://replicate.com/docs/arxiv/about" target="_blank">What is Replicate?</a>)</em>
            </div>
          </div>
          <div class="columns is-mobile lab-row">
            <div class="column lab-switch">
              <label class="switch">
                <input
                  id="spaces-toggle"
                  data-script-url="/static/browse/0.3.4/js/spaces.js"
                  type="checkbox" class="lab-toggle" aria-labelledby="label-for-spaces">
                <span class="slider"></span>
                <span class="is-sr-only">Spaces Toggle</span>
              </label>
            </div>
            <div class="column lab-name">
              <span id="label-for-spaces">Hugging Face Spaces</span> <em>(<a href="https://huggingface.co/docs/hub/spaces" target="_blank">What is Spaces?</a>)</em>
            </div>
          </div>
          <div class="columns is-mobile lab-row">
            <div class="column lab-switch">
              <label class="switch">
                <input
                  id="txyz-toggle"
                  data-script-url="/static/browse/0.3.4/js/txyz.js"
                  type="checkbox" class="lab-toggle" aria-labelledby="label-for-txyz">
                <span class="slider"></span>
                <span class="is-sr-only">Spaces Toggle</span>
              </label>
            </div>
            <div class="column lab-name">
              <span id="label-for-txyz">TXYZ.AI</span> <em>(<a href="https://txyz.ai" target="_blank">What is TXYZ.AI?</a>)</em>
            </div>
          </div>
        </div>
        <div id="replicate-output"></div>
        <div id="spaces-output"></div>
        <div id="txyz-output"></div>
      </div>
      <input type="radio" name="tabs" id="tabfour">
      <label for="tabfour">Related Papers</label>
      <div class="tab">
        <h1>Recommenders and Search Tools</h1>
        <div class="toggle">
          <div class="columns is-mobile lab-row">
            <div class="column lab-switch">
              <label class="switch">
                <input id="influenceflower-toggle"
                data-script-url="/static/browse/0.3.4/js/influenceflower.js"
                type="checkbox" class="lab-toggle" aria-labelledby="label-for-influenceflower">
                <span class="slider"></span>
                <span class="is-sr-only">Link to Influence Flower</span>
              </label>
            </div>
            <div class="column lab-name">
              <span id="label-for-influenceflower">Influence Flower</span> <em>(<a href="https://influencemap.cmlab.dev/" target="_blank">What are Influence Flowers?</a>)</em>
            </div>
          </div>
          <div class="columns is-mobile lab-row">
            <div class="column lab-switch">
              <label class="switch">
                <input id="connectedpapers-toggle" type="checkbox" class="lab-toggle"
                       data-script-url="/static/browse/0.3.4/js/connectedpapers.js"
                       aria-labelledby="label-for-connected-papers" >
                <span class="slider"></span>
                <span class="is-sr-only">Connected Papers Toggle</span>
              </label>
            </div>
            <div class="column lab-name">
              <span id="label-for-connected-papers">Connected Papers</span> <em>(<a href="https://www.connectedpapers.com/about" target="_blank">What is Connected Papers?</a>)</em>
            </div>
          </div>
          <div class="columns is-mobile lab-row">
            <div class="column lab-switch">
              <label class="switch">
                <input id="core-recommender-toggle" type="checkbox" class="lab-toggle" aria-labelledby="label-for-core">
                <span class="slider"></span>
                <span class="is-sr-only">Core recommender toggle</span>
              </label>
            </div>
            <div class="column lab-name">
              <span id="label-for-core">CORE Recommender</span> <em>(<a href="https://core.ac.uk/services/recommender">What is CORE?</a>)</em>
            </div>
          </div>          <div class="columns is-mobile lab-row">
            <div class="column lab-switch">
              <label class="switch">
                <input id="iarxiv-toggle"
                       type="checkbox"
                       class="lab-toggle"
                       data-script-url="/static/browse/0.3.4/js/iarxiv.js"
                       aria-labelledby="label-for-iarxiv">
                <span class="slider"></span>
                <span class="is-sr-only">IArxiv recommender toggle</span>
              </label>
            </div>
            <div class="column lab-name">
              <span id="label-for-iarxiv">IArxiv Recommender</span>
              <em>(<a href="https://iarxiv.org/about">What is IArxiv?</a>)</em>
            </div>
          </div>
</div>
        <div id="influenceflower-output"></div>
        <div id="influenceflower-output-graph" style="display:none">
          <ul class="flower-tabs">
            <li class="active"><a class="btn tab-btn" onclick="openTab(event, 'tab-author')">Author</a></li>
            <li><a class="btn tab-btn" onclick="openTab(event, 'tab-venue')">Venue</a></li>
            <li><a class="btn tab-btn" onclick="openTab(event, 'tab-inst')">Institution</a></li>
            <li><a class="btn tab-btn" onclick="openTab(event, 'tab-topic')">Topic</a></li>
          </ul>
          <div class="flower-tab-content">
            <div class="tab-flower active" id="tab-author"><svg id="flower-graph-author"></svg></div>
            <div class="tab-flower" id="tab-venue"><svg id="flower-graph-venue"></svg></div>
            <div class="tab-flower" id="tab-inst"><svg id="flower-graph-inst"></svg></div>
            <div class="tab-flower" id="tab-topic"><svg id="flower-graph-topic"></svg></div>
          </div>
        </div>
        <div style="min-height: 15px" id="connectedpapers-output"></div>
        <div id="coreRecommenderOutput"></div>
        <div id="iarxivOutput"></div>
      </div>

      <input type="radio" name="tabs" id="tabfive">
      <label for="tabfive">
        About arXivLabs
      </label>
      <div class="tab">
        <div class="columns">
          <div class="column">
            <h1>arXivLabs: experimental projects with community collaborators</h1>
            <p>arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website.</p>
            <p>Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them.</p>
            <p>Have an idea for a project that will add value for arXiv's community? <a href="https://info.arxiv.org/labs/index.html"><strong>Learn more about arXivLabs</strong></a>.</p>
          </div>
          <div class="column is-narrow is-full-mobile">
            <p class="icon-labs"><svg xmlns="http://www.w3.org/2000/svg" role="presentation" viewBox="0 0 635.572 811"><path d="M175.6 676v27h-27v-27zm-54 27v27h27v-27zm-27 27v27h27v-27zm396-54v27h-27v-27zm0 27v27h27v-27zm27 27v27h27v-27zm-27-414h27v27h-27zm27 0h27v-27h-27zm27-27h27v-27h-27zm-396 45h-27v-27h27zm-27-54h-27v27h27zm-27-27h-27v27h27z"/><path d="M94.6 730v27h-27v-27zm477 0v27h-27v-27zm-27-495h27v27h-27zm-450 18h-27v-27h27zm477 9h27v27h-27zm-54 495h27v27h-27zm-423 0h27v27h-27zm-54-504h27v27h-27z" fill="#666"/><path d="M67.6 730v27h-27v-27zm54 54v27h-27v-27zm0-108v27h27v-27zm-27 27v27h27v-27zm-81 0v27h27v-27zm585 27v27h-27v-27zm-108-54v27h27v-27zm27 27v27h27v-27zm81 0v27h27v-27zm-54-495h27v27h-27zm-54 108h27v-27h-27zm27-27h27v-27h-27zm0-81h27v-27h-27zm-423 18h-27v-27h27zm54 54h-27v27h27zm-27-27h-27v27h27zm0-81h-27v27h27zm423 612v27h-27v-27zm81-522v27h-27v-27zm-585-9v27h-27v-27z" fill="#999"/><path d="M94.6 784v27h-27v-27zm-27-27v27h27v-27zm-27-54v27h27v-27zm27 0v27h27v-27zm0-27v27h27v-27zm27 0v27h27v-27zm0-27v27h27v-27zm27 0v27h27v-27zm-108 81v27h27v-27zm558 54v27h-27v-27zm-27-27v27h27v-27zm27-54v27h27v-27zm-27 0v27h27v-27zm0-27v27h27v-27zm-27 0v27h27v-27zm0-27v27h27v-27zm-27 0v27h27v-27zm108 81v27h27v-27zm0-495h27v27h-27zm-27 27h27v-27h-27zm-54-27h27v-27h-27zm0 27h27v-27h-27zm-27 0h27v-27h-27zm0 27h27v-27h-27zm-27 0h27v-27h-27zm0 27h27v-27h-27zm81-108h27v-27h-27zm-504 45h-27v-27h27zm27-27h-27v27h27zm54-27h-27v27h27zm0 27h-27v27h27zm27 0h-27v27h27zm0 27h-27v27h27zm27 0h-27v27h27zm0 27h-27v27h27zm-81-108h-27v27h27z" fill="#ccc"/><path d="M598.6 665.1H41.5C-76.5 667 176 280.2 176 280.2h53a46.5 46.5 0 0162.8-56.3 29.2 29.2 0 1128.5 35.9h-1a46.5 46.5 0 01-1.5 20.3l142.5-.1s255.3 387 138.3 385.1zM291 181a29.3 29.3 0 10-29.2-29.3A29.3 29.3 0 00291 181zm65.4-66.8a22.4 22.4 0 10-22.5-22.4 22.4 22.4 0 0022.5 22.4z" fill="#fc0"/><path d="M245.5 172V10h153v162s324 495 198 495h-558c-126 0 207-495 207-495zm126 54h56m-13 72h56m-9 72h56m-20 72h56m-22 72h56m-29 72h56m-457-45c20.8 41.7 87.3 81 160.7 81 72.1 0 142.1-38.2 163.4-81" fill="none" stroke="#000" stroke-miterlimit="10" stroke-width="20"/><path d="M273.3 421.7c0 31-9.8 56.3-21.9 56.3s-21.8-25.2-21.8-56.3 9.8-56.3 21.8-56.3 21.9 25.2 21.9 56.3zm114.4-56.3c-12 0-21.8 25.2-21.8 56.3s9.7 56.3 21.8 56.3 21.9-25.2 21.9-56.3-9.8-56.3-21.9-56.3zM150.1 526.6c-18.2 6.7-27.5 22.9-23.2 30.2s14.8-5.5 33-12.2 37.4-4.9 33-12.2-24.5-12.6-42.8-5.8zm296 5.8c-4.2 7.3 14.9 5.5 33.1 12.2s28.7 19.5 33 12.2-5-23.5-23.2-30.2-38.5-1.5-42.8 5.8z"/></svg></p>
          </div>
        </div>
      </div>

    </div>
</div>
<!-- END LABS AREA -->
  <div class="endorsers">
    <a href="/auth/show-endorsers/2408.07089" class="endorser-who">Which authors of this paper are endorsers?</a> |
    <a id="mathjax_toggle" href="javascript:setMathjaxCookie()">Disable MathJax</a> (<a href="https://info.arxiv.org/help/mathjax.html">What is MathJax?</a>)
    <span class="help" style="font-style: normal; float: right; margin-top: 0; margin-right: 1em;"></span>
  </div>
  <script type="text/javascript" language="javascript">mathjaxToggle();</script>
</div>
      </div>
    </main>

    <footer style="clear: both;">
      <div class="columns is-desktop" role="navigation" aria-label="Secondary" style="margin: -0.75em -0.75em 0.75em -0.75em">
        <!-- Macro-Column 1 -->
        <div class="column" style="padding: 0;">
          <div class="columns">
            <div class="column">
              <ul style="list-style: none; line-height: 2;">
                <li><a href="https://info.arxiv.org/about">About</a></li>
                <li><a href="https://info.arxiv.org/help">Help</a></li>
              </ul>
            </div>
            <div class="column">
              <ul style="list-style: none; line-height: 2;">
                <li>
                  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="icon filter-black" role="presentation"><title>contact arXiv</title><desc>Click here to contact arXiv</desc><path d="M502.3 190.8c3.9-3.1 9.7-.2 9.7 4.7V400c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V195.6c0-5 5.7-7.8 9.7-4.7 22.4 17.4 52.1 39.5 154.1 113.6 21.1 15.4 56.7 47.8 92.2 47.6 35.7.3 72-32.8 92.3-47.6 102-74.1 131.6-96.3 154-113.7zM256 320c23.2.4 56.6-29.2 73.4-41.4 132.7-96.3 142.8-104.7 173.4-128.7 5.8-4.5 9.2-11.5 9.2-18.9v-19c0-26.5-21.5-48-48-48H48C21.5 64 0 85.5 0 112v19c0 7.4 3.4 14.3 9.2 18.9 30.6 23.9 40.7 32.4 173.4 128.7 16.8 12.2 50.2 41.8 73.4 41.4z"/></svg>
                  <a href="https://info.arxiv.org/help/contact.html"> Contact</a>
                </li>
                <li>
                  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="icon filter-black" role="presentation"><title>subscribe to arXiv mailings</title><desc>Click here to subscribe</desc><path d="M476 3.2L12.5 270.6c-18.1 10.4-15.8 35.6 2.2 43.2L121 358.4l287.3-253.2c5.5-4.9 13.3 2.6 8.6 8.3L176 407v80.5c0 23.6 28.5 32.9 42.5 15.8L282 426l124.6 52.2c14.2 6 30.4-2.9 33-18.2l72-432C515 7.8 493.3-6.8 476 3.2z"/></svg>
                  <a href="https://info.arxiv.org/help/subscribe"> Subscribe</a>
                </li>
              </ul>
            </div>
          </div>
        </div>
        <!-- End Macro-Column 1 -->
        <!-- Macro-Column 2 -->
        <div class="column" style="padding: 0;">
          <div class="columns">
            <div class="column">
              <ul style="list-style: none; line-height: 2;">
                <li><a href="https://info.arxiv.org/help/license/index.html">Copyright</a></li>
                <li><a href="https://info.arxiv.org/help/policies/privacy_policy.html">Privacy Policy</a></li>
              </ul>
            </div>
            <div class="column sorry-app-links">
              <ul style="list-style: none; line-height: 2;">
                <li><a href="https://info.arxiv.org/help/web_accessibility.html">Web Accessibility Assistance</a></li>
                <li>
                  <p class="help">
                    <a class="a11y-main-link" href="https://status.arxiv.org" target="_blank">arXiv Operational Status <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 512" class="icon filter-dark_grey" role="presentation"><path d="M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z"/></svg></a><br>
                    Get status notifications via
                    <a class="is-link" href="https://subscribe.sorryapp.com/24846f03/email/new" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="icon filter-black" role="presentation"><path d="M502.3 190.8c3.9-3.1 9.7-.2 9.7 4.7V400c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V195.6c0-5 5.7-7.8 9.7-4.7 22.4 17.4 52.1 39.5 154.1 113.6 21.1 15.4 56.7 47.8 92.2 47.6 35.7.3 72-32.8 92.3-47.6 102-74.1 131.6-96.3 154-113.7zM256 320c23.2.4 56.6-29.2 73.4-41.4 132.7-96.3 142.8-104.7 173.4-128.7 5.8-4.5 9.2-11.5 9.2-18.9v-19c0-26.5-21.5-48-48-48H48C21.5 64 0 85.5 0 112v19c0 7.4 3.4 14.3 9.2 18.9 30.6 23.9 40.7 32.4 173.4 128.7 16.8 12.2 50.2 41.8 73.4 41.4z"/></svg>email</a>
                    or <a class="is-link" href="https://subscribe.sorryapp.com/24846f03/slack/new" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512" class="icon filter-black" role="presentation"><path d="M94.12 315.1c0 25.9-21.16 47.06-47.06 47.06S0 341 0 315.1c0-25.9 21.16-47.06 47.06-47.06h47.06v47.06zm23.72 0c0-25.9 21.16-47.06 47.06-47.06s47.06 21.16 47.06 47.06v117.84c0 25.9-21.16 47.06-47.06 47.06s-47.06-21.16-47.06-47.06V315.1zm47.06-188.98c-25.9 0-47.06-21.16-47.06-47.06S139 32 164.9 32s47.06 21.16 47.06 47.06v47.06H164.9zm0 23.72c25.9 0 47.06 21.16 47.06 47.06s-21.16 47.06-47.06 47.06H47.06C21.16 243.96 0 222.8 0 196.9s21.16-47.06 47.06-47.06H164.9zm188.98 47.06c0-25.9 21.16-47.06 47.06-47.06 25.9 0 47.06 21.16 47.06 47.06s-21.16 47.06-47.06 47.06h-47.06V196.9zm-23.72 0c0 25.9-21.16 47.06-47.06 47.06-25.9 0-47.06-21.16-47.06-47.06V79.06c0-25.9 21.16-47.06 47.06-47.06 25.9 0 47.06 21.16 47.06 47.06V196.9zM283.1 385.88c25.9 0 47.06 21.16 47.06 47.06 0 25.9-21.16 47.06-47.06 47.06-25.9 0-47.06-21.16-47.06-47.06v-47.06h47.06zm0-23.72c-25.9 0-47.06-21.16-47.06-47.06 0-25.9 21.16-47.06 47.06-47.06h117.84c25.9 0 47.06 21.16 47.06 47.06 0 25.9-21.16 47.06-47.06 47.06H283.1z"/></svg>slack</a>
                  </p>
                </li>
              </ul>
            </div>
          </div>
        </div> <!-- end MetaColumn 2 -->
        <!-- End Macro-Column 2 -->
      </div>
    </footer>
  </div>

  <script src="/static/base/1.0.1/js/member_acknowledgement.js"></script>

</body>

</html>
2408.07089
 lilin000105@163.com China University of Mining & Technology Beijing Beijing, China 
body
Infinitymath **: A Scalable Instruction Tuning Dataset In** Programmatic Mathematical Reasoning
Lin Li
2408.07089
 liuguang@baai.ac.cn Beijing Academy of Artificial Intelligence Beijing, China 
introduction
Infinitymath **: A Scalable Instruction Tuning Dataset In** Programmatic Mathematical Reasoning
Guang Liu
2408.07089
 Recent advancements in Chain-of-Thoughts (CoT) and Program-ofThoughts (PoT) methods have greatly enhanced language models' mathematical reasoning capabilities, facilitating their integration into instruction tuning datasets with LLMs. However, existing methods for large-scale dataset creation require substantial seed data and high computational costs for data synthesis, posing significant challenges for scalability. We introduce **InfinityMath** , a scalable instruction tuning dataset for programmatic mathematical reasoning. The construction pipeline emphasizes decoupling numbers from mathematical problems to synthesize number-independent programs, enabling efficient and flexible scaling while minimizing dependency on specific numerical values. Fine-tuning experiments with open-source language and code models, such as Llama2 and CodeLlama, demonstrate the practical benefits of InfinityMath .  These fine-tuned models, showed significant relative improvements on both in-domain and out-of-domain benchmarks, ranging from 184.7% to 514.3% on average. Additionally, these models exhibited high robustness on the *GSM8K+* and *MATH+* benchmarks, which are enhanced version of test sets with simply the number variations.  InfinityMath ensures that models are more versatile and effective across a broader range of mathematical problems. The data is available at https://huggingface.co/datasets/flagopen/InfinityMATH. 
abstract
Infinitymath **: A Scalable Instruction Tuning Dataset In** Programmatic Mathematical Reasoning
Abstract
2408.07089
 - Computing methodologies → **Language resources**; *Natural* language generation. 
body
Infinitymath **: A Scalable Instruction Tuning Dataset In** Programmatic Mathematical Reasoning
Ccs Concepts
2408.07089
 programmatic mathematical reasoning, data augmentation, data synthesis, decoupled numeric dependencies, logical inconsistencies ∗The corresponding authors.  ``` Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from permissions@acm.org. CIKM '24, October 21–25, 2024, Boise, ID, USA © 2024 Copyright held by the owner/author(s). Publication rights licensed to ACM. ACM ISBN 979-8-4007-0436-9/24/10 https://doi.org/10.1145/3627673.3679122  ```  Yan Yan∗ yanyanustb@126.com China University of Mining & Technology Beijing Beijing, China ACM Reference Format:  ![0_image_0.png](0_image_0.png)  Bo-Wen Zhang, Yan Yan, Lin Li, and Guang Liu. 2024. InfinityMath : A Scalable Instruction Tuning Dataset in Programmatic Mathematical Reasoning. In Proceedings of the 33rd ACM International Conference on Information and Knowledge Management (CIKM '24), October 21–25, 2024, Boise, ID, USA.  ACM, New York, NY, USA, 5 pages. https://doi.org/10.1145/3627673.3679122 
body
Infinitymath **: A Scalable Instruction Tuning Dataset In** Programmatic Mathematical Reasoning
Keywords
2408.07089
 Figure 1: Examples of *Logical Inconsistencies in Reasoning* in LLM-generated programs when simply numerical variations Mathematical reasoning involves understanding concepts, making logical deductions, and performing complex calculations, which are essential for evaluating the overall abilities of Large Language Models (LLMs) [11]. Enhancing model performance in mathematical reasoning is a hot research area. Several studies indicate that fine-tuning on math-specific datasets, covering problems from basic arithmetic to advanced algebra and geometry, significantly improves performance[2].  Recent research highlights that CoT [24] and PoT [4] techniques enhance mathematical reasoning capabilities through guiding models to sequentially unfold reasoning steps, or integrating executable program statements, allowing complex computations to be handled by a program interpreter. Therefore, several studies generate reasoning processes or programming solutions for mathematical problems using models like GPT-4 to synthesize instruction tuning datasets, like OpenMathInstruct-1 [21], MetaMathQA [25] and MathInstruct [26]. However, the limited availability of high-quality mathematical reasoning problems and the high computational cost for data synthesis restrict large-scale data production.  In the context of these scaling challenges, we observed Logical Inconsistencies in Reasoning in LLM-generated programs. Figure 1 shows that minor numerical variations in problems lead to unexpected changes in the program's calculation logic, resulting in reasoning errors. For instance, in **Example Question 1**, altering a discount from 20% to 50% results in an illogical switch from multiplication to division, contradicting consistent discount principles.  Similarly **Example Question 2** highlights a spatial reasoning error where changing the bedroom size results in an incorrect adjustment to the calculation logic. These examples show that slight numerical changes disrupt the program's logic, revealing issues with the reasoning robustness to numerical variations.  We propose **InfinityMath** , a scalable instruction tuning dataset for programmatic mathematical reasoning. The construction of InfinityMath involves a multi-step pipeline: numerical values in mathematical problems are firstly identified and abstracted to generate "universal templates" for questions, then an LLM (such as GPT-4) generates programs independent of these specific values, and finally, the templates are repopulated with varied numbers to broaden the dataset while preserving reasoning logic. Consequently, InfinityMath comprises 101,380 extensible data points generated from 7 high-quality mathematical datasets, formulating an **"infinite mathematical instruction tuning dataset"**.  We fine-tuned the 7B versions of the Llama2 and Aquila2 (language models), as well as the Codellama (code foundation model), with the InfinityMath dataset and evaluated on four in-domain and five out-of-domain benchmarks. Empirical results indicate these fine-tuned models consistently outperform other state-of-the-art models of comparable size on the most benchmarks. Furthermore, to investigate the *Logical Inconsistencies in Reasoning* phenomenon, we created enhanced versions of the GSM8K and MATH test sets, designated GSM8K+ and MATH+, which only modified the numerical values within the problems. Comparative analysis reveals that models trained on InfinityMath exhibit superior accuracy and robustness compared to those trained on other PoT datasets. 
introduction
Infinitymath **: A Scalable Instruction Tuning Dataset In** Programmatic Mathematical Reasoning
Introduction
2408.07089
 The use of large models for solving mathematical problems has become a key research focus, serving as a crucial indicator for assessing the performance of LLMs in complex multi-hop and quantitative reasoning tasks. Researchers have explored various methods to enhance the mathematical reasoning capabilities of LLMs, bridging the gap between closed-source and open-source models.  The Chain-of-Thought (CoT) method, introduced by Wei et al.[24], decomposes mathematical problems into smaller, interconnected tasks. This step-by-step approach enables models to solve complex issues incrementally. Wang et al.[23] enhanced this with the Self-Consistency method, where the model generates multiple reasoning processes and selects the most likely correct answer through voting. Li et al. [13] further developed this by transforming a single prompt into multiple ones, checking intermediate reasoning steps, and applying weighted voting. However, CoT requires language models to generate and compute mathematical expressions, which can be inefficient for tasks like solving polynomial equations or calculus problems.  Chen et al.[4] introduced Program-of-Thoughts (PoT), which delegates computational steps to an external interpreter (e.g., Python), while maintaining natural language reasoning. Luo et al.[15], using code-specific Evol-Instruct, fine-tuned StarCoder [12] to create WizardCoder, outperforming major LLMs on code generation benchmarks. Bi et al.[3] proposed the Code and Instruction Reasoning Score (CIRS), evaluating the correlation between code and reasoning abilities. Their experiments on datasets like AsDiv[16] and GSM8K [6] highlighted PoT's superiority over CoT, especially in handling complex computations with external libraries like SymPy.  Fine-tuning methods leverage the generic features learned by large models to perform well on new tasks with minimal training.  Yue et al.[26] introduced MathInstruct, a dataset mixing CoT and PoT principles, fine-tuned on Llama22[22] and codellama [19]. Yu et al.[25] proposed MetaMathQA, based on GSM8K and MATH, incorporating more reasoning paths and fine-tuned on LLaMA-2.  Toshniwal et al.[21] introduced OpenMathInstruct-1, synthesizing solutions from GSM8K and MATH's code interpreters, fine-tuned on Mistral [9], Llama-2, and CodeLlama. 
body
Infinitymath **: A Scalable Instruction Tuning Dataset In** Programmatic Mathematical Reasoning
Related Work
2408.07089
 The motivation for constructing InfinityMath is to tackle the challenge of scaling data while addressing logical inconsistencies in  ![1_image_0.png](1_image_0.png)  reasoning. We propose a simple yet efficient pipeline that decouples numerical values from mathematical problems and synthesizes a large number of similar problems without significantly increasing computational costs. The goal is to overcome the dependencies of problem synthesis on specific numerical values, thereby maximizing data utilization and enhancing the robustness of models. 
body
Infinitymath **: A Scalable Instruction Tuning Dataset In** Programmatic Mathematical Reasoning
Methodology
2408.07089
 Drawing from algebraic thinking, we hypothesize that each mathematical problem can be transformed into a more general, numberindependent "generic problem" and "generic solution". Therefore, when using LLMs (such as GPT-4 [1]) for data synthesis, we diverge  | Dataset         | AQuA-RAT [14]   | GSM8K [6]   | MATH [8]   | NUMGLUE [17]   | MathQA [2]   | TheoremQA [5]   | Deepmind-Mathematics [20]   | Total   | |-----------------|-----------------|-------------|------------|----------------|--------------|-----------------|-----------------------------|---------| | Samples         | 53822           | 7254        | 5021       | 14228          | 20319        | 310             | 426                         | 101380  | | No. of Question | 97467           | 7473        | 7500       | 20359          | 29837        | 800             | 490                         | -       | | Success Rate    | 55.23%          | 97.07%      | 66.95%     | 69.89%         | 68.12%       | 38.75%          | 86.94%                      | -       |  Table 1: Statistics of InfinityMath **, the number of questions in source datasets and successful generated samples.**  from the classical PoT method by not directly generating solution code. Instead, we employ a multi-step process: First, numerical constants in problems are masked to create "generic problems", with these masked parts replaced by appropriate variable names as placeholders. This generalization simplifies program synthesis and prepares for scalability. Subsequently, LLMs are utilized to generate programs that solve these generic problems.  Specifically, the generation of function call-based programs instead of inline code is required. This approach enhances the reusability of the synthesized code and supports efficient scaling. Moreover, including a docstring in the function code improves readability by describing the function's purpose, the variables used, and the expected output. This establishes a clear relationship between the solution and the variables. Comments within the program explain the computational logic of each line, incorporating CoT rationalelike content. Therefore, the synthesized programs must include docstrings and comments to ensure clarity and comprehensibility.  To minimize LLM usage and reduce computational costs, we designed and compared several versions of prompt templates. Ultimately, we developed a multi-task prompt that requires the LLM to complete the tasks described above simultaneously, as illustrated in Figure 2. Moreover, we included an example to leverage the in-context learning capability of the LLM, enhancing the model's accuracy. Additionally, to facilitate post-processing, we strictly defined the format of the returned answers, thereby increasing the usability of the synthesized data.  Afterward, using simple rules, the program solution to the original math problem can be synthesized directly from the **"General** Question", **"Extracted Numbers"** and **"Unified Program"** obtained in the 1st-round response. The accuracy of the data synthesis process is verified by executing the synthesized code with a Python interpreter and comparing the results to the ground truth answer. For more complex mathematical problems, the generated programs often contain bugs. Instead of repeatedly adjusting hyperparameters inefficiently, we leverage the multi-turn dialogue capability of LLMs. By providing feedback from the checking program, we construct a **Bug Fix Prompt** for the 2nd round, supplying the LLM with the correct answer to the original problem and requesting minimal modifications to the erroneous code, as shown in Figure 2.  To enhance the model's generalization capability in mathematical reasoning, we selected seven high-quality open-source math datasets and used the aforementioned method to generate solutions.  The statistics of InfinityMath (each problem corresponding to one data point) is shown in Table 1. 
body
Infinitymath **: A Scalable Instruction Tuning Dataset In** Programmatic Mathematical Reasoning
Data Synthesis
2408.07089
 Recent data augmentation studies have focused on using LLMs to rewrite problems or generate different solutions for the same problem. However, there has been limited research on approaches that do not rely on additional LLM usage. To address this gap, we conducted the following work.  During data synthesis, we generated generic mathematical problems and function call-based programs. As shown in Figure ??, new problems and solution code can be generated by reversing the process: replacing variable placeholders with numbers.  Suppose the original mathematical problem uses  numbers, which are replaced with variable placeholders during data synthesis.  Since we can choose whether to replace variables with numbers or to retain the variable placeholder, there are 2  − 1 replacement options for each group of reasonable variable-to-number mappings, resulting in 2  − 1 possible program solutions.  When modifying the program, we remove variable assignments and docstring parts related to the replaced variables, then replace occurrences of the variables with the original numbers. We verify correctness by checking if the modified code runs correctly and produces the expected output, ensuring the generated programs are logically correct.  It is crucial that replacement numbers follow certain rules to maintain the intended meaning (e.g., ensuring the number of people is an integer). Therefore, we require the LLM to provide reasonable number ranges or criteria during synthesis to ensure the validity of the numbers. 
body
Infinitymath **: A Scalable Instruction Tuning Dataset In** Programmatic Mathematical Reasoning
Scaling With Data Augmentation
2408.07089
 We selected the open-source models CodeLlama, Llama2, and Aquila2, each with 7B parameters. These models were fine-tuned using InfinityMath and other datasets to validate instruction tuning. CodeLlama and Llama2 were aligned to an Alpaca-like instruction structure, while Aquila2 followed the Aquila-v2 structure. We used a learning rate of 2 × 10−5for CodeLlama and Llama2, and 1 × 10−5 for Aquila2, with a global batch size of 128 for all models.  We evaluated the effectiveness of our data on five in-domain test sets: GSM8K, MATH, AQuA-RAT, NumGLUE, Mathematics, and four out-of-domain test sets: SVAMP [18], SimulEq [10], SATMath [27], MMLU-Math [7]. For datasets containing both CoT and PoT, we used the Mammoth [26] evaluation framework, which involves first evaluating with a PoT prompt. If the generated program fails, a second evaluation is done using a CoT prompt to potentially improve results. For datasets with only PoT prompts (including InfinityMath ), we exclusively used PoT prompts for evaluation with no retries. All evaluations were performed in a **0-shot setting** without additional examples. 
body
Infinitymath **: A Scalable Instruction Tuning Dataset In** Programmatic Mathematical Reasoning
Experiments 4.1 Experimental Setup
2408.07089
 4.2.1 Main Results. The evaluation results in Table 2 show that the InfinityMath dataset consistently enhances performance across different base models compared to other datasets.  | Base Model        | Training Dataset   | In-domain Evaluation   | Out-of-domain Evaluation   |            |            |             |            |           |       |       | |-------------------|--------------------|------------------------|----------------------------|------------|------------|-------------|------------|-----------|-------|-------| | GSM8K             | MATH               | AQuA                   | Mathematics                | NumGLUE    | SVAMP      | SimulEq     | SAT-Math   | MMLU-Math |       |       | | -                 | 14.60              | 2.50                   | 30.30                      | 6.20       | 29.90      | 34.50       | 4.60       | 22.70     | 30.60 |       | | WizardMath        | 54.90              | 10.70                  | 26.30                      | 9.30       | 36.10      | 36.10       | 12.80      | 25.40     | 31.10 |       | | MetaMathQA        | 66.50              | 19.80                  | -                          | -          | -          | -           | -          | -         | -     |       | | MathInstruct      | 53.60              | 31.50                  | 44.50                      | 46.30      | 61.20      | 67.70       | 41.20      | 42.70     | 42.60 |       | | MathInstruct(pot) | 47.23              | 24.44                  | 15.75                      | 41.00      | 63.82      | 59.40       | 39.88      | 10.91     | 20.53 |       | | InfinityMath      | 60.80              | 29.40                  | 38.58                      | 63.70      | 75.91      | 76.10       | 56.03      | 25.91     | 30.70 |       | | (+316.44%)        | (+1076.00%)        | (+27.30%)              | (+927.42%)                 | (+153.88%) | (+120.58%) | (+1118.09%) | (+14.13%)  | (+0.33%)  |       |       | | Llama2            | -                  | 16.30                  | 10.92                      | 18.50      | 28.60      | 26.68       | 50.60      | 3.89      | 15.91 | 20.77 | | MathInstruct      | 59.40              | 33.40                  | 47.20                      | 55.40      | 66.40      | 71.40       | 45.90      | 40.50     | 48.30 |       | | CodeLlama         | MathInstruct(pot)  | 56.86                  | 29.88                      | 16.54      | 61.70      | 62.19       | 69.60      | 40.27     | 11.82 | 17.66 | | InfinityMath      | 65.80              | 34.06                  | 38.18                      | 67.10      | 71.40      | 77.00       | 74.71      | 32.73     | 37.27 |       | | (+303.07%)        | (+211.91%)         | (+106.38%)             | (+134.65%)                 | (+167.62%) | (+52.17%)  | (+1820.05%) | (+105.76%) | (+79.47%) |       |       | | -                 | 20.47              | 3.78                   | 14.96                      | 4.80       | 13.82      | 23.30       | 6.23       | 19.09     | 12.63 |       | | MathInstruct      | 50.19              | 25.98                  | 15.35                      | 71.79      | 61.30      | 44.40       | 40.08      | 14.55     | 17.86 |       | | Aquila2           | MathInstruct(pot)  | 49.66                  | 26.50                      | 12.60      | 47.40      | 72.36       | 50.10      | 46.11     | 17.27 | 26.80 | | InfinityMath      | 51.25              | 26.18                  | 23.62                      | 42.20      | 68.04      | 66.00       | 59.92      | 19.55     | 21.77 |       | | (+150.40%)        | (+592.59%)         | (+57.88%)              | (+779.17%)                 | (+392.12%) | (+183.26%) | (+861.97%)  | (+213.82%) | (+72.41%) |       |       |  Table 2: The overall evaluation results on both in-domain and out-of-domain benchmarks.  For in-domain evaluation, InfinityMath demonstrates substantial improvements. For example, with InfinityMath , Llama2 achieves a 316.44% improvement on GSM8K, 1076.00% on MATH, and 927.42% on Mathematics. Similar gains are observed with CodeLlama and Aquila2. In out-of-domain evaluation, InfinityMath continues to show significant performance gains. With InfinityMath , Llama2 achieves a 120.58% improvement on SVAMP and 1118.09% on SimulEq.  Notable improvements are also seen with CodeLlama and Aquila2.  While InfinityMath does not perform as well as MathInstruct on some benchmarks due to the inclusion of CoT data and the advantage of two evaluation opportunities, it still consistently enhances performance across all evaluated benchmarks. This highlights the effectiveness and robustness of the InfinityMath dataset in improving the mathematical reasoning capabilities of LLMs.  4.2.2 Effect of Scaling. We used subsets of data from GSM8K and MATH within InfinityMath to compare the effectiveness of scaling methods. By replacing the variables in the InfinityMath subsets with different numbers, we fine-tuned CodeLlama and Llama2 models. To ensure that the improvements were due to the scaling method and not merely the increased data volume, we compared checkpoints based on the same number of training steps rather than epochs. The results, shown in Table 3, demonstrate that augmenting the GSM8K and MATH subsets of InfinityMath with different numbers increased data volume and improved accuracy. This validates the effectiveness of our synthetic dataset method.  ``` Table 3: The results of fine-tuning using data augmentation                                                             with InfinityMath subsets on GSM8K and MATH (G+M).                                                           ```  CodeLlama w/o scaling 62.02 30.86 w/ scaling 63.38 (+2.19%) 31.32 (+1.49%) 4.2.3 Results of GSM8K+ and MATH+. To investigate logical inconsistencies in reasoning within LLM-generated programs, we constructed the GSM8K+ 1and MATH+ 2evaluation datasets. By replacing two sets of numbers in the original datasets and conducting 1Available at https://huggingface.co/datasets/flagopen/ 2Available at https://huggingface.co/datasets/flagopen/MATHplus Table 4: The comparison results on GSM8K+ and MATH+.  | BaseModel   | InfinityMath -G+M   | GSM8K          | MATH   | |-------------|---------------------|----------------|--------| | Llama2      | w/o scaling         | 51.78          | 22.78  | | w/ scaling  | 55.42 (+7.03%)      | 23.98 (+5.27%) |        | | CodeLlama   | w/o scaling         | 62.02          | 30.86  | | w/ scaling  | 63.38 (+2.19%)      | 31.32 (+1.49%) |        |  Base Model Training Dataset GSM8K+ MATH+  x y % x y %  Llama2 MathInstruct(pot) 827 463 56.0 1484 581 39.1  InfinityMath 974 605 62.1 1741 684 **39.3**  Codellama MathInstruct(pot) 913 568 62.2 1720 696 40.5  InfinityMath 1022 672 65.8 1985 850 **42.8**  rigorous manual checks, we created 1319 × 3 and 3818 × 3 evaluation data points, respectively. The evaluation results are shown in Table 4, where  and  represent the number of instances where the model generated at least one correct answer and all three correct answers for the same problem, respectively. The / ratio indicates the preservation of logical consistency in reasoning.  4.2.4 DocString Ablation. To analyze the impact of CoT rationalelike descriptions, we conducted an ablation study focusing on docstrings. By removing docstrings in InfinityMath , we performed comparative experiments using CodeLlama on four in-domain evaluation sets. The experimental results, shown in Table 5, indicate that even though docstrings do not directly affect program execution, they enhance the model's reasoning capabilities.  Table 5: Impact of docstrings on the 7B codellama model.  ![3_image_0.png](3_image_0.png) 
body
Infinitymath **: A Scalable Instruction Tuning Dataset In** Programmatic Mathematical Reasoning
Experimental Results
2408.07089
 We open-source InfinityMath , a mathematical reasoning instruction tuning dataset with each data point including a generic problem and a solution template, allowing for easy scaling into an infinite dataset. The fine-tuning experiments show that InfinityMath effectively alleviates logical inconsistencies in reasoning. 
conclusion
Infinitymath **: A Scalable Instruction Tuning Dataset In** Programmatic Mathematical Reasoning
Conclusion
2408.07089
 This work was supported by National Key R&D Program of China (2022ZD0116312). 
body
Infinitymath **: A Scalable Instruction Tuning Dataset In** Programmatic Mathematical Reasoning
Acknowledgements
2408.07089
 [1] Josh Achiam, Steven Adler, Sandhini Agarwal, Lama Ahmad, Ilge Akkaya, Florencia Leoni Aleman, Diogo Almeida, Janko Altenschmidt, Sam Altman, Shyamal Anadkat, et al. 2023. Gpt-4 technical report. *arXiv preprint arXiv:2303.08774* (2023) .  [2] Aida Amini, Saadia Gabriel, Peter Lin, Rik Koncel-Kedziorski, Yejin Choi, and Hannaneh Hajishirzi. 2019. Mathqa: Towards interpretable math word problem solving with operation-based formalisms. *arXiv preprint arXiv:1905.13319* (2019) .  [3] Zhen Bi, Ningyu Zhang, Yinuo Jiang, Shumin Deng, Guozhou Zheng, and Huajun Chen. 2024. When Do Program-of-Thought Works for Reasoning?. In Proceedings of the AAAI Conference on Artificial Intelligence, Vol. 38. 17691–17699.  [4] Wenhu Chen, Xueguang Ma, Xinyi Wang, and William W Cohen. 2022. Program of thoughts prompting: Disentangling computation from reasoning for numerical reasoning tasks. *arXiv preprint arXiv:2211.12588* (2022) .  [5] Wenhu Chen, Ming Yin, Max Ku, Pan Lu, Yixin Wan, Xueguang Ma, Jianyu Xu, Xinyi Wang, and Tony Xia. 2023. Theoremqa: A theorem-driven question answering dataset. In The 2023 Conference on Empirical Methods in Natural Language Processing.  [6] Karl Cobbe, Vineet Kosaraju, Mohammad Bavarian, Mark Chen, Heewoo Jun, Lukasz Kaiser, Matthias Plappert, Jerry Tworek, Jacob Hilton, Reiichiro Nakano, Christopher Hesse, and John Schulman. 2021. Training Verifiers to Solve Math Word Problems. *arXiv preprint arXiv:2110.14168* (2021) .  [7] Dan Hendrycks, Collin Burns, Steven Basart, Andy Zou, Mantas Mazeika, Dawn Song, and Jacob Steinhardt. 2020. Measuring massive multitask language understanding. *arXiv preprint arXiv:2009.03300* (2020) .  [8] Dan Hendrycks, Collin Burns, Saurav Kadavath, Akul Arora, Steven Basart, Eric Tang, Dawn Song, and Jacob Steinhardt. 2021. Measuring mathematical problem solving with the math dataset. *arXiv preprint arXiv:2103.03874* (2021) .  [9] Albert Q Jiang, Alexandre Sablayrolles, Antoine Roux, Arthur Mensch, Blanche Savary, Chris Bamford, Devendra Singh Chaplot, Diego de las Casas, Emma Bou Hanna, Florian Bressand, et al. 2024. Mixtral of experts. *arXiv preprint* arXiv:2401.04088 (2024) .  [10] Rik Koncel-Kedziorski, Subhro Roy, Aida Amini, Nate Kushman, and Hannaneh Hajishirzi. 2016. MAWPS: A math word problem repository. In Proceedings of the 2016 conference of the north american chapter of the association for computational linguistics: human language technologies. 1152–1157.  [11] Guillaume Lample and François Charton. 2019. Deep Learning for Symbolic Mathematics. *arXiv preprint arXiv:1912.01412* (2019) .  [12] Raymond Li, Loubna Ben Allal, Yangtian Zi, Niklas Muennighoff, Denis Kocetkov, Chenghao Mou, Marc Marone, Christopher Akiki, Jia Li, Jenny Chim, et al. 2023.  Starcoder: may the source be with you! *arXiv preprint arXiv:2305.06161* (2023) .  [13] Yifei Li, Zeqi Lin, Shizhuo Zhang, Qiang Fu, Bei Chen, Jian-Guang Lou, and Weizhu Chen. 2022. Making large language models better reasoners with stepaware verifier. *arXiv preprint arXiv:2206.02336* (2022) .  [14] Wang Ling, Dani Yogatama, Chris Dyer, and Phil Blunsom. 2017. Program induction by rationale generation: Learning to solve and explain algebraic word problems. *arXiv preprint arXiv:1705.04146* (2017) .  [15] Ziyang Luo, Can Xu, Pu Zhao, Qingfeng Sun, Xiubo Geng, Wenxiang Hu, Chongyang Tao, Jing Ma, Qingwei Lin, and Daxin Jiang. 2023. Wizardcoder: Empowering code large language models with evol-instruct. *arXiv preprint* arXiv:2306.08568 (2023) .  [16] Shen-Yun Miao, Chao-Chun Liang, and Keh-Yih Su. 2021. A diverse corpus for evaluating and developing English math word problem solvers. *arXiv preprint* arXiv:2106.15772 (2021) .  [17] Swaroop Mishra, Arindam Mitra, Neeraj Varshney, Bhavdeep Sachdeva, Peter Clark, Chitta Baral, and Ashwin Kalyan. 2022. NumGLUE: A suite of fundamental yet challenging mathematical reasoning tasks. *arXiv preprint arXiv:2204.05660* (2022) .  [18] Arkil Patel, Satwik Bhattamishra, and Navin Goyal. 2021. Are NLP models really able to solve simple math word problems? *arXiv preprint arXiv:2103.07191* (2021) .  [19] Baptiste Roziere, Jonas Gehring, Fabian Gloeckle, Sten Sootla, Itai Gat, Xiaoqing Ellen Tan, Yossi Adi, Jingyu Liu, Tal Remez, Jérémy Rapin, et al. 2023. Code llama: Open foundation models for code. *arXiv preprint arXiv:2308.12950* (2023) .  [20] David Saxton, Edward Grefenstette, Felix Hill, and Pushmeet Kohli. 2019.  Analysing mathematical reasoning abilities of neural models. arXiv preprint arXiv:1904.01557 (2019) .  [21] Shubham Toshniwal, Ivan Moshkov, Sean Narenthiran, Daria Gitman, Fei Jia, and Igor Gitman. 2024. OpenMathInstruct-1: A 1.8 Million Math Instruction Tuning Dataset. *arXiv preprint arXiv:2402.10176* (2024) .  [22] Hugo Touvron, Louis Martin, Kevin Stone, Peter Albert, Amjad Almahairi, Yasmine Babaei, Nikolay Bashlykov, Soumya Batra, Prajjwal Bhargava, Shruti Bhosale, et al. 2023. Llama 2: Open foundation and fine-tuned chat models. *arXiv* preprint arXiv:2307.09288 (2023) .  [23] Xuezhi Wang, Jason Wei, Dale Schuurmans, Quoc Le, Ed Chi, Sharan Narang, Aakanksha Chowdhery, and Denny Zhou. 2022. Self-consistency improves chain of thought reasoning in language models. *arXiv preprint arXiv:2203.11171* (2022) .  [24] Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Fei Xia, Ed Chi, Quoc V Le, Denny Zhou, et al. 2022. Chain-of-thought prompting elicits reasoning in large language models. *Advances in neural information processing systems* 35 (2022) , 24824–24837.  [25] Longhui Yu, Weisen Jiang, Han Shi, Jincheng Yu, Zhengying Liu, Yu Zhang, James T Kwok, Zhenguo Li, Adrian Weller, and Weiyang Liu. 2023. Metamath: Bootstrap your own mathematical questions for large language models. *arXiv* preprint arXiv:2309.12284 (2023) .  [26] Xiang Yue, Xingwei Qu, Ge Zhang, Yao Fu, Wenhao Huang, Huan Sun, Yu Su, and Wenhu Chen. 2023. Mammoth: Building math generalist models through hybrid instruction tuning. *arXiv preprint arXiv:2309.05653* (2023) .  [27] Wanjun Zhong, Ruixiang Cui, Yiduo Guo, Yaobo Liang, Shuai Lu, Yanlin Wang, Amin Saied, Weizhu Chen, and Nan Duan. 2023. Agieval: A human-centric benchmark for evaluating foundation models. *arXiv preprint arXiv:2304.06364* (2023) .
references
Infinitymath **: A Scalable Instruction Tuning Dataset In** Programmatic Mathematical Reasoning
References