Introduction
Relation Extraction (RE) is a fundamental task in natural language processing, focused on identifying semantic relationships between entities within a text—for instance, extracting the triplet (Taylor Swift, Born In, Pennsylvania). While the field is currently dominated by Pre-trained Language Models (PLMs) like BERT and BART, these architectures are computationally intensive. The self-attention mechanism inherent in Transformers exhibits quadratic complexity relative to sentence length, resulting in significant latency. This bottleneck makes deployment challenging in real-time "streaming" scenarios, such as processing high-volume financial news or social media feeds.
To address these efficiency challenges, we present FastRE, a lightweight RE model that replaces heavy Transformer blocks with a specialized convolutional encoder and an optimized tagging framework. FastRE achieves up to 15x faster inference and utilizes only 1/100th of the parameters of state-of-the-art models while maintaining competitive accuracy.
Methodology
FastRE optimizes both the encoding (reading) and tagging (labeling) phases of the RE pipeline through three primary innovations:
1. Convolutional Encoder with Dilated Convolutions
Rather than relying on self-attention, FastRE employs a stack of convolutional blocks. To capture the long-distance dependencies typically handled by Transformers, the model utilizes dilated convolutions. This technique allows the "receptive field"—the portion of the sentence the model considers—to increase exponentially as the network deepens. The architecture also integrates gated units to regulate information flow and residual connections to facilitate the training of deeper networks.
2. Type-Relation Mapping
Standard RE models often evaluate every possible relation for every entity pair, leading to redundant computations. FastRE introduces a mapping mechanism that uses entity types (e.g., "Person," "Location") to constrain the search space. If an entity is identified as a "Person," the model only evaluates relations relevant to that type, significantly streamlining the decoding process.
3. Position-Dependent Adaptive Thresholding
Traditional models typically use a static global threshold to determine the existence of a relation. FastRE instead learns a specific threshold for each position within a sentence. This adaptive approach allows the model to better generalize across diverse sentence structures and reduces errors at entity boundaries.
Experimental Evaluation
The performance of FastRE was evaluated on three standard public benchmarks:
- NYT10 and NYT11: Datasets derived from New York Times articles containing 29 and 12 relation types, respectively.
- NYT24: A larger dataset with 24 relation types, specifically designed to test a model's ability to handle overlapping relations (where a single entity participates in multiple facts).
Key Results and Insights
FastRE demonstrates that convolutional neural networks (CNNs) remain highly effective for NLP when properly architected. Key findings include:
- Efficiency: FastRE is 7-15x faster at inference and 3-10x faster to train than BERT-based models like CasRel and TPLinker.
- Model Size: The model is exceptionally lean, requiring only ~1.1 million parameters, compared to the ~110 million parameters found in a standard BERT-base model.
- Accuracy: On the NYT10 and NYT11 benchmarks, FastRE outperformed several BERT-based counterparts in F1 score. On the more complex NYT24 dataset, it remained competitive, trailing state-of-the-art models by less than 4%.
Discussion and Limitations
The study highlights that efficiency gains in RE are a "pipeline problem." By improving both the encoder and the tagging logic, FastRE eliminates the "meaningless computations" that often slow down Transformer-based decoders.
However, the authors note a slight reduction in "expression ability" compared to massive Transformers, particularly on the NYT24 dataset. This suggests that while FastRE is highly efficient, larger models may have an advantage in "memorizing" frequent triplets in specific datasets. Future research may focus on more complex mapping mechanisms or further optimizing the convolutional structure to bridge the remaining accuracy gap on large-scale datasets.
Conclusion
FastRE proves that with the integration of dilated convolutions, gating mechanisms, and intelligent tagging, CNN-based models can rival the performance of Transformers in specific tasks like Relation Extraction while offering a fraction of the computational overhead. This makes FastRE an ideal candidate for high-throughput, low-latency industrial applications.
Summary updated