NLP Named Entity Recognition 5 — Questions and Answers
Question 1: What is the role of a 'token classification head' when fine-tuning BERT for NER?
- It pools the [CLS] token for sentence-level labels
- It applies a linear layer to each token's contextual representation to predict NER tags (Correct answer)
- It masks random tokens during fine-tuning
- It computes cross-attention between entity types
Correct answer: It applies a linear layer to each token's contextual representation to predict NER tags
A linear (dense) layer is placed on top of each token's BERT output embedding to project it into the NER label space, then trained with cross-entropy loss.
Question 2: Which evaluation strategy counts an entity as correct only if its entire span and type exactly match the gold annotation?
- Token-level accuracy
- Partial match scoring
- Exact (strict) match F1 (Correct answer)
- Relaxed boundary F1
Correct answer: Exact (strict) match F1
Strict (exact) match F1 requires both span boundaries and entity type to be correct; partial overlap does not count as a true positive.
Question 3: What is 'data augmentation' commonly used for in low-resource NER?
- Speeding up inference
- Generating additional training examples by replacing entities with synonyms or back-translation (Correct answer)
- Reducing model size
- Removing noisy annotations
Correct answer: Generating additional training examples by replacing entities with synonyms or back-translation
Entity-level substitution (swapping entity mentions with semantically similar ones) and back-translation are popular augmentation strategies to expand small NER training sets.
Question 4: In multi-task learning for NER, what is a common auxiliary task trained jointly with entity recognition?
- Machine translation
- Part-of-speech tagging or chunking (Correct answer)
- Image captioning
- Question answering on a different domain
Correct answer: Part-of-speech tagging or chunking
POS tagging and chunking share syntactic structure with NER, so training them jointly often improves entity recognition through shared representations.
Question 5: Which component of a pipeline-based information extraction system comes directly AFTER NER?
- Tokenization
- Sentence splitting
- Relation extraction (Correct answer)
- Stopword removal
Correct answer: Relation extraction
Relation extraction identifies semantic relationships between entity pairs that NER has already identified, making it the natural downstream task.
Question 6: What is 'transfer learning' in the context of domain-specific NER (e.g., clinical NER)?
- Copying weight files between servers
- Pre-training on general text then fine-tuning on domain-specific annotated data (Correct answer)
- Using rule-based systems from another domain
- Translating clinical notes to English
Correct answer: Pre-training on general text then fine-tuning on domain-specific annotated data
Transfer learning pre-trains a language model on large corpora (e.g., PubMed) and then fine-tunes it on a small clinical NER dataset, achieving strong results with limited labeled data.
Question 7: What problem does 'label inconsistency' cause in NER training data, and how is it typically addressed?
- It inflates F1 scores; fixed by upsampling
- It introduces conflicting supervision signals; addressed through annotation guidelines and inter-annotator agreement checks (Correct answer)
- It causes tokenizer errors; fixed by byte-pair encoding
- It slows training; fixed by gradient clipping
Correct answer: It introduces conflicting supervision signals; addressed through annotation guidelines and inter-annotator agreement checks
When the same entity is sometimes labeled and sometimes not (inconsistent annotation), it confuses the model; clear guidelines and high inter-annotator agreement (Cohen's kappa) mitigate this.
What is the role of a 'token classification head' when fine-tuning BERT for NER?