Major links



Quicklinks


📌 Quick Links
[ DBMS ] [ SQL ] [ DDB ] [ ML ] [ DL ] [ NLP ] [ DSA ] [ PDB ] [ DWDM ] [ Quizzes ]


Showing posts with label NLP Quiz Questions. Show all posts
Showing posts with label NLP Quiz Questions. Show all posts

Tuesday, February 3, 2026

Transformer & LLM Architecture MCQs Explained | Deep Learning NLP

✔ Scroll down and test yourself — answers are hidden under the “View Answer” button.

☰ Quick Links - Browse Related MCQs
🚨 Quiz Instructions:
Attempt all questions first.
✔️ Click SUBMIT at the end to unlock VIEW ANSWER buttons.
Quiz Mode:

Conceptual MCQs on Transformer and Large Language Model Architectures

These conceptual multiple-choice questions (MCQs) cover core ideas behind Transformer architectures and large language models (LLMs), including BERT, GPT-style models, self-attention, positional embeddings, and in-context learning. Each question is followed by a clear, exam- and interview-oriented explanation.

These questions are useful for machine learning students, NLP researchers, and anyone preparing for deep learning exams or technical interviews.

Topics Covered

  • Self-attention vs RNNs
  • BERT masking strategy
  • GPT scaling behavior
  • Positional embeddings
  • In-context learning

1.
A shallow Transformer often outperforms a much deeper RNN on long documents. What is the primary architectural reason?






Correct Answer: B

This question acutally tests "Why can a shallow Transformer understand long documents better than a very deep RNN?".

The key difference lies in how information flows across long distances in a sequence. Transformers handle long-range dependencies efficiently because self-attention allows any token to directly attend to any other token, unlike RNNs where information must propagate sequentially.

What happens in an RNN?

In an RNN (even LSTM/GRU): Information from an early token must pass step by step through every intermediate token. For a document of length n, the dependency path length is O(n).

So for long documents, important early information gets weakened or distorted. Learning long-range dependencies becomes very hard. Eventhough the depth helps, it cannot remove this sequential bottleneck.

What happens in a Transformer?

With self-attention every token can directly attend to any other token. Dependency path length is O(1) (one attention step). So even with few layers, a word at the start can influence a word at the end immediately. Long-range relationships (coreference, topic continuity, constraints) are preserved.

This is why context window length matters more than depth for long documents.

In simpler terms,

Self-attention's ability to create direct connections between any two tokens in the sequence, regardless of their distance, fundamentally solves the long-range dependency problem that plagues RNNs. In a single attention operation, token i can directly interact with token j, establishing a maximum path length of O(1) between them. This architectural property means that:

  • Information flows directly
  • Gradients propagate effectively
  • Long-range dependencies become learnable

Why other options are INCORRECT?

Option A: INCORRECT. Embeddings are not the main reason — RNNs can also use high-quality embeddings.

Option C: INCORRECT. This applies mainly to BERT, not all Transformers. Also, bidirectionality alone does not solve long dependency paths.

Option D: INCORRECT. Parallelization affects training speed, not the model’s ability to understand long documents.

2.
Why does BERT mask only about 15% of tokens during masked language modeling?






Correct Answer: C

BERT masks only about 15% of tokens to ensure that most inputs during pretraining resemble real text, thereby reducing the distribution mismatch between pretraining and fine-tuning.


Explanation:

What is meant by distribution shift between pretraining and fine-tuning?

Distribution shift between pretraining and fine-tuning means the kind of inputs the model sees during pretraining are different from what it sees later when we actually use it.

Alternate definition: Distribution shift is the mismatch between the input patterns seen during model training and those encountered during fine-tuning or inference.

Example: During BERT pretraining, inputs are with [MASK]. "The capital of France is [MASK]". During fine-tuning/real use, the same input looks without [MASK] like "The capital of France is Paris."

Why masking of tokens help in solving the distribution shift?

By including unmasked tokens and random tokens mixed in with [MASK] tokens during pretraining, the model builds robustness to inputs without the special masking token. When fine-tuning arrives and the [MASK] token suddenly disappears, the model has already learned patterns that apply to token-level inputs that aren't artificially masked. This softens the domain gap and improves transfer learning performance.

Why masking only 15% of tokens help?

Masking fewer tokens means: 85% of tokens remain normal. Sentence structure is mostly realistic. [MASK] tokens are rare, not dominant. So the training distribution stays close to the fine-tuning distribution.

Why other options are INCORRECT?

Option A: INCORRECT. Masking more or fewer tokens doesn’t meaningfully change training time.

Option B: INCORRECT. Actually, masking more tokens would make copying harder. And, this doesn’t explain why only 15%.

Option D: INCORRECT. Hardness is not the goal; representation quality and transferability is.

3.
Why do GPT-style decoder-only models scale better for text generation than encoder–decoder models?






Correct Answer: C

Encoder–decoder models are great for input to output transformation (e.g., translation, summarization). Whereas, GPT-style decoder-only models are ideal for pure text generation. As scale increases, simplicity and training–inference alignment combo wins. That’s why large-scale language generation today is dominated by GPT-style architectures.

GPT-style models are decoder-only and autoregressive.

GPT-style models are decoder-only and autoregressive. That means they are trained to do one simple thing: Given the previous tokens, predict the next token. This is exactly the same thing they do at inference time when generating text.

  • During training: Predict next token using only past tokens (causal / left-to-right attention).
  • During inference: Predict next token using only past tokens.

No mismatch between training and generation. This perfect alignment becomes more important as models scale to billions of parameters and massive datasets, which is why GPT-style models scale so well.

Why other options are INCORRECT?

Option A: They require fewer parameters. INCORRECT. Not true. GPT models often have more parameters than encoder–decoder models like T5. Scaling success is not about being smaller.

Option B: They avoid bidirectional attention. INCORRECT. Avoiding bidirectional attention is a constraint, not the reason for better scaling. Bidirectional attention is powerful for understanding tasks, but it doesn’t help generation.

Option D: They do not use positional embeddings. INCORRECT. They absolutely do use positional information (absolute or rotary positional embeddings). So this option is factually incorrect.

4.
What happens if positional embeddings are completely removed from a Transformer model?






Correct Answer: B

Removing positional embeddings makes a Transformer permutation-invariant, so it cannot model word order.

What are positional embeddings?

Positional embeddings are vectors added to token embeddings to encode the order of tokens in a sequence. Transformers process all tokens in parallel, so unlike RNNs or LSTMs, they have no built-in sense of order. Positional embeddings fix this.

Why they are needed (simple intuition)

Take these two sentences: “dog bites man” “man bites dog” They have the same words, but different meanings. Without positional embeddings: A Transformer sees both as the same bag of words With positional embeddings: “dog” at position 1 ≠ “dog” at position 3 Order becomes meaningful.

What happens if completely removed?

A Transformer’s self-attention mechanism, by itself, does not know word order.

  • Self-attention only looks at token embeddings and similarities between tokens.
  • It treats the input as a set, not a sequence.

If you completely remove positional embeddings: The model cannot tell whether the input is "dog bites man" or "man bites dog". Any permutation of tokens produces the same attention pattern. So the model becomes permutation-invariant (order doesn’t matter).

5.
Why do large language models often outperform BERT on commonsense reasoning tasks?






Correct Answer: C

Autoregressive LLMs outperform BERT on commonsense reasoning because they learn world knowledge and multi-step reasoning by continuously predicting future tokens.

What does commonsense reasoning require?

Commonsense reasoning often requires:

  • Temporal flow (e.g., “what happens next?”)
  • Causal reasoning (e.g., “if this happened, then what follows?”)
  • Multi-step inference across several ideas

How Large Language Models Acquire Commonsense Knowledge?

Large language models (such as GPT-style models) are typically autoregressive. This means they are trained to repeatedly answer a single core question:

“Given everything so far, what comes next?”

To perform this task accurately, the model must learn patterns that go far beyond individual words. Over time, it acquires:

  • How events usually unfold over time
  • Cause–effect relationships in the real world
  • Everyday facts and common situations
  • Multi-step reasoning and inference patterns

Across billions of prediction steps, the model implicitly accumulates commonsense knowledge and learns how to chain ideas together, which is essential for reasoning tasks.

Why BERT Struggles More with Commonsense Reasoning?

BERT follows a fundamentally different training strategy:

  • It is trained using masked language modeling, where random words are hidden and must be predicted.
  • It uses bidirectional context, but focuses on local sentence-level understanding.
  • It excels at language understanding tasks such as classification, named entity recognition (NER), and semantic similarity.
  • However, it is not trained to generate long sequences or reasoning chains.

Since BERT was not optimized for sequential prediction and reasoning, it typically underperforms autoregressive models on commonsense reasoning tasks.

6.
Which limitation of BERT makes it less suitable for tasks requiring multi-step reasoning?






Correct Answer: C

BERT is trained with masked language modeling for sentence-level understanding, not for sequential generation, making it weaker at multi-step reasoning tasks.

More explanation:


What is multi-step reasoning?

Multi-step reasoning is the ability to arrive at an answer by going through a sequence of intermediate logical steps, where each step depends on the previous one. Instead of jumping straight to the answer, the model (or person) has to chain several inferences together.

LLM Example: Multi-Step Reasoning

Question:

If all neural networks are models, and transformers are neural networks, what are transformers?

Reasoning Steps:

  1. Neural networks ⊆ models
  2. Transformers ⊆ neural networks
  3. Therefore, transformers ⊆ models

Each step builds on the previous one, illustrating how multi-step reasoning combines intermediate inferences to reach a final conclusion.

Why multi-step reasoning is crucial for language models?

Multi-step reasoning is crucial for:

  • commonsense reasoning
  • logical inference
  • causal and temporal questions etc.

Autoregressive LLMs are better at this because they generate text step by step, naturally mirroring the reasoning process.

7.
The primary benefit of using multiple attention heads in Transformers is that they:






Correct Answer: B

Multiple attention heads allow a Transformer to attend to different types of relationships between tokens simultaneously.

What multiple attention heads actually do?

In a Transformer, attention decides which other tokens a word should focus on. When we use multiple attention heads, we don’t just repeat the same attention—we let the model look at the sentence in different ways at the same time.

Multi-head attention splits the query, key, and value projections into multiple "heads," each operating in parallel on lower-dimensional subspaces of the input embeddings. This allows each head to specialize in distinct relationships—like syntactic dependencies in one head, semantic patterns in another, or positional cues in yet another—before concatenating and linearly transforming the outputs. A single head would force all relationships into one averaged attention pattern, creating an information bottleneck and limiting expressiveness.

8.
Why do LLMs with fixed context windows struggle with very long documents?






Correct Answer: B

LLMs with fixed context windows struggle with long documents because self-attention scales quadratically in compute and memory with sequence length.

What does “fixed context window” mean?

LLMs process text in chunks called context windows (for example, 2k, 8k, 32k tokens). Inside one window, every token attends to every other token using self-attention. That’s powerful — but expensive.

Why self-attention becomes a problem for long documents?

In self-attention each of n tokens compares itself with n other tokens. This creates an n × n attention matrix. So, compute cost grows as O(n2) and memory usage also grows as O(n2).

As the document gets longer:

  • GPU memory fills up quickly.
  • Computation becomes slow or infeasible.
  • The model must truncate, slide windows, or summarize instead of reading everything.

This is the core reason long documents are hard.

9.
Why can a large language model adapt to a new task using only a few examples provided in the prompt?






Correct Answer: C

Large language models (LLMs) adapt to new tasks through in-context learning, where few-shot examples in the prompt act as contextual signals that guide the model's predictions without altering its fixed parameters. The attention mechanisms process these examples alongside the input, enabling pattern recognition and task generalization during inference.

What’s Actually Happening? / What is in-context learning?

When you give a large language model (LLM) a prompt like:

"Translate English to French:dog → chien; cat → chat; house → "

The model is not learning in the usual machine learning sense. No parameters or weights inside the model are being updated.

Instead, the examples in the prompt act like temporary instructions that influence the model’s next prediction.

During pretraining, the model has learned that:

  • Patterns in the recent context matter
  • Earlier input–output pairs often define a task

As a result, the model treats the examples as conditioning signals:

  • “The task here is translation”
  • “The mapping pattern is English → French”
  • “I should continue this pattern”

This phenomenon is known as in-context learning.

10.
Which property makes Transformers theoretically capable of approximating any sequence-to-sequence function?






Correct Answer: C

Transformers are universal sequence-to-sequence approximators because self-attention enables global interaction and feed-forward networks provide nonlinear expressiveness.

Explanation:

Self-attention computes contextual mappings, allowing each position to weigh relationships across the entire input sequence dynamically. In simpler terms, self-attention decides what information to gather and from where.

Feed-forward networks (position-wise MLPs) provide non-linear value transformations, enabling approximation of arbitrary functions when stacked with attention. In simpler terms, feed-forward networks decide how to transform that information.

Together, they can represent any mapping from an input sequence to an output sequence, in theory, assuming sufficient depth, width, and data.

Why other options are INCORRECT?

Option A: Layer normalization. INCORRECT. Helps stabilize and speed up training, but does not increase representational capacity.

Option B: Residual connections. INCORRECT. Improve gradient flow and optimization; they don’t make the model more expressive.

Option D: Tokenization strategy. INCORRECT. A preprocessing choice, not a source of theoretical function-approximation power.

Sunday, January 25, 2026

Shallow Parsing in NLP – Top 10 MCQs with Answers (Chunking)

✔ Scroll down and test yourself — answers are hidden under the “View Answer” button.

☰ Quick Links - Browse Related MCQs
🚨 Quiz Instructions:
Attempt all questions first.
✔️ Click SUBMIT at the end to unlock VIEW ANSWER buttons.
Quiz Mode:

Introduction

Shallow parsing, also known as chunking, is a foundational technique in Natural Language Processing (NLP) that focuses on identifying flat, non-recursive phrase structures such as noun phrases, verb phrases, and prepositional phrases from POS-tagged text. Unlike deep parsing, which attempts to build complete syntactic trees, shallow parsing prioritizes efficiency, robustness, and scalability, making it a preferred choice in large-scale NLP pipelines.

This MCQ set is designed to test both conceptual understanding and implementation-level knowledge of shallow parsing. The questions cover key aspects including design philosophy, chunk properties, finite-state models (FSA and FST), BIO tagging schemes, and statistical sequence labeling approaches such as Conditional Random Fields (CRFs). These questions are particularly useful for students studying NLP, Computational Linguistics, Information Retrieval, and AI, as well as for exam preparation and interview revision.

Try to reason through each question before revealing the answer to strengthen your understanding of how shallow parsing operates in theory and practice.


1.
Which statement best captures the primary design philosophy of shallow parsing?






Correct Answer: C

Shallow parsing trades depth and linguistic completeness for efficiency and robustness.

Shallow parsing (chunking) is designed to identify basic phrases like noun phrases (NP), verb phrases (VP), etc., to avoid recursion and nesting, and to keep the analysis fast, simple, and robust

Because of this design choice, shallow parsing scales well to large corpora, works better with noisy or imperfect POS tagging, and is practical for real-world NLP pipelines (IR, IE, preprocessing)

2.
Why is shallow parsing preferred over deep parsing in large-scale NLP pipelines?






Correct Answer: C

Shallow parsing is preferred over deep parsing because it is computationally faster and more robust to noise while providing sufficient structural information for many NLP tasks.

Shallow parsing is preferred over deep parsing mainly because it is faster, simpler, and more robust, especially in real-world NLP systems. Following are the reasons;

  • Computational efficiency: Shallow parsing works with local patterns over POS tags. It avoids building full syntactic trees. Much faster and uses less memory than deep parsing
  • Robustness to noisy data: Shallow parsing tolerates errors because it matches short, local tag sequences
  • Scalability: Suitable for large-scale text processing
  • Lower resource requirements: Shallow parsing can be implemented using Finite-state automata, regular expressions, and sequence labeling models (e.g., CRFs)

For more information, visit

Shallow parsing (chunking) VS Deep parsing

3.
The phrase patterns used in shallow parsing are most appropriately modeled as:






Correct Answer: B

Phrase patterns in shallow parsing are best modeled as regular expressions / regular languages because chunking is local, linear, non-recursive, and non-overlapping. All of these properties fit exactly within the expressive power of regular languages.

Why the phrase patterns used in shallow parsing are modeled as regular expressions/regular languages?

1. Shallow parsing works on POS tag sequences, not full syntax. In chunking, we usually operate on sequences like "DT JJ JJ NN VBZ DT NN" and define patterns such as "NP → DT? JJ* NN+". This is pattern matching over a flat sequence, not hierarchical structure building. That is exactly what regular expressions are designed for.

2. Chunk patterns are non-recursive. Regular languages cannot express recursion. Shallow parsing intentionally avoids recursion (No nested constituents). For example, "[NP the [NP quick brown fox]]" is not allowed in shallow parsing.

3. Chunks are non-overlapping. Each word belongs to at most one chunk. Example: "[NP the dog] [VP chased] [NP the cat]". There is no crossing or embedding like: "*[NP the dog chased] [NP the cat]". This strict linear segmentation matches the finite-state assumption. Since recursion is forbidden by design, CFG power is unnecessary.

4.
Which automaton is suitable for recognizing chunk patterns in rule-based shallow parsing over POS-tagged text?






Correct Answer: B

Why Deterministic finite state automaton (FSA) is suitable for recognizing chunk patterns in rule-based shallow parsing over POS-tagged text?

Chunk patterns in shallow parsing are regular and flat, so they can be efficiently recognized using a finite state automaton.

In rule-based shallow parsing (chunking), the goal is to recognize flat phrase patterns (such as noun phrases or verb phrases) in a linear sequence of POS tags, for example "DT JJ NN VBZ DT NN".

Chunk patterns are defined using regular expressions like "NP → DT? JJ* NN+".

Such patterns belong to the class of regular languages, which can be recognized by a finite state automaton (FSA). Therefore, a deterministic finite state automaton (FSA) is suitable for recognizing chunk patterns in rule-based shallow parsing. More powerful automata like pushdown automata or Turing machines are unnecessary because shallow parsing does not require recursion or unbounded memory.

5.
Why are finite-state transducers (FSTs) sometimes preferred over FSAs in shallow parsing?






Correct Answer: B

Finite-state transducers (FSTs) are sometimes preferred over finite-state automata (FSAs) in shallow parsing because they can both recognize patterns and produce output labels, whereas FSAs can only recognize whether a pattern matches.

In shallow parsing, the task is not just to detect that a sequence of POS tags forms a chunk, but also to label the chunk boundaries, such as assigning NP, VP, or BIO tags (B-NP, I-NP, O). An FST maps an input POS-tag sequence to an output sequence with chunk labels or brackets, making it well suited for this purpose.

Since shallow parsing involves flat, non-recursive, and local patterns, the power of finite-state models is sufficient. Using an FST adds practical usefulness by enabling annotation and transformation, while retaining the efficiency and simplicity of finite-state processing.

6.
In the BIO chunk tagging scheme, the tag B-NP indicates:






Correct Answer: B

BIO chunk tagging scheme in shallow parsing - short notes

The BIO chunk tagging scheme is a commonly used method in shallow parsing (chunking) to label phrase boundaries in a sequence of tokens.

BIO stands for:

  • B (Begin) – marks the first word of a chunk
  • I (Inside) – marks words inside the same chunk
  • O (Outside) – marks words that are not part of any chunk

Each B and I tag is usually combined with a chunk type, such as NP (noun phrase) or VP (verb phrase).

Example:

The   quick  brown  fox   jumps
B-NP  I-NP   I-NP   I-NP  B-VP

The BIO tagging scheme represents flat, non-overlapping chunks, avoids hierarchical or nested structures, and converts chunking into a sequence labeling problem. Due to its simplicity and clarity, it is widely used in rule-based, statistical, and neural-network-based shallow parsing systems.

7.
Which property must hold for chunks produced by shallow parsing?






8.
When shallow parsing is formulated as a sequence labeling problem, which probabilistic model is commonly used?






Correct Answer: C

What is Conditional Random Field (CRF)?

A CRF (Conditional Random Field) is a probabilistic, discriminative model used for sequence labeling tasks in machine learning and natural language processing.

A Conditional Random Field models the probability of a label sequence given an input sequence, i.e., P(Y | X), where X is the observation sequence and Y is the corresponding label sequence.

What CRFs are used for?

CRFs are commonly used in NLP tasks such as Shallow parsing (chunking), Named Entity Recognition (NER), Part-of-Speech tagging, Information extraction.

Why CRF is used for shallow parsing?

Conditional Random Fields (CRFs) are used for shallow parsing because shallow parsing is naturally a sequence labeling problem, and CRFs are designed to model dependencies between neighboring labels in a sequence.

9.
Shallow parsing is less sensitive to POS tagging errors than deep parsing because:






Correct Answer: C

Shallow parsing is less sensitive to POS tagging errors because it relies on local patterns and partial structure, not a full grammatical tree. So a small POS mistake usually affects only one chunk, not the whole analysis.

Deep parsing, on the other hand, tries to build a complete syntactic tree, where one wrong POS tag can break the entire parse.

Why shallow parsing is less sensitive to POS tagging errors?

Shallow parsing (chunking) groups words into flat chunks like NP (noun phrase), VP (verb phrase), etc. It uses local POS patterns.

If one POS tag is wrong, the damage is local, the chunk may still be mostly correct, and the neighboring chunks remain unaffected. Error does not propagate much.

Why deep parsing is more sensitive to POS tagging errors?

Deep parsing (full syntactic parsing) builds a hierarchical parse tree with dependencies between words. POS tags determine the Phrase boundaries, Head–dependent relations, and Overall sentence structure.

If a POS tag is wrong the parser may choose the wrong grammar rule, fail to build a valid tree, and may produce a completely incorrect parse. Error propagates through the entire tree.

Example:

In the sentence "The can rusts quickly", if the word "can" is wrongly tagged as a VERB instead of a NOUN,

  • Shallow parsing: Might still form a rough NP or VP and the error affects only one chunk.
  • Deep parsing: Subject–verb structure breaks and the whole sentence tree becomes invalid or wrong.
10.
Which of the following tasks lies just beyond the scope of shallow parsing?






Correct Answer: C

Shallow parsing cannot resolve subject-object dependencies. To resolve subject-object dependencies, it requires knowing who is the subject and who is the object, it needs syntactic relations across phrases.

In simpler terms, shallow parsing identifies flat phrase boundaries such as NP, VP, and PP, but does not determine grammatical relations like subject–object dependencies, which require deep syntactic analysis.

Monday, January 5, 2026

HMM POS Tagging MCQs (Advanced) | Viterbi, Baum-Welch & NLP Concepts

✔ Scroll down and test yourself — answers are hidden under the “View Answer” button.

☰ Quick Links - Browse Related MCQs
🚨 Quiz Instructions:
Attempt all questions first.
✔️ Click SUBMIT at the end to unlock VIEW ANSWER buttons.
20. If transitions are uniform/random, HMM POS tagger becomes:






Correct Answer: C

With uniform transitions, tagging depends only on P(word|tag), i.e., emission probabilities.

With uniform transitions, an HMM POS tagger reduces to a unigram model that tags each word independently using emission probabilities only.

Step-by-step Explanation

An HMM POS tagger assigns part-of-speech tags using two probabilities:

  1. Transition probability - P(ti | ti−1)
    → How likely a tag follows the previous tag

  2. Emission probability - P(wi | ti)
    → How likely a word is generated by a tag

During decoding using the Viterbi algorithm, the model maximizes:

P(ti | ti−1) × P(wi | ti)

What does uniform / random transitions mean?

Uniform transitions imply:

P(ti | ti−1) = constant for all tag pairs

  • Transition probabilities do not prefer any particular tag sequence
  • They contribute the same value for every possible path

Therefore, transition probabilities no longer influence the tagging decision.

What remains?

Only the emission probabilities matter:

arg maxti P(wi | ti)

This is exactly what a unigram POS tagger does:

  • Assigns each word the tag with the highest emission probability
  • Ignores contextual information entirely
21. Unknown word tagging accuracy is highest when model learns:






Correct Answer: A

This question is about how POS taggers handle unknown (out-of-vocabulary) words—words that were not seen during training.

In Part-of-Speech (POS) tagging, unknown words present a fundamental challenge—they don't appear in the training corpus, so the model cannot rely on learned word-to-tag associations. The solution lies in morphological features, particularly prefix and suffix distributions linked to grammatical categories. Morphological cues like -ly, -ness, -tion strongly correlate with POS tags.


Prefix/suffix distribution per POS

Why? Many parts of speech follow strong morphological patterns:
  • -tion, -ness → Noun
  • -ly → Adverb
  • -ing, -ed → Verb
  • un-, re-, pre- → Verbs / Adjectives
By learning which prefixes and suffixes are likely for each POS, the model can:
  • Infer the POS of new (unknown) words it has never seen
This is the most effective and widely used approach in POS tagging models such as HMMs, CRFs, and neural taggers.

Therefore, unknown word tagging accuracy is highest when the model learns prefix/suffix distributions per POS.
22. Training HMM with labeled POS corpus is:






Correct Answer: B

Both words and tags are known, so probabilities are estimated directly.

23. If only words are available (no tags), HMM must be trained using:






Correct Answer: B

Baum–Welch uses EM to estimate hidden states from unlabeled data.

This question tests your understanding of the three fundamental HMM problems and when to apply each algorithm.

This question asks about the Learning problem of three HMM problems. As per the Learning problem, we are given only the observation sequence without tags, and we need to find the model parameters with the help of Forward-Backward (Baum-Welch) algorithm. This is unsupervised learning.

24. Error propagation in Viterbi decoding is more likely when:






Correct Answer: B

A wrong but strong emission can lock Viterbi into an incorrect path.

More information:

The question is about Viterbi decoding. Viterbi decoding is used in POS tagging and other sequence labeling tasks. In these tasks, each tag depends on the previous tag.

What is error propagation?

In Viterbi decoding: The algorithm selects the best path step by step. If a wrong tag is chosen early, that wrong choice affects the next tags. As a result, more errors occur later. This spreading of mistakes is called error propagation.

Why does error propagation happen in Viterbi algorithm?

Viterbi uses dynamic programming. It keeps only one best path, not many alternatives. It depends on: Transition probabilities (from one tag to the next) and Emission probabilities (tag to word). If the model is too confident about a wrong tag, the error continues through the sentence.

Why option B is correct?

For a rare or unknown word, the model assigns: Very high probability to one tag and Very low probability to others. If that high-probability tag is wrong, Viterbi commits strongly to it and the alternative paths are discarded. As a result, future tags are forced to follow this wrong tag via transitions

25. Modern POS taggers outperform HMM mainly because:






Correct Answer: B

Neural models capture global dependencies beyond Markov assumptions.

26. High P(NN | DT) indicates:






Correct Answer: B

Determiner → noun is a common English syntactic pattern.

P(NN | DT) means, "The probability that the next tag is a Noun (NN), given that the current tag is a Determiner (DT)".

High probability indicates that Determiners are usually followed by Nouns in language data. Example: "the book", "a pen", "this idea", etc.

27. Sentence probability in an HMM is:






Correct Answer: C

HMM probability is the product over all transition and emission terms.

Sentence probability in HMM = the sum of probabilities of all possible hidden state sequences that could generate the observed sentence, where each path's probability is the product of its transition and emission probabilities.

This probabilistic framework is what makes HMMs powerful for sequence modeling in NLP and speech processing—it elegantly handles the uncertainty of hidden states while maintaining computational efficiency through dynamic programming.

28. Viterbi backpointer table stores:






Correct Answer: B

Backpointers reconstruct the optimal tag sequence.

The Viterbi backpointer table is a table that stores where each best probability came from during Viterbi decoding. In simple words, it remembers which previous state (tag) gave the best path to the current state.

Why do we need a backpointer table?

Viterbi decoding has two main steps: (1) Forward pass (Compute the best probability of reaching each state at each time step, Store these probabilities in the Viterbi table.), (2) Backtracking (Recover the best sequence of tags, For this, we must know which state we came from). The backpointer table makes backtracking possible.

Simple Viterbi Example

Sentence: "Time flies"

Possible Tags:

  • NN (Noun)
  • VB (Verb)

Viterbi Probability Table

Time NN VB
t = 1 0.3 0.7
t = 2 0.6 0.4

Backpointer Table

Time NN VB
t = 2 VB NN

Interpretation

  • Best path to NN at t = 2 came from VB at t = 1.
  • Best path to VB at t = 2 came from NN at t = 1.
29. Gaussian emission HMMs are preferred in speech tagging because:






Correct Answer: B

Acoustic signals are continuous-valued, well-modeled by Gaussians.

Fundamental Distinction: Discrete vs. Continuous Observations

The choice between discrete and Gaussian (continuous) HMM emission distributions depends entirely on the nature of the observations being modeled.

Discrete HMMs represent observations as discrete symbols from a finite alphabet—such as words in part-of-speech tagging or written text. When observations are discrete, emission probabilities are modeled as categorical distributions over symbol categories.

Continuous (Gaussian) HMMs represent observations as continuous-valued feature vectors. When observations are real-valued, discrete emission probabilities are not applicable; instead, the probability density is modeled using continuous distributions such as Gaussians or Gaussian Mixture Models (GMMs).

Why Gaussian Emission HMMs Fit Speech Data

In speech tagging or speech recognition, the observed data are acoustic features, not words.

Hidden Markov Models require an emission model to represent:

P(observation | state)

  • In text POS tagging → observations are discrete words
  • In speech tagging → observations are continuous feature vectors

Therefore, Gaussian (or Gaussian Mixture) distributions are ideal for modeling continuous acoustic data.

Gaussian-emission HMMs model:

P(xt | statet)

where xt is a continuous acoustic feature vector.

30. HMM POS tagging underperforms neural models mainly because it:






Correct Answer: B

HMMs rely on local Markov assumptions, unlike deep contextual models.

HMMs underperform because they rely on short-context Markov assumptions, while neural models capture long-range and global linguistic information.

HMM-based POS taggers rely on the Markov assumption, typically using bigram or trigram tagging. This means the POS tag at position t depends only on a very limited local context.

P(tt | tt−1)   or   P(tt | tt−1, tt−2)

In other words, Hidden Markov Models (HMMs) assume:

  • The current POS tag depends only on a limited number of previous tags (usually one in bigram HMMs, two in trigram HMMs).
  • They cannot look far ahead or far behind in a sentence.

Example:

“The book you gave me yesterday was interesting.”

To correctly tag the word “was”, the model benefits from understanding long-distance syntactic relationships. However, HMMs cannot effectively capture such long-range dependencies.

Why neural models perform better

Modern neural POS taggers such as BiLSTM, Transformer, and BERT:

  • Capture long-range dependencies across the sentence
  • Use bidirectional context (both left and right)
  • Learn character-level and subword features
  • Handle unknown and rare words more effectively
Please visit, subscribe and share 10 Minutes Lectures in Computer Science

Featured Content

Multiple choice questions in Natural Language Processing Home

MCQ in Natural Language Processing, Quiz questions with answers in NLP, Top interview questions in NLP with answers Multiple Choice Que...

All time most popular contents