MS-DS Master of Data science FREE Master of Data Science Natural Language Processing Questions and Answers 2 — Questions and Answers
Question 1: Which technique represents words as dense, low-dimensional vectors learned from large corpora?
- Word embeddings (Correct answer)
- One-hot encoding
- Bag of words
- TF-IDF weighting
Correct answer: Word embeddings
Word embeddings like Word2Vec and GloVe learn dense vector representations that capture semantic relationships between words.
Question 2: What is the primary purpose of the attention mechanism in sequence-to-sequence models?
- To allow the decoder to focus on relevant parts of the input sequence (Correct answer)
- To reduce the vocabulary size
- To speed up training convergence
- To eliminate the need for word embeddings
Correct answer: To allow the decoder to focus on relevant parts of the input sequence
Attention lets the decoder selectively weight different positions in the input sequence, improving performance on long sequences.
Question 3: In named entity recognition (NER), which label would typically be assigned to the word 'Stanford' in the sentence 'She studied at Stanford'?
- Organization (Correct answer)
- Person
- Location
- Miscellaneous
Correct answer: Organization
Stanford refers to Stanford University, which is classified as an organization entity in standard NER tagging schemes.
Question 4: What problem does beam search address during text generation compared to greedy decoding?
- It explores multiple candidate sequences to find a higher-probability output (Correct answer)
- It guarantees finding the globally optimal sequence
- It reduces memory usage during decoding
- It eliminates the need for a language model
Correct answer: It explores multiple candidate sequences to find a higher-probability output
Beam search maintains multiple partial hypotheses at each step, reducing the risk of selecting a locally optimal but globally suboptimal sequence.
Question 5: Which evaluation metric computes the geometric mean of n-gram precisions between generated and reference text?
- BLEU (Correct answer)
- ROUGE-L
- METEOR
- Perplexity
Correct answer: BLEU
BLEU calculates precision for n-grams of various lengths and combines them using a geometric mean with a brevity penalty.
Question 6: What is the vanishing gradient problem in the context of recurrent neural networks for NLP?
- Gradients shrink exponentially over long sequences, preventing learning of long-range dependencies (Correct answer)
- The model produces identical outputs regardless of input length
- Training loss becomes negative during backpropagation
- Word embeddings converge to zero vectors after many epochs
Correct answer: Gradients shrink exponentially over long sequences, preventing learning of long-range dependencies
In vanilla RNNs, repeated multiplication of small gradient values across many time steps causes gradients to approach zero, hindering long-range learning.
Which technique represents words as dense, low-dimensional vectors learned from large corpora?