Positional Encoding Helps Recurrent Neural Networks Handle a Large Vocabulary

Fuente: arXiv
Saved in:
Bibliographic Details
Main Author: Morita, Takashi
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866910717296246784
author Morita, Takashi
author_facet Morita, Takashi
contents This study reports an unintuitive finding that positional encoding enhances learning of recurrent neural networks (RNNs). Positional encoding is a high-dimensional representation of time indices on input data. Most famously, positional encoding complements the capabilities of Transformer neural networks, which lack an inherent mechanism for representing the data order. By contrast, RNNs can encode the temporal information of data points on their own, rendering their use of positional encoding seemingly redundant/unnecessary. Nonetheless, investigations through synthetic benchmarks reveal an advantage of coupling positional encoding and RNNs, especially for handling a large vocabulary that yields low-frequency tokens. Further scrutinization unveils that these low-frequency tokens destabilizes the gradients of vanilla RNNs, and the positional encoding resolves this instability. These results shed a new light on the utility of positional encoding beyond its canonical role as a timekeeper for Transformers.
format Preprint
id arxiv_https___arxiv_org_abs_2402_00236
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Positional Encoding Helps Recurrent Neural Networks Handle a Large Vocabulary
Morita, Takashi
Machine Learning
Neural and Evolutionary Computing
This study reports an unintuitive finding that positional encoding enhances learning of recurrent neural networks (RNNs). Positional encoding is a high-dimensional representation of time indices on input data. Most famously, positional encoding complements the capabilities of Transformer neural networks, which lack an inherent mechanism for representing the data order. By contrast, RNNs can encode the temporal information of data points on their own, rendering their use of positional encoding seemingly redundant/unnecessary. Nonetheless, investigations through synthetic benchmarks reveal an advantage of coupling positional encoding and RNNs, especially for handling a large vocabulary that yields low-frequency tokens. Further scrutinization unveils that these low-frequency tokens destabilizes the gradients of vanilla RNNs, and the positional encoding resolves this instability. These results shed a new light on the utility of positional encoding beyond its canonical role as a timekeeper for Transformers.
title Positional Encoding Helps Recurrent Neural Networks Handle a Large Vocabulary
topic Machine Learning
Neural and Evolutionary Computing
url https://arxiv.org/abs/2402.00236