NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

A Hybrid of Rule-based and Transformer-based Approaches for Relation Extraction in Biodiversity Literature

Roselyn Gabud, P. G. Lapitan, Vladimir Y. Mariano, Eduardo Mendoza, Nelson M. Pampolina, Maria Art Antonette Clariño, Riza Batista-Navarro2023

This paper, presented at the 2023 Workshop on Pattern-based Approaches to NLP, addresses a common bottleneck in specialized scientific fields: how to extract meaningful data from text when you don't have thousands of labeled examples to train a deep learning model.

TL;DR

Researchers developed a zero-shot hybrid system that combines hand-crafted regular expression (regex) rules with a T5 transformer model framed as a Natural Language Inference (NLI) task. By using rules to handle high-precision cases and the transformer to generalize across complex sentences, they achieved F1-scores up to 96.75% for extracting biological relations in biodiversity literature without requiring a domain-specific labeled training set.

What Problem Does This Paper Address?

Relation Extraction (RE) is the task of identifying semantic links between entities in text—for example, connecting a specific plant species to its "habitat" or its "flowering season." While modern deep learning models excel at this, they are data-hungry. In specialized domains like biodiversity, expert-labeled datasets are scarce and expensive to produce.

The authors identify a "performance gap":

  1. Rule-based systems are highly precise and interpretable but have "low recall" (they miss many valid relations because they can't account for every possible way a human might phrase a sentence).
  2. Deep learning models have better "recall" but require massive amounts of data and can be "black boxes" that are difficult to debug.

The challenge is to create a system that is accurate, computationally efficient, and works "out of the box" (zero-shot) for the biodiversity domain.

Methods

The authors propose a two-step hybrid approach:

  1. Step 1: Regex-based Rules: Domain experts created rules to capture common syntactic patterns (e.g., "Species X found in Habitat Y"). These rules act as a high-precision filter. If a sentence matches a rule, the relation is extracted immediately.
  2. Step 2: Transformer-based NLI: Any potential entity pairs not caught by the rules are passed to a T5-large model. Crucially, they frame RE as a Natural Language Inference (NLI) problem.
  3. Premise: The original sentence from the literature.
  4. Hypothesis: A generated sentence based on a template, such as "The [habitat] was in [geographic location]."
    • If the T5 model predicts "entailment" (meaning the premise supports the hypothesis), the system records a valid relation.

The "Compound Entity" Enhancement: A key innovation was using regex to identify "compound entities"—lists of locations or dates (e.g., "July, August, and September"). By treating these lists as a single unit in the NLI templates, the model avoided the confusion that often arises when multiple entities are scattered across a complex sentence.

Datasets

The study focused on the tropical tree family Dipterocarpaceae (dipterocarps).

  • Source: 151 manually selected documents from environmental science and ecology journals.
  • Entities: The dataset used pre-existing gold-standard annotations for four entity types: habitat, geographic location, reproductive condition, and temporal expression.
  • Relations: The authors focused on two specific types:
  • has_time: Linking a reproductive status (like "fruiting") to a time (like "mid-August").
  • has_location: Linking a habitat to a specific geographic place.

Key Insights and Ideas

  • Zero-Shot Versatility: The T5 model used was not fine-tuned on biodiversity data. Its ability to perform RE comes from its general understanding of language logic (NLI), proving that "generalist" models can be "specialists" if prompted correctly.
  • Efficiency through Hybridization: By using regex first, the system reduces the "computational bottleneck." Simple relations are handled by cheap regex patterns, leaving the expensive transformer model to handle only the more linguistically complex cases.
  • Rules as a Safety Net: The regex rules achieved 100% precision in testing. This makes the system highly reliable for automated database curation where false positives are costly.
  • Handling Enumerations: One of the biggest "aha moments" was realizing that transformers struggle with long lists. Using a hybrid approach to "pre-package" these lists (compound entities) before feeding them to the transformer led to a massive jump in performance.

Key Results

The hybrid approach significantly outperformed standalone methods across the board:

Approach has_time (F1) has_location (F1)
Regex-based rules 50.64% 53.97%
Transformer (T5) alone 86.98% 84.75%
Hybrid + Compound Entities 96.75% 89.90%
  • Recall Boost: The "Hybrid + Compound Entities" version improved recall by approximately 15 percentage points compared to the basic hybrid model for temporal relations.
  • Precision: The system maintained very high precision (95.26% for has_time), ensuring the extracted data is trustworthy.

Limitations and Future Work

  • Intra-sentential focus: Currently, the system only extracts relations where both entities appear in the same sentence. It cannot yet link information across different sentences or paragraphs.
  • Template Sensitivity: The performance of the NLI step depends heavily on the quality of the hypothesis templates. Future work could involve automatically generating or optimizing these templates.
  • Scaling: The authors plan to test this hybrid method on broader, more diverse datasets (like FewRel or WikiZSL) to see if the success in biodiversity translates to other specialized fields like law or finance.

Summary updated

BibTeX
@misc{gabud2023hybrid,
  author = {Roselyn Gabud and P. G. Lapitan and Vladimir Y. Mariano and Eduardo Mendoza and Nelson M. Pampolina and Maria Art Antonette Clariño and Riza Batista-Navarro},
  title = {{A Hybrid of Rule-based and Transformer-based Approaches for Relation Extraction in Biodiversity Literature}},
  year = {2023},
  doi = {10.18653/v1/2023.pandl-1.10},
}
Figure