{
  "id": 312631,
  "title": "The Neural Addition Unit (NAU)",
  "url": "/competitions/ultra-mnist/discussion/312631",
  "author_name": "Carl McBride Ellis",
  "post_date": "2022-03-13T06:53:01.543000",
  "votes": 14,
  "comment_count": 0,
  "views": 0,
  "content": "<p>In this competition our task is to predict the sum of the digits per image. Given  the recent <a href=\"https://www.kaggle.com/c/ultra-mnist/discussion/312470\" target=\"_blank\">Rules Clarification</a> with the belated prohibition of the obvious workflow of the extraction and subsequent classification and <em>a posteriori</em> summation of the individual digits now not being eligible (as it is \"<em>not considered to be innovation</em>\"), it seems that an alternative way forward is to perform the summation 'on-board' the neural network. However, getting a neural network to learn how to add numbers is no mean feat in itself. To that end I have happened across this potentially interesting <a href=\"https://arxiv.org/pdf/2001.05016.pdf\" target=\"_blank\">paper</a>, which introduces the <strong><em>Neural Addition Unit (NAU)</em></strong>. </p>\n<p>From the abstract:</p>\n<blockquote>\n  <p>\"<strong><em>Neural networks can approximate complex functions, but they struggle to perform\nexact arithmetic operations over real numbers. The lack of inductive bias for\narithmetic operations leaves neural networks without the underlying logic necessary\nto extrapolate on tasks such as addition, subtraction, and multiplication. We present\ntwo new neural network components: the Neural Addition Unit (NAU)…</em></strong>\"</p>\n</blockquote>\n<ul>\n<li><a href=\"https://arxiv.org/pdf/2001.05016.pdf\" target=\"_blank\">Andreas Madsen and Alexander Rosenberg Johansen \"<em>Neural Arithmetic Units</em>\", arXiv:2001.05016 (2020)</a></li>\n<li><a href=\"https://github.com/AndreasMadsen/stable-nalu\" target=\"_blank\">Neural Arithmetic Units</a> GitHub code (they even perform a <strong>MNIST add experiment</strong>)</li>\n</ul>\n<p>This paper builds upon the work presented in the paper: </p>\n<ul>\n<li><a href=\"https://arxiv.org/pdf/1808.00508.pdf\" target=\"_blank\">Andrew Trask <em>et al. \"Neural Arithmetic Logic Units</em>\", arXiv:1808.00508 (2018)</a></li>\n</ul>\n<p>where they lay the foundations for the \"MNIST Digit Addition task\" (see § 4.2), and which rather helpfully comes with a basic pytorch implementation of a NAC/NALU, and accessible via  </p>\n<ul>\n<li><code>pip install NALU</code></li>\n</ul>\n<p>with the neural accumulator (NAC) achieving the best results for addition tasks (MAE of 1.42 for a series of 10 digits, see Table 2). </p>\n<p>For more details see GitHub repository <a href=\"https://github.com/bharathgs/NALU\" target=\"_blank\">Neural Arithmetic Logic Units (NALU)</a>.</p>\n<p>All the best,<br>\ncarl</p>",
  "messages": [
    {
      "id": 1720809,
      "postDate": "2022-03-13T06:53:01.543Z",
      "content": "<p>In this competition our task is to predict the sum of the digits per image. Given  the recent <a href=\"https://www.kaggle.com/c/ultra-mnist/discussion/312470\" target=\"_blank\">Rules Clarification</a> with the belated prohibition of the obvious workflow of the extraction and subsequent classification and <em>a posteriori</em> summation of the individual digits now not being eligible (as it is \"<em>not considered to be innovation</em>\"), it seems that an alternative way forward is to perform the summation 'on-board' the neural network. However, getting a neural network to learn how to add numbers is no mean feat in itself. To that end I have happened across this potentially interesting <a href=\"https://arxiv.org/pdf/2001.05016.pdf\" target=\"_blank\">paper</a>, which introduces the <strong><em>Neural Addition Unit (NAU)</em></strong>. </p>\n<p>From the abstract:</p>\n<blockquote>\n  <p>\"<strong><em>Neural networks can approximate complex functions, but they struggle to perform\nexact arithmetic operations over real numbers. The lack of inductive bias for\narithmetic operations leaves neural networks without the underlying logic necessary\nto extrapolate on tasks such as addition, subtraction, and multiplication. We present\ntwo new neural network components: the Neural Addition Unit (NAU)…</em></strong>\"</p>\n</blockquote>\n<ul>\n<li><a href=\"https://arxiv.org/pdf/2001.05016.pdf\" target=\"_blank\">Andreas Madsen and Alexander Rosenberg Johansen \"<em>Neural Arithmetic Units</em>\", arXiv:2001.05016 (2020)</a></li>\n<li><a href=\"https://github.com/AndreasMadsen/stable-nalu\" target=\"_blank\">Neural Arithmetic Units</a> GitHub code (they even perform a <strong>MNIST add experiment</strong>)</li>\n</ul>\n<p>This paper builds upon the work presented in the paper: </p>\n<ul>\n<li><a href=\"https://arxiv.org/pdf/1808.00508.pdf\" target=\"_blank\">Andrew Trask <em>et al. \"Neural Arithmetic Logic Units</em>\", arXiv:1808.00508 (2018)</a></li>\n</ul>\n<p>where they lay the foundations for the \"MNIST Digit Addition task\" (see § 4.2), and which rather helpfully comes with a basic pytorch implementation of a NAC/NALU, and accessible via  </p>\n<ul>\n<li><code>pip install NALU</code></li>\n</ul>\n<p>with the neural accumulator (NAC) achieving the best results for addition tasks (MAE of 1.42 for a series of 10 digits, see Table 2). </p>\n<p>For more details see GitHub repository <a href=\"https://github.com/bharathgs/NALU\" target=\"_blank\">Neural Arithmetic Logic Units (NALU)</a>.</p>\n<p>All the best,<br>\ncarl</p>",
      "rawMarkdown": "In this competition our task is to predict the sum of the digits per image. Given  the recent [Rules Clarification](https://www.kaggle.com/c/ultra-mnist/discussion/312470) with the belated prohibition of the obvious workflow of the extraction and subsequent classification and *a posteriori* summation of the individual digits now not being eligible (as it is \"*not considered to be innovation*\"), it seems that an alternative way forward is to perform the summation 'on-board' the neural network. However, getting a neural network to learn how to add numbers is no mean feat in itself. To that end I have happened across this potentially interesting [paper](https://arxiv.org/pdf/2001.05016.pdf), which introduces the ***Neural Addition Unit (NAU)***. \n\nFrom the abstract:\n\n> \"***Neural networks can approximate complex functions, but they struggle to perform\nexact arithmetic operations over real numbers. The lack of inductive bias for\narithmetic operations leaves neural networks without the underlying logic necessary\nto extrapolate on tasks such as addition, subtraction, and multiplication. We present\ntwo new neural network components: the Neural Addition Unit (NAU)...***\"\n\n* [Andreas Madsen and Alexander Rosenberg Johansen \"*Neural Arithmetic Units*\", arXiv:2001.05016 (2020)](https://arxiv.org/pdf/2001.05016.pdf)\n* [Neural Arithmetic Units](https://github.com/AndreasMadsen/stable-nalu) GitHub code (they even perform a **MNIST add experiment**)\n\nThis paper builds upon the work presented in the paper: \n\n* [Andrew Trask *et al. \"Neural Arithmetic Logic Units*\", arXiv:1808.00508 (2018)](https://arxiv.org/pdf/1808.00508.pdf)\n\nwhere they lay the foundations for the \"MNIST Digit Addition task\" (see § 4.2), and which rather helpfully comes with a basic pytorch implementation of a NAC/NALU, and accessible via  \n\n* `pip install NALU`\n\nwith the neural accumulator (NAC) achieving the best results for addition tasks (MAE of 1.42 for a series of 10 digits, see Table 2). \n\nFor more details see GitHub repository [Neural Arithmetic Logic Units (NALU)](https://github.com/bharathgs/NALU).\n\nAll the best,\ncarl",
      "votes": 14
    }
  ],
  "comments": [],
  "raw_markdown_by_id": {
    "1720809": "In this competition our task is to predict the sum of the digits per image. Given  the recent [Rules Clarification](https://www.kaggle.com/c/ultra-mnist/discussion/312470) with the belated prohibition of the obvious workflow of the extraction and subsequent classification and *a posteriori* summation of the individual digits now not being eligible (as it is \"*not considered to be innovation*\"), it seems that an alternative way forward is to perform the summation 'on-board' the neural network. However, getting a neural network to learn how to add numbers is no mean feat in itself. To that end I have happened across this potentially interesting [paper](https://arxiv.org/pdf/2001.05016.pdf), which introduces the ***Neural Addition Unit (NAU)***. \n\nFrom the abstract:\n\n> \"***Neural networks can approximate complex functions, but they struggle to perform\nexact arithmetic operations over real numbers. The lack of inductive bias for\narithmetic operations leaves neural networks without the underlying logic necessary\nto extrapolate on tasks such as addition, subtraction, and multiplication. We present\ntwo new neural network components: the Neural Addition Unit (NAU)...***\"\n\n* [Andreas Madsen and Alexander Rosenberg Johansen \"*Neural Arithmetic Units*\", arXiv:2001.05016 (2020)](https://arxiv.org/pdf/2001.05016.pdf)\n* [Neural Arithmetic Units](https://github.com/AndreasMadsen/stable-nalu) GitHub code (they even perform a **MNIST add experiment**)\n\nThis paper builds upon the work presented in the paper: \n\n* [Andrew Trask *et al. \"Neural Arithmetic Logic Units*\", arXiv:1808.00508 (2018)](https://arxiv.org/pdf/1808.00508.pdf)\n\nwhere they lay the foundations for the \"MNIST Digit Addition task\" (see § 4.2), and which rather helpfully comes with a basic pytorch implementation of a NAC/NALU, and accessible via  \n\n* `pip install NALU`\n\nwith the neural accumulator (NAC) achieving the best results for addition tasks (MAE of 1.42 for a series of 10 digits, see Table 2). \n\nFor more details see GitHub repository [Neural Arithmetic Logic Units (NALU)](https://github.com/bharathgs/NALU).\n\nAll the best,\ncarl"
  }
}