Papers › Exploring Cross-sentence Contexts for Named Entity Recognition with BERT

Exploring Cross-sentence Contexts for Named Entity Recognition with BERT

2 Jun 2020COLING 2020 8arXiv:2006.01563archive 2025-07-28

Jouni Luoma, Sampo Pyysalo

Named entity recognition (NER) is frequently addressed as a sequence classification task where each input consists of one sentence of text. It is nevertheless clear that useful information for the task can often be found outside of the scope of a single-sentence context. Recently proposed self-attention models such as BERT can both efficiently capture long-distance relationships in input as well as represent inputs consisting of several sentences, creating new opportunitites for approaches that incorporate cross-sentence information in natural language processing tasks. In this paper, we present a systematic study exploring the use of cross-sentence information for NER using BERT models in five languages. We find that adding context in the form of additional sentences to BERT input systematically increases NER performance on all of the tested languages and models. Including multiple sentences in each input also allows us to study the predictions of the same sentences in different contexts. We propose a straightforward method, Contextual Majority Voting (CMV), to combine different predictions for sentences and demonstrate this to further increase NER performance with BERT. Our approach does not require any changes to the underlying BERT architecture, rather relying on restructuring examples for training and prediction. Evaluation on established datasets, including the CoNLL'02 and CoNLL'03 NER benchmarks, demonstrates that our proposed approach can improve on the state-of-the-art NER results on English, Dutch, and Finnish, achieves the best reported BERT-based results on German, and is on par with performance reported with other BERT-based approaches in Spanish. We release all methods implemented in this work under open licenses.

PaperPDFConference PDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2006.01563")

Code

Syntology Ran 1 of 7 code samples harvested from 1 repository linked to this paper; 6 have no recorded run. Of those that ran: 1 ran · our draft was wrong.

By repository: official repository: 7 samples from 1 repository, 1 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

7 samples harvested; 1 ran; 0 honoured the contract we drafted; 6 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · our draft was wrong
6unverified

Licence: 0 of the 7 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from jouniluoma/bert-ner-cmv. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

convert_to_unicode jouniluoma/bert-ner-cmv/bert_tokenization.py official repository ran · our draft was wrong fingerprinted MIT (permissive) · 1923fc05163d207d · report
evaluate jouniluoma/bert-ner-cmv/conlleval.py official repository unverified MIT (permissive) · 772a429073a9ffad · report
load_vocab jouniluoma/bert-ner-cmv/bert_tokenization.py official repository unverified MIT (permissive) · 30b05f2a415dd132 · report
parse_args jouniluoma/bert-ner-cmv/conlleval.py official repository unverified MIT (permissive) · 6dfc81a02ee3dd85 · report
parse_tag jouniluoma/bert-ner-cmv/conlleval.py official repository unverified MIT (permissive) · 2e9480de024f3eec · report
printable_text jouniluoma/bert-ner-cmv/bert_tokenization.py official repository unverified MIT (permissive) · 0e5615f8994003cf · report
read_conll jouniluoma/bert-ner-cmv/compare.py official repository unverified MIT (permissive) · 65943daabb32c33b · report

Tasks

NERNamed Entity RecognitionNamed Entity Recognition (NER)Sentencenamed-entity-recognition

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Named Entity Recognition (NER) CoNLL 2002 (Dutch) Cross-sentence context (CMV) F1 93.49 #5 of 6 Archive leaderboard report
Named Entity Recognition (NER) CoNLL 2002 (Spanish) Cross-sentence context (CMV) F1 88.32 #6 of 6 Archive leaderboard report
Named Entity Recognition (NER) CoNLL 2003 (English) Cross-sentence context (First) F1 93.74 #13 of 73 Archive leaderboard report
Named Entity Recognition (NER) CoNLL 2003 (German) Cross-sentence context (CMV) F1 87.31 #3 of 6 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Methods

AdamAttentionAttention DropoutBERTDense ConnectionsDropoutLayer NormalizationLinear LayerLinear Warmup With Linear DecayMulti-Head AttentionResidual ConnectionSoftmaxWeight DecayWordPiece

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections