[Paper Review] Bootstrapping a Data-Set and Model for Question-Answering in Portuguese (Short Paper)
Transformer-XL introduces a novel architecture that enables long-range sequence modeling by combining segment-level recurrence and relative positional encoding, allowing attention to capture dependencies up to 80% longer than RNNs and 450% longer than vanilla Transformers, while achieving state-of-the-art results in language modeling with up to 1,800x faster inference.
Question answering systems are mainly concerned with fulfilling an information query written in natural language, given a collection of documents with relevant information. They are key elements in many popular application systems as personal assistants, chat-bots, or even FAQ-based online support systems. This paper describes an exploratory work carried out to come up with a state-of-the-art model for question-answering tasks, for the Portuguese language, based on deep neural networks. We also describe the automatic construction of a data-set for training and testing the model. The final model is not trained in any specific topic or context, and is able to handle generic documents, achieving 50% accuracy in the testing data-set. While the results are not exceptional, this work can support further development in the area, as both the data-set and model are publicly available.
Motivation & Objective
- To address the limitation of fixed-length context in standard Transformers and RNNs, which restricts modeling of long-term dependencies.
- To resolve the context fragmentation problem caused by training on isolated, fixed-length segments.
- To enable effective information flow across segments without disrupting temporal coherence.
- To improve performance on both short and long sequences in language modeling tasks.
- To achieve faster inference and better generalization on diverse language modeling benchmarks.
Proposed method
- Introduces segment-level recurrence by reusing hidden states from previous segments as memory for the current segment.
- Proposes a relative positional encoding scheme that enables generalization to longer attention lengths than seen during training.
- Replaces absolute positional encodings with relative encodings to maintain temporal consistency when reusing memory.
- Uses a memory-augmented Transformer decoder with a fixed-length context window, but allows context to span multiple segments via recurrence.
- Applies the same self-attention mechanism across segments, enabling attention to attend to tokens beyond the immediate segment.
- Trains the model end-to-end on segmented data, but enables long-range modeling through memory reuse and relative positional encoding.
Experimental results
Research questions
- RQ1Can a self-attention model learn dependencies longer than those captured by RNNs and vanilla Transformers?
- RQ2Does segment-level recurrence with memory reuse improve long-context modeling without disrupting temporal coherence?
- RQ3Can relative positional encoding enable effective attention over longer sequences than the training context length?
- RQ4How does Transformer-XL perform on both short and long sequence language modeling benchmarks?
- RQ5Can the model generate coherent, long-form text without fine-tuning?
Key findings
- Transformer-XL achieves a test perplexity of 0.99 on enwiki8, 1.08 on text8, 18.3 on WikiText-103, 21.8 on One Billion Word, and 54.5 on Penn Treebank without fine-tuning.
- The model captures dependencies 80% longer than RNNs and 450% longer than vanilla Transformers.
- During evaluation, Transformer-XL is up to 1,800 times faster than vanilla Transformers due to efficient memory reuse.
- Trained only on 100M tokens of WikiText-103, the model generates coherent, novel text articles of thousands of tokens.
- The model maintains topic consistency and chronological coherence in long generations, as shown in 1,000-token samples from the WikiText-103 test set.
- Relative positional encoding is essential for stable memory reuse and prevents temporal confusion in long sequences.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.