Skip to main content
QUICK REVIEW

[Paper Review] A Fixed-Size Encoding Method for Variable-Length Sequences with its Application to Neural Network Language Models

Shiliang Zhang, Hui Jiang|arXiv (Cornell University)|May 6, 2015
Topic ModelingComputer Science16 references13 citations
TL;DR

This paper proposes Fixed-Size Ordinally-Forgetting Encoding (FOFE), a novel method that encodes variable-length sequences into a fixed-size vector using a recursive, position-dependent forgetting mechanism with a decay factor α. FOFE enables feedforward neural network language models (FNN-LMs) to capture long-term dependencies without recurrence, achieving state-of-the-art performance on Penn Treebank and Large Text Compression Benchmark, outperforming even LSTM-based RNN-LMs.

ABSTRACT

In this paper, we propose the new fixed-size ordinally-forgetting encoding (FOFE) method, which can almost uniquely encode any variable-length sequence of words into a fixed-size representation. FOFE can model the word order in a sequence using a simple ordinally-forgetting mechanism according to the positions of words. In this work, we have applied FOFE to feedforward neural network language models (FNN-LMs). Experimental results have shown that without using any recurrent feedbacks, FOFE based FNN-LMs can significantly outperform not only the standard fixed-input FNN-LMs but also the popular RNN-LMs.

Motivation & Objective

  • To address the limitation of standard FNN-LMs in modeling long-term dependencies due to fixed-size context windows.
  • To develop a context-dependent, fixed-size encoding method that preserves word order and sequence history in variable-length sequences.
  • To enable feedforward neural networks to achieve performance comparable or superior to recurrent networks in language modeling, without using recurrent feedback or BPTT.
  • To provide a theoretically sound, efficient, and unique encoding mechanism for discrete sequences using a forgetting factor.

Proposed method

  • FOFE encodes each word in a sequence using a recursive formula: $\mathbf{z}_t = \alpha \cdot \mathbf{z}_{t-1} + \mathbf{e}_t$, where $\mathbf{e}_t$ is the 1-of-K embedding of the t-th word and $\alpha \in (0,1)$ is a forgetting factor.
  • The resulting FOFE code $\mathbf{z}_t$ is a fixed-size vector that accumulates historical word information with exponentially decaying influence based on word position.
  • The method ensures almost unique encoding for any sequence length $T$ when $\alpha \in (0.5, 1)$, except for a finite set of exceptional $\alpha$ values.
  • FOFE is integrated into FNN-LMs by replacing the fixed-size context window with the FOFE-encoded history vector as input to the network.
  • The model is trained using standard backpropagation without BPTT, enabling efficient GPU training.
  • Theoretical analysis proves that decoding ambiguity occurs only for a countable, finite set of $\alpha$ values, ensuring practical uniqueness.

Experimental results

Research questions

  • RQ1Can a fixed-size encoding method preserve sequence order and long-term context in variable-length sequences without recurrence?
  • RQ2Can FOFE-based FNN-LMs outperform standard FNN-LMs with fixed context windows in language modeling?
  • RQ3Can FOFE-based FNN-LMs achieve performance comparable or superior to RNN-LMs, including LSTM variants, without using recurrent feedback?
  • RQ4Is the FOFE encoding almost unique for typical values of the forgetting factor $\alpha$?
  • RQ5Does the absence of BPTT in FOFE-FNN-LM training lead to faster and more stable learning compared to RNN-LMs?

Key findings

  • On the Penn Treebank corpus, the 2nd-order FOFE-FNNLM achieved a test perplexity of 108, outperforming the best standard FNN-LM (113) and the RNN-LM (112).
  • On the Large Text Compression Benchmark (LTCB), the 2nd-order FOFE-FNNLM achieved a test perplexity of 107, surpassing the best baseline FNN-LM (112) and the RNN-LM (112).
  • The FOFE-based FNN-LM with a [2*200]-600-600-80k architecture achieved a perplexity of 107 on LTCB, demonstrating superior performance over larger FNN-LMs and RNN-LMs.
  • Theoretical analysis confirms that FOFE provides almost unique encoding for $\alpha \in (0.5, 1)$, with ambiguity only occurring at a finite, countable set of $\alpha$ values.
  • The FOFE-FNN-LM training is highly efficient on GPUs and avoids the computational complexity of BPTT used in RNNs.
  • The method enables FNN-LMs to model long-term dependencies effectively despite the absence of recurrent feedback, challenging the assumption that recurrence is necessary for such modeling.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.