English

Improving Next Tokens via Second-to-Last Predictions with Generate and Refine

Computation and Language 2025-02-17 v2 Machine Learning

Abstract

Autoregressive language models like GPT aim to predict next tokens, while autoencoding models such as BERT are trained on tasks such as predicting masked tokens. We train a decoder-only architecture for predicting the second to last token for a sequence of tokens. Our approach yields higher computational training efficiency than BERT-style models by employing a structured deterministic approach to masking tokens. We use our model to improve the next token predictions of a standard GPT by combining both predictions in a ``generate-then-refine'' approach. We demonstrate on different variants of GPT-2 and different datasets that (not unexpectedly) second to last token predictions are much more accurate, i.e., more than 15\% higher accuracy than standard next token predictions. The ``generate-then-refine'' approach also demonstrates notable improvements in next-token predictions, yielding smaller yet consistent and significant gains.

Keywords

Cite

@article{arxiv.2411.15661,
  title  = {Improving Next Tokens via Second-to-Last Predictions with Generate and Refine},
  author = {Johannes Schneider},
  journal= {arXiv preprint arXiv:2411.15661},
  year   = {2025}
}

Comments

Accepted at Intelligent Data Analysis (IDA), 2025, held in Konstanz, Germany