Deep dive · 03
Extracting biomarkers — NER, then RE
Part 2 of the solution. Once a report is confirmed NGS, its text runs through two models: a BERT NER model that finds the biomarkers and the mutations, and a relationship-extraction model that figures out which mutation belongs to which biomarker — the hard part, because OCR scrambles the layout.
The two-model pipeline
The NER model — find biomarkers & mutations
Detail — why span-level tagging
The model emits the character span of every entity, not just a label. Those positions are what the next stage reasons over: the relationship model needs to know where each biomarker and mutation sit relative to one another, since proximity is one of the few signals that survives OCR.
Why pairing is the hard part
Different NGS lab tests present results in different layouts. When OCR linearizes the page, a biomarker and its mutation can end up far apart in the text — or in the wrong order — so you can't just pair each entity with its nearest neighbor.
Double-column
Stacked
Split-aligned
The RE model — link mutation to biomarker
Detail — candidate generation & the learned signal
Rather than assume adjacency, the model enumerates plausible pairs of biomarker and mutation entities within a neighborhood and judges each one. Because it's trained across the different lab-report formats, it learns the spatial and textual cues that distinguish a genuine biomarker–result pair from a coincidental nearby one — which is what makes it robust to double-column, stacked, and split-aligned reports alike.
What comes out
The pipeline turns each NGS report into a clean set of (biomarker, mutation) records — a structured genomic profile per patient. Those records are exactly what feeds the human-in-the-loop validation step next, and ultimately the Genome360 dataset.