ChatPaper.aiChatPaper

FoNE: 푸리에 특성을 통한 정밀한 단일 토큰 숫자 임베딩

FoNE: Precise Single-Token Number Embeddings via Fourier Features

February 13, 2025
저자: Tianyi Zhou, Deqing Fu, Mahdi Soltanolkotabi, Robin Jia, Vatsal Sharan
cs.AI

초록

대형 언어 모델(LLMs)은 일반적으로 숫자를 여러 토큰으로 표현하며, 이로 인해 모델은 이러한 토큰을 집계하여 수치를 해석해야 합니다. 이러한 분할은 학습과 추론을 덜 효율적으로 만들고, 숫자 관련 작업에서 모델의 성능에 부정적인 영향을 미칩니다. 사전 학습된 LLM이 내부적으로 숫자 토큰에 대한 푸리에(Fourier) 유사 특성을 학습한다는 관찰에서 영감을 받아, 우리는 푸리에 수치 임베딩(Fourier Number Embedding, FoNE)이라는 새로운 방법을 제안합니다. FoNE는 숫자를 푸리에 특성과 함께 임베딩 공간에 직접 매핑하며, 각 숫자를 단일 토큰으로 인코딩하고 각 자릿수당 단 두 개의 임베딩 차원만 사용하여 수치를 효과적으로 포착합니다. 이 간결한 표현은 학습과 추론 속도를 가속화합니다. 기존의 서브워드 및 자릿수 단위 임베딩과 비교했을 때, FoNE는 계산 오버헤드를 줄일 뿐만 아니라 덧셈, 뺄셈, 곱셈 등 다양한 수치 작업에서 더 높은 정확도를 달성합니다. 6자리 10진수 덧셈에서 FoNE는 99% 정확도를 달성하기 위해 서브워드 및 자릿수 단위 임베딩보다 64배 적은 데이터를 필요로 하며, 각 숫자당 사용하는 토큰 수는 각각 3배 및 6배 적습니다. 더 나아가, FoNE는 덧셈, 뺄셈, 곱셈에 대해 100,000개 이상의 테스트 예시에서 100% 정확도를 달성한 유일한 방법입니다. 코드와 시각화 자료는 https://fouriernumber.github.io/에서 확인할 수 있습니다.
English
Large Language Models (LLMs) typically represent numbers using multiple tokens, which requires the model to aggregate these tokens to interpret numerical values. This fragmentation makes both training and inference less efficient and adversely affects the model's performance on number-related tasks. Inspired by the observation that pre-trained LLMs internally learn Fourier-like features for number tokens, we propose Fourier Number Embedding (FoNE), a novel method that directly maps numbers into the embedding space with their Fourier features. FoNE encodes each number as a single token with only two embedding dimensions per digit, effectively capturing numerical values without fragmentation. This compact representation accelerates both training and inference. Compared to traditional subword and digit-wise embeddings, FoNE not only reduces computational overhead but also achieves higher accuracy across various numerical tasks including addition, subtraction and multiplication. On 6-digit decimal addition, FoNE requires 64times less data to achieve 99% accuracy than subword and digit-wise embeddings while using 3times and 6times fewer tokens per number, respectively. Furthermore, FoNE is the only method that yields 100% accuracy on over 100,000 test examples for addition, subtraction, and multiplication. The codes and visualization are available at https://fouriernumber.github.io/.

Summary

AI-Generated Summary

PDF113February 17, 2025