PubMedCausal / README.md
thagen's picture
current state
2575b12
|
Raw
History Blame Contribute Delete
5.62 kB
metadata
license: unknown
task_categories:
  - text-classification
  - token-classification
language:
  - en
multilinguality:
  - monolingual
size_categories:
  - 10K<n<100K
tags:
  - causality
  - biomedical
pretty_name: PubMedCausal
configs:
  - config_name: causality detection
    data_files:
      - split: train
        path: causality-detection/train.parquet
      - split: test
        path: causality-detection/test.parquet
    features:
      - name: index
        dtype: string
      - name: text
        dtype: string
      - name: label
        dtype:
          class_label:
            names:
              '0': uncausal
              '1': causal
  - config_name: causal candidate extraction
    data_files:
      - split: train
        path: causal-candidate-extraction/train.parquet
      - split: test
        path: causal-candidate-extraction/test.parquet
    features:
      - name: index
        dtype: string
      - name: text
        dtype: string
      - name: entity
        sequence:
          sequence: int32
  - config_name: causality identification
    data_files:
      - split: train
        path: causality-identification/train.parquet
      - split: test
        path: causality-identification/test.parquet
    features:
      - name: index
        dtype: string
      - name: text
        dtype: string
      - name: relations
        list:
          - name: relationship
            dtype:
              class_label:
                names:
                  '0': no-rel
                  '1': causal
          - name: first
            dtype: string
          - name: second
            dtype: string
train-eval-index:
  - config: causality detection
    task: text-classification
    task_id: text_classification
    splits:
      train_split: train
      eval_split: test
    col_mapping:
      text: text
      label: label
    metrics:
      - type: accuracy
      - type: precision
      - type: recall
      - type: f1
  - config: causal candidate extraction
    task: token-classification
    task_id: token_classification
    splits:
      train_split: train
      eval_split: test
    metrics:
      - type: accuracy
      - type: precision
      - type: recall
      - type: f1
  - config: causality identification
    task: text-classification
    task_id: text_classification
    splits:
      train_split: train
      eval_split: test
    metrics:
      - type: accuracy
      - type: precision
      - type: recall
      - type: f1

This repository integrates the PubMedCausal causal relation extraction corpus into hf datasets. Please find the original dataset here. Please see the citations at the end of this README.

Dataset Description

PubMedCausal is a biomedical causal relation extraction corpus built from PubMed abstracts. Pairs are typed along two dimensions:

  • Causality: Explicit / Implicit
  • Sententiality: Intra-sentential / Inter-sentential

There are no countercausal annotations — all relations map to Relation.Procausal.

Statistics

Task Train Test
Causality detection (sentences) 15,000 (1,972 causal) 15,000 (1,973 causal)
Causal candidate extraction 1,972 1,973
Causality identification 1,529 1,528

Usage

Causality Detection

from datasets import load_dataset
dataset = load_dataset("webis/PubMedCausal", "causality detection")

Causal Candidate Extraction

from datasets import load_dataset
dataset = load_dataset("webis/PubMedCausal", "causal candidate extraction")

Causality Identification

from datasets import load_dataset
dataset = load_dataset("webis/PubMedCausal", "causality identification")

Conversion

Data is fetched directly from GitHub at conversion time; no local download is needed.

python conversion_script.py

This produces one parquet per split for each of the three tasks under this directory:

causality-detection/
causal-candidate-extraction/
causality-identification/

Known limitation — unresolvable spans in the identification task

PubMedCausal sometimes records the canonical / normalised form of a span rather than the exact surface text from the sentence. For example:

sentence: "...thus precluding practice and placebo effects..."
effect annotation: "precludes practice"   ← lemmatised, does not match

Because the identification task requires inserting <e1>…</e1> markers at exact character positions, pairs where either span cannot be located verbatim are skipped during conversion. The conversion script prints a warning for each skipped pair and a summary count at the end.

This affects 1,078 train pairs and 997 test pairs (roughly 28% of intra-sentential pairs), predominantly Implicit-causality annotations where the annotator wrote the inferred proposition rather than the surface string. The detection and extraction tasks are unaffected.

Citations

The PubMedCausal paper by Adewole et al., 2025:

@article{kunle-john:2026,
  title = {{{PubMedCausal}}: {{A Span-Level Annotated Corpus}} for {{Causal Relation Extraction}} in {{Biomedical Text}}},
  shorttitle = {{{PubMedCausal}}},
  author = {{Kunle-John}, Ifeoluwa and Paul, Josiah and Agbaakin, Oluwatosin and Aina, Peter and Odezuligbo, Ikenna and Anuyah, Sydney},
  year = 2026,
  journal = {CoRR},
  volume = {abs/2605.28363},
  eprint = {2605.28363},
  doi = {10.48550/ARXIV.2605.28363},
  url = {https://doi.org/10.48550/arXiv.2605.28363},
  urldate = {2026-07-01},
  archiveprefix = {arXiv}
}