arXiv:2610.21862cs.CLOct 2026

Manuscript Offprint

arXiv:2610.21862

Dynamic ordering in sequence generation in Transformers: experiments on low-resource Tagging scenarios

Giacomo Bais, Tejaswini Deoskar

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

This paper introduces TagInsert, a Transformer-based model that challenges the common left-to-right (L2R) generation paradigm in Transformers, for sequence labelling tasks where dependencies may not naturally align with a L2R order. TagInsert lifts the L2R constraint by removing the decoder-side attention mask and enabling the model to decide a preferred order of tag generation at inference time. We experiment on the common Part-of-Speech tagging and the more complex Combinatory Categorial Grammar (CCG) supertagging tasks on multiple languages and low-resource data settings. We show that, although encoder-only models like BERT remain strong performers for tagging tasks, TagInsert frequently outperforms a L2R encoder-decoder model, achieves results comparable to encoder-only models under data-scarce conditions, and shows better results on the long-tail of rare categories. Our analyses show that TagInsert alleviates error propagation typical of autoregressive models by learning to defer difficult predictions to later stages in the decoding process.

1 Introduction

Autoregressive models based on the Transformer architecture (Vaswani et al., 2017), are the dominant paradigm in Natural Language Processing (NLP), especially for Natural Language Generation (NLG) tasks. The decoder of a Transformer generates sequences from left to right (L2R), conditioning each token on previously generated outputs. This left-to-right ordering is intuitive, aligns well with human processing patterns, and is computationally efficient. However, a rigid L2R generation order also has limitations; for e.g., when used for sequence transduction tasks such as tagging, where the decoder produces a sequence of tags, early errors can influence later predictions (error propagation), a common occurrence in autoregressive architectures (Bengio et al., 2015; Liu et al., 2016). Second, the strict L2R order makes it impossible for the model to exploit dependencies that do not naturally follow a left-to-right progression. For instance, in the task of Part-of-Speech (POS) tagging, there may exist syntactic dependencies between tags that are not necessarily left-to-right in nature; for e.g. in the sentence She saw her brother, tagging her correctly as a possessive pronoun rather than an object pronoun depends on the tag of the following word brother, unavailable to a left-to-right model at the time of prediction.

In this paper, we investigate the effects of removing the fixed L2R ordering in the Encoder-Decoder Transformer on sequence labelling tasks. Our main hypothesis is that removing the L2R assumption allows the model to choose more flexible and dynamic orderings that may help to alleviate error propagation or to exploit syntactic dependencies that are not left-to-right (H1). We also investigate whether such a model shows an advantage over bidirectional encoder-only models like BERT (Devlin et al., 2019a) which are proficient in word-level classification tasks like tagging, but cannot leverage previously generated tags that a (dynamically ordered) encoder-decoder model can (H2).

The main contributions of the paper are:

• We present the TagInsert model, a simple but effective modification of the Transformer model designed for tagging tasks and trained to be order-agnostic.

• We evaluate TagInsert on POS tagging and the more complex CCG (Combinatory Categorial Grammar) (Steedman, 2000) supertagging task and provide quantitative and qualitative evidence of the advantages of a dynamic ordering of generation in sequence-to-sequence models.

• Our evaluations on low-resource, multilingual CCG supertagging (German, Italian,

Dutch, in addition to English) show that the gap between word-level classifiers like BERT and TagInsert closes in a more difficult, low-resource scenario, where the benefits of using a flexible order of generation are amplified.

The rest of the paper is organised as follows: we first review the role of ordering in Transformer-based generation in §2.1, and give a brief introduction to CCG supertagging in §2.2. §3 describes the architecture of our proposed TagInsert model. §4 describes baseline models and the experimental setup for POS and CCG tagging. Results are in §5, with conclusions and future work in §6.