Natural Language Processing Natural Language Processing MCQ 4 — Questions and Answers
Question 1: What is 'perplexity' as used to evaluate language models?
- The ratio of vocabulary size to training corpus size
- The exponentiated average negative log-likelihood per token (Correct answer)
- The number of unique n-grams generated per sentence
- The proportion of unknown tokens in a test set
Correct answer: The exponentiated average negative log-likelihood per token
Perplexity equals 2^(cross-entropy) and measures how well a probability model predicts a sample — lower perplexity indicates a better model.
Question 2: In the context of question answering, what is a 'reading comprehension' task?
- Generating questions automatically from a given passage
- Answering questions by extracting or inferring information from a provided passage (Correct answer)
- Summarizing a passage into a set of key facts
- Translating questions from one language to answer in another
Correct answer: Answering questions by extracting or inferring information from a provided passage
Reading comprehension tasks require models to answer questions using information contained in a provided context passage, as in SQuAD.
Question 3: What does the 'temperature' parameter control during language model text generation?
- The maximum number of tokens generated per sequence
- The sharpness or randomness of the output token probability distribution (Correct answer)
- The learning rate decay schedule during fine-tuning
- The ratio of attention heads used during inference
Correct answer: The sharpness or randomness of the output token probability distribution
Temperature scales logits before softmax; lower values make distributions peakier (more deterministic) while higher values increase randomness.
Question 4: Which NLP technique is specifically designed to handle long-range dependencies more effectively than standard RNNs?
- GRU with bidirectional processing
- Long Short-Term Memory (LSTM) (Correct answer)
- Bag-of-words with TF-IDF weighting
- Hidden Markov Models with Baum-Welch training
Correct answer: Long Short-Term Memory (LSTM)
LSTMs use gating mechanisms (input, forget, output gates) to selectively retain or discard information across long sequences, addressing the vanishing gradient problem.
Question 5: What is 'data augmentation' in the context of NLP model training?
- Expanding the model vocabulary with domain-specific terms
- Artificially increasing training data diversity through techniques like back-translation or synonym replacement (Correct answer)
- Adding more attention heads to handle rare linguistic patterns
- Scaling up the training batch size to improve gradient estimates
Correct answer: Artificially increasing training data diversity through techniques like back-translation or synonym replacement
NLP data augmentation creates new training examples by modifying existing ones via techniques like paraphrasing, back-translation, or token insertion/deletion.
Question 6: In dependency parsing, what is the 'head' of a dependency relation?
- The first token of the sentence that governs all other tokens
- The word that another word (the dependent) grammatically modifies or depends on (Correct answer)
- The root node in a constituency parse tree
- The subject of the main clause in the sentence
Correct answer: The word that another word (the dependent) grammatically modifies or depends on
In a dependency parse, each word (except the root) has a head — the word it syntactically depends on, connected by a directed arc.
Question 7: What is the purpose of 'masked language modeling' (MLM) as used in BERT's pre-training?
- Preventing the model from seeing future tokens during autoregressive generation
- Training the model to predict randomly masked tokens using bidirectional context (Correct answer)
- Masking out padding tokens during attention computation
- Hiding entity labels to force the model to generalize NER patterns
Correct answer: Training the model to predict randomly masked tokens using bidirectional context
MLM randomly masks tokens in the input and trains the model to reconstruct them, forcing it to learn deep bidirectional representations.
What is 'perplexity' as used to evaluate language models?