MATTER: Memory-Augmented Transformer Using Heterogeneous Knowledge Sources

Dongkyu Lee, Chandana Satya Prakash, Jack FitzGerald, Jens Lehmann

Introduction

Retrieval-Augmented Generation (RAG) has established itself as a cornerstone for knowledge-intensive NLP tasks. However, traditional "retrieve-and-read" architectures, such as Fusion-in-Decoder (FiD), suffer from a significant "context bottleneck." These models often retrieve hundreds of documents to answer a single query, forcing the reader model to attend to tens of thousands of tokens. This leads to high latency and low throughput, typically limited to fewer than 10 questions per second.

Furthermore, existing RAG systems are often specialized for specific data formats—either unstructured text (like Wikipedia paragraphs) or semi-structured data (like QA pairs). Converting between these formats is computationally expensive and prone to noise. MATTER (Memory-Augmented Transformer using Heterogeneous Knowledge Sources) addresses these challenges by introducing a high-throughput, format-agnostic framework.

Architecture and Methodology

MATTER replaces raw-text context with compressed "neural memories," achieving a 100x throughput increase over traditional models. The architecture is built on three primary pillars:

  1. Neural Memories: Instead of passing raw text directly to the reader, MATTER utilizes the initial layers of a T5 encoder to map knowledge snippets into a fixed set of latent vectors. This drastically reduces the context length processed by the decoder.
  2. Cross-Encoding: Unlike simpler models that merely concatenate representations, MATTER’s encoder performs deep cross-encoding between the question and the retrieved neural memories in its later layers, allowing for nuanced query-context interaction.
  3. Modular Retrieval: The system employs a standard dense retriever (e.g., RePAQ or mpnet) that does not require joint training with the reader. This "plug-and-play" design allows for easy updates to the retrieval component.
Figure 1: The MATTER architecture illustrating the flow from question encoding to retrieval of heterogeneous neural memories and final decoding.

The model is optimized via a dual-loss objective: a generation loss to ensure answer accuracy and an auto-encoding loss to ensure the neural memories effectively preserve the original source information.

Experimental Setup

MATTER was pre-trained on a diverse knowledge base consisting of PAQ (64.9 million QA pairs) and 21 million Wikipedia paragraphs. Evaluation was conducted across three major open-domain QA benchmarks: TriviaQA, Natural Questions (NQ), and WebQuestions (WQ).

Key Results and Insights

MATTER demonstrates that treating knowledge as latent vectors allows for true format agnosticism. By using special tokens to distinguish between sources, the model successfully leverages the precision of QA pairs alongside the broad coverage of Wikipedia paragraphs.

Efficiency and Performance

As shown in the comparative analysis, MATTER achieves a massive leap in efficiency. It can process approximately 284 questions per second on a single V100 GPU, representing a 100x throughput improvement over conventional retrieve-and-read models.

Figure 3: Performance comparison across benchmarks. MATTER-QA/PRG shows superior zero-shot and competitive fine-tuned results with significantly higher throughput (Q/s).
  • Zero-Shot Superiority: In zero-shot settings, the MATTER-QA/PRG variant achieved an Exact Match (EM) score of 51.6 on TriviaQA, significantly outperforming previous efficient baselines like EMAT (32.4).
  • Competitive Fine-Tuning: When fine-tuned, MATTER remains competitive with heavy-duty models like RAG and FiD. For instance, on TriviaQA, it reached a 56.0 EM, rivaling RAG (56.8) while maintaining a fraction of the computational cost.
  • Selective Conditioning: Analysis indicates the model is robust to noise; it can rely on internal parametric knowledge to answer correctly even when the ground truth is missing from retrieved results.

Limitations and Future Work

While MATTER excels with unstructured and semi-structured data, its performance on fully structured sources like Knowledge Graphs remains untested. Additionally, mapping long paragraphs into a few latent vectors is a high-compression task that risks losing salient details. Future research will explore more sophisticated compression techniques and the integration of structured knowledge bases into the heterogeneous framework.

Summary updated

BibTeX
@inproceedings{lee2024matter,
  author = {Dongkyu Lee and Chandana Satya Prakash and Jack FitzGerald and Jens Lehmann},
  title = {{MATTER: Memory-Augmented Transformer Using Heterogeneous Knowledge Sources}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2024},
  doi = {10.18653/v1/2024.findings-acl.953},
}
Figure