Dataset Viewer
Auto-converted to Parquet Duplicate
sample_id
stringlengths
11
11
manuscript_license
stringclasses
6 values
manuscript
stringlengths
4.81k
228k
relevant_papers
stringlengths
7.16k
5.05M
gold_discussion
stringlengths
810
27.2k
gold_discussion_content_id
listlengths
1
1
content_ids_referenced_in_gold_discussion
listlengths
0
7
bibliography_entry_ids_referenced_in_gold_discussion
listlengths
1
11
oracle_discussion_controls
listlengths
0
0
PMC12944383
CC BY
"{\"paper_id\": \"PMC12944383\", \"paper_id_type\": \"pmc\", \"all_known_paper_ids\": {\"pmc\": \"PM(...TRUNCATED)
"{\"B1-sensors-26-01113\": {\"paper_id\": \"B1-sensors-26-01113\", \"paper_id_type\": \"custom\", \"(...TRUNCATED)
"{\"content_id\": [3], \"content_type\": \"section\", \"header\": \"4. Discussion\", \"contents\": [(...TRUNCATED)
[ 3 ]
[]
[ "B26-sensors-26-01113" ]
[]
PMC13044332
CC BY
"{\"paper_id\": \"PMC13044332\", \"paper_id_type\": \"pmc\", \"all_known_paper_ids\": {\"pmc\": \"PM(...TRUNCATED)
"{\"gcb70830-bib-0001\": {\"paper_id\": \"37771005\", \"paper_id_type\": \"s2cid\", \"all_known_pape(...TRUNCATED)
"{\"content_id\": [3], \"content_type\": \"section\", \"header\": \"Discussion\", \"contents\": [{\"(...TRUNCATED)
[ 3 ]
[]
[ "gcb70830-bib-0058" ]
[]
PMC12987614
CC BY
"{\"paper_id\": \"PMC12987614\", \"paper_id_type\": \"pmc\", \"all_known_paper_ids\": {\"pmc\": \"PM(...TRUNCATED)
"{\"B1\": {\"paper_id\": \"256882942\", \"paper_id_type\": \"s2cid\", \"all_known_paper_ids\": {\"do(...TRUNCATED)
"{\"content_id\": [2], \"content_type\": \"section\", \"header\": \"Discussion\", \"contents\": [{\"(...TRUNCATED)
[ 2 ]
[ [ 6 ] ]
[ "B25", "B27", "B26" ]
[]
PMC12794563
CC BY-NC
"{\"paper_id\": \"PMC12794563\", \"paper_id_type\": \"pmc\", \"all_known_paper_ids\": {\"pmc\": \"PM(...TRUNCATED)
"{\"cit0001\": {\"paper_id\": \"cit0001\", \"paper_id_type\": \"custom\", \"all_known_paper_ids\": {(...TRUNCATED)
"{\"content_id\": [3], \"content_type\": \"section\", \"header\": \"Discussion\", \"contents\": [{\"(...TRUNCATED)
[ 3 ]
[]
[ "cit0007" ]
[]
PMC12916383
CC BY
"{\"paper_id\": \"PMC12916383\", \"paper_id_type\": \"pmc\", \"all_known_paper_ids\": {\"pmc\": \"PM(...TRUNCATED)
"{\"B1\": {\"paper_id\": \"281742895\", \"paper_id_type\": \"s2cid\", \"all_known_paper_ids\": {\"do(...TRUNCATED)
"{\"content_id\": [3], \"content_type\": \"section\", \"header\": \"Discussion\", \"contents\": [{\"(...TRUNCATED)
[ 3 ]
[]
[ "B1" ]
[]
PMC12972007
CC BY-NC-ND
"{\"paper_id\": \"PMC12972007\", \"paper_id_type\": \"pmc\", \"all_known_paper_ids\": {\"pmc\": \"PM(...TRUNCATED)
"{\"r1\": {\"paper_id\": \"268886842\", \"paper_id_type\": \"s2cid\", \"all_known_paper_ids\": {\"do(...TRUNCATED)
"{\"content_id\": [2], \"content_type\": \"section\", \"header\": \"Discussion\", \"contents\": [{\"(...TRUNCATED)
[ 2 ]
[]
[ "r11", "r10" ]
[]
PMC13054891
CC BY-NC
"{\"paper_id\": \"PMC13054891\", \"paper_id_type\": \"pmc\", \"all_known_paper_ids\": {\"pmc\": \"PM(...TRUNCATED)
"{\"cit1\": {\"paper_id\": \"49619233\", \"paper_id_type\": \"s2cid\", \"all_known_paper_ids\": {\"d(...TRUNCATED)
"{\"content_id\": [3], \"content_type\": \"section\", \"header\": \"Discussion\", \"contents\": [{\"(...TRUNCATED)
[ 3 ]
[ [ 2, 2, 0, 1 ], [ 2, 4, 1 ], [ 2, 5, 1 ], [ 2, 0, 1 ], [ 2, 0, 4 ], [ 2, 3, 1 ] ]
[ "cit77", "cit76" ]
[]
PMC12820544
CC BY
"{\"paper_id\": \"PMC12820544\", \"paper_id_type\": \"pmc\", \"all_known_paper_ids\": {\"pmc\": \"PM(...TRUNCATED)
"{\"ref1\": {\"paper_id\": \"25305237\", \"paper_id_type\": \"s2cid\", \"all_known_paper_ids\": {\"d(...TRUNCATED)
"{\"content_id\": [3], \"content_type\": \"section\", \"header\": \"Discussion\", \"contents\": [{\"(...TRUNCATED)
[ 3 ]
[]
[ "ref30" ]
[]
PMC12937649
CC BY
"{\"paper_id\": \"PMC12937649\", \"paper_id_type\": \"pmc\", \"all_known_paper_ids\": {\"pmc\": \"PM(...TRUNCATED)
"{\"B1-bioengineering-13-00131\": {\"paper_id\": \"B1-bioengineering-13-00131\", \"paper_id_type\": (...TRUNCATED)
"{\"content_id\": [4], \"content_type\": \"section\", \"header\": \"5. Discussion\", \"contents\": [(...TRUNCATED)
[ 4 ]
[]
[ "B47-bioengineering-13-00131", "B5-bioengineering-13-00131" ]
[]
PMC13092272
CC BY-NC
"{\"paper_id\": \"PMC13092272\", \"paper_id_type\": \"pmc\", \"all_known_paper_ids\": {\"pmc\": \"PM(...TRUNCATED)
"{\"ref1\": {\"paper_id\": \"260698497\", \"paper_id_type\": \"s2cid\", \"all_known_paper_ids\": {\"(...TRUNCATED)
"{\"content_id\": [3], \"content_type\": \"section\", \"header\": \"Discussion\", \"contents\": [{\"(...TRUNCATED)
[ 3 ]
[]
[ "ref28", "ref29" ]
[]
End of preview. Expand in Data Studio

PMCOA Discussion Generation Dataset

A dataset of 627 biomedical papers from PubMed Central Open Access, built for the task of discussion section generation: given a manuscript (with its Discussion section removed) and the full text of its cited papers, generate the Discussion section.

Each sample contains:

  • manuscript — the paper with its Discussion section removed
  • relevant_papers — full text of the papers cited in the gold discussion
  • gold_discussion — the ground-truth Discussion section

The canonical schema is defined in src/discussion_generation/data/schemas.py and documented in detail in src/discussion_generation/data/README.md.


Why some fields are JSON strings

Apache Arrow (which backs HuggingFace datasets) requires every column to have a fixed, uniform schema. Two patterns in the native schema are incompatible with that:

Pattern Arrow's problem
dict[PaperIdType, ...] — keys are an open str enum Arrow infers column types from the first record; unseen key names in later records break the schema
list[Content] where Content = Paragraph | Section — recursive, polymorphic Arrow cannot represent recursive or union-typed nested structs

The following fields are serialized to JSON strings before upload:

HF column Native type Reason
manuscript Paper recursive / polymorphic, plus dynamic dict keys in nested all_known_paper_ids/bibliography
relevant_papers dict[BibliographyEntryId, Paper] dynamic dict keys at top level
gold_discussion Section recursive / polymorphic

Additionally, ContentId (tuple[int, ...]) is stored as list[int] because Arrow has no tuple type. This affects gold_discussion_content_id and each element of content_ids_referenced_in_gold_discussion.

All other fields keep their original structure.


Restoring the original structure

Parse JSON strings back and validate with the Sample Pydantic model. Pydantic handles list[int]tuple[int, ...] coercion for ContentId fields automatically.

import json
from datasets import load_dataset
from discussion_generation.data.schemas import Sample

ds = load_dataset("jessicalamjh/discussion-generation", split="train")

def restore(record: dict) -> Sample:
    record = dict(record)

    record["manuscript"]      = json.loads(record["manuscript"])
    record["relevant_papers"] = json.loads(record["relevant_papers"])
    record["gold_discussion"] = json.loads(record["gold_discussion"])

    return Sample.model_validate(record)

samples: list[Sample] = [restore(r) for r in ds]

Or, more simply, via load_schematized_dataset in src/discussion_generation/utils/data.py, which does the same thing:

from discussion_generation.utils.data import load_schematized_dataset

samples = load_schematized_dataset("jessicalamjh/discussion-generation", split="train")
Downloads last month
70