交错文本与数字嵌入以解决数学问题
Interleaving Text and Number Embeddings to Solve Mathemathics Problems
AI总结:
本文提出结合 MLP 数值方向嵌入与文本/数字路由层的连续编码方法,使45M参数模型在宽量级数值任务上达到R²=0.9988并减少数值伪影。
摘要:
有效整合文本与数字,是提升 Large Language Models(LLMs,大语言模型)辅助科学任务能力的关键一步。尽管当前大多数方法依赖于数字的离散分词,例如转换为科学记数法或以10为底的分解,但近期一种方法提出将连续数值编码作为归纳偏置。本文在该方法的基础上,引入表达能力更强的数值嵌入。我们的方法解决了若干关键缺陷,包括消除数值伪影,以及能够在不进行截断的情况下处理很宽的数值量级范围。\n我们的工作提出两项核心贡献。第一,我们采用 MLP 为不同数字在嵌入空间中分配不同方向。第二项贡献是引入一个路由层,用于区分数值嵌入与文本嵌入。我们假设,这种组合方法使模型能够区分文本分布与数字分布,同时保持其算术运算能力。\n仅使用一个45 M参数的 encoder-decoder 架构,我们的方法就在很宽的量级范围(10^-3, 10^8)内取得了 R^2=0.9988。此外,我们通过实验观察到,与基线相比,所观察到的数值伪影和偏差均有所减少。
英文摘要:
Integrating text and numbers effectively is a crucial step towards enhancing Large Language Models (LLMs) capabilities in assisting in scientific tasks. While most current approaches rely on discrete tokenization of numbers, for instance, conversion to scientific notation or base 10-decomposition, a recent approach proposed a continuous numerical encoding as an inductive bias. In this paper, we build upon this approach by introducing more expressive numerical embeddings. Our method addresses key shortcomings, including the elimination of numerical artefacts and the ability to handle a wide range of magnitudes without clipping. Our work presents two key contributions. First, we employ an MLP to assign distinct directions in the embedding space to different numbers. Our second contribution is the introduction of a routing layer that differentiates between numerical and text embeddings. We hypothesise that this combined approach enables the model to distinguish between text and number distributions while maintaining its capacity for arithmetic operations. Using only a 45 M parameter encoder-decoder architecture our method achieves a $R^2$=0.9988 over a wide range of magnitude ($10^{-3},10^{8}$). In addition, we empirically observe a reduction of the numerical artefacts and biases observed compared to the baselines.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。