uiz Space

January 2025 term · Introduction to Natural Language Processing · BSDA5005

Introduction to Natural Language Processing End Term: 13 April 2025 (January 2025 term)

The IIT Madras BS Introduction to Natural Language Processing (Intro to NLP) End Term paper sat on 13 Apr 2025, in the January 2025 term: 25 questions for 100 marks in 180 minutes. Every question is below with its answer. Take it as a timed mock test to be marked, or read it through first.

Questions
25
Marks
100
Duration
180 min
MCQ
10
MSQ
9
Numerical
6

Updated

Official paper: IIT M FOUNDATION AN EXAM QDF3 13 Apr 2025 · No negative marking.

Question 1

+3 marksOne correct option

Why might accuracy be a misleading metric for evaluating POS tagging systems in cases of class imbalance?

  1. A

    Because accuracy does not account for the number of true negatives.

  2. B

    Because accuracy gives equal weight to all classes, even if some tags are much rarer than others.

  3. C

    Because accuracy only measures the precision of the system, ignoring recall.

  4. D

    Because accuracy is not affected by the number of false positives and false negatives.

Show answer

Correct answer

  • B

    Because accuracy gives equal weight to all classes, even if some tags are much rarer than others.

Question 2

+3 marksOne correct option

In stochastic POS tagging, why is it necessary to calculate both individual word probabilities and tag sequence probabilities?

  1. A

    Individual word probabilities are sufficient for accurate tagging, and tag sequence probabilities are redundant.

  2. B

    Individual word probabilities are only used for rare words, while tag sequence probabilities are used for common words.

  3. C

    Tag sequence probabilities help in determining the most likely sequence of tags, while individual word probabilities provide local context.

  4. D

    Both probabilities are used to reduce the computational complexity of the tagging process.

Show answer

Correct answer

  • C

    Tag sequence probabilities help in determining the most likely sequence of tags, while individual word probabilities provide local context.

Question 3

+3 marksOne correct option

How does Retrieval-Augmented Generation (RAG) differ from standard parametric models like GPT-3?

  1. A

    RAG eliminates the need for transformer-based token generation.

  2. B

    RAG uses retrieval but does not update its knowledge dynamically over time.

  3. C

    RAG only works when trained on labeled question-answer datasets.

  4. D

    RAG retrieves external documents dynamically, reducing reliance on pre- trained knowledge.

Show answer

Correct answer

  • D

    RAG retrieves external documents dynamically, reducing reliance on pre- trained knowledge.

Question 4

+3 marksOne correct option

Which of the following architectures is most commonly used as the generator in RAG models?

  1. A

    GPT-3

  2. B

    BART

  3. C

    BERT

  4. D

    RoBERTa

Show answer

Correct answer

  • B

    BART

Question 5

+3 marksOne correct option

A company wants to optimize an LLM for programming tasks. Which approach is the most efficient if they have limited labeled data?

  1. A

    Train a new model from scratch using a large programming dataset.

  2. B

    Fine-tune a transformer model with instruction tuning.

  3. C

    Use Few-shot prompting with an existing LLM.

  4. D

    Apply a BERT-based model instead of transformers.

Show answer

Correct answer

  • C

    Use Few-shot prompting with an existing LLM.

Question 6

+3 marksOne correct option

Which of the following statements about Attention Flow in Transformer models is TRUE?

  1. A

    Attention flow computes the contribution of each token independently without considering other tokens.

  2. B

    Attention flow assigns higher scores to tokens that appear earlier in the sequence by default.

  3. C

    Attention flow combines attention scores across multiple layers to determine overall token influence.

  4. D

    Attention flow values are always normalized across all tokens in the sequence to sum to 1.

Show answer

Correct answer

  • C

    Attention flow combines attention scores across multiple layers to determine overall token influence.

Question 7

+3 marksOne correct option

Which of the following scenarios represents an ethical concern with LLM deployment?

  1. A

    A summarization model shortening news articles while maintaining factual accuracy.

  2. B

    A question-answering system providing different answers for different demographics when asked about salary negotiations.

  3. C

    A chatbot refusing to generate offensive or harmful content.

  4. D

    A translation model translating medical terms with higher accuracy than general terms.

Show answer

Correct answer

  • B

    A question-answering system providing different answers for different demographics when asked about salary negotiations.

Question 8

+4 marksOne correct option

How does an LSTM differ from a standard RNN in terms of remembering information?

  1. A

    It uses a larger hidden state.

  2. B

    It stores all past hidden states explicitly.

  3. C

    It introduces gates to control the flow of information.

  4. D

    It completely replaces hidden states with attention mechanisms.

Show answer

Correct answer

  • C

    It introduces gates to control the flow of information.

Question 9

+5 marksOne correct option

In the context of speculative decoding, a draft model predicts three tokens: "a", "quick", "fox". The main model assigns probabilities 0.8, 0.6, and 0.8 respectively.The draft model's probabilities for these words were 0.7, 0.9, and 0.9.
Which tokens are most likely to be accepted?

  1. A

    All three tokens

  2. B

    Only "a" and "fox"

  3. C

    Only "a"

  4. D

    None of the tokens

Show answer

Correct answer

  • B

    Only "a" and "fox"

Question 10

+5 marksOne correct option

Consider the following attention matrices for two layers (corresponding to tokens 1 and 2) in a transformer model:
Layer 1 Attention Matrix:

Layer 2 Attention Matrix:

What is the total attention from token 2 to token 1 after performing attention rollout?

  1. A

    0.57

  2. B

    0.33

  3. C

    0.39

  4. D

    0.26

Show answer

Correct answer

  • D

    0.26

Question 11

+6 marksOne or more correct options

Which of the following sentences contain pragmatic ambiguity due to potential sarcasm or irony?

Select all that apply.

  1. A

    "Wow, another Monday! Just what I needed."

  2. B

    "The meeting was only three hours long. So productive!"

  3. C

    "I love spending hours in traffic. It’s my favorite part of the day."

  4. D

    "The weather is perfect for a picnic today."

  5. E

    "She always arrives on time, unlike some people."

Show answer

Correct answers

  • A

    "Wow, another Monday! Just what I needed."

  • B

    "The meeting was only three hours long. So productive!"

  • C

    "I love spending hours in traffic. It’s my favorite part of the day."

Question 12

+4 marksOne or more correct options

Which of the following statements correctly describe how BERT differs from GPT and standard transformer models?

Select all that apply.

  1. A

    BERT is a bidirectional model, while GPT is autoregressive.

  2. B

    BERT uses masked language modeling (MLM), while GPT uses causal language modeling (CLM).

  3. C

    Standard transformers use encoder-only architectures, whereas BERT and GPT both use decoder-only architectures.

  4. D

    BERT is trained for sentence embeddings, while GPT is trained for next-token prediction.

Show answer

Correct answers

  • A

    BERT is a bidirectional model, while GPT is autoregressive.

  • B

    BERT uses masked language modeling (MLM), while GPT uses causal language modeling (CLM).

  • D

    BERT is trained for sentence embeddings, while GPT is trained for next-token prediction.

Question 13

+4 marksOne or more correct options

Which of the following statements is/are incorrect regarding Reinforcement Learning from Human Feedback (RLHF), Supervised Instruction Fine-Tuning, LoRA, and QLoRA?

Select all that apply.

  1. A

    RLHF helps improve model behavior by learning from human preference rankings.

  2. B

    LoRA (Low-Rank Adaptation) reduces the number of trainable parameters by using low-rank matrices.

  3. C

    Supervised Instruction Fine-Tuning involves reinforcement learning for generating human-like responses.

  4. D

    QLoRA applies quantization to reduce memory consumption during fine- tuning.

Show answer

Correct answer

  • C

    Supervised Instruction Fine-Tuning involves reinforcement learning for generating human-like responses.

Question 14

+4 marksOne or more correct options

During sequence-to-sequence model training, which of the following statements is/are correct regarding Teacher Forcing and Student Forcing?

Select all that apply.

  1. A

    Teacher Forcing is used during inference, while Student Forcing is used during training.

  2. B

    Teacher Forcing provides the correct previous output as input during training, whereas Student Forcing generates outputs based on its own previous predictions.

  3. C

    Student Forcing helps the model converge faster than Teacher Forcing.

  4. D

    Teacher Forcing is mainly used in reinforcement learning settings.

Show answer

Correct answer

  • B

    Teacher Forcing provides the correct previous output as input during training, whereas Student Forcing generates outputs based on its own previous predictions.

Question 15

+4 marksOne or more correct options

Which of the following statements about beam search is/are incorrect ?

Select all that apply.

  1. A

    Beam search balances exploration and exploitation by considering multiple sequences at each step.

  2. B

    A larger beam width increases computational cost but improves search quality.

  3. C

    Greedy search is equivalent to beam search with beam size B = 1.

  4. D

    Unlike greedy search, beam search guarantees finding the globally optimal sequence.

Show answer

Correct answer

  • D

    Unlike greedy search, beam search guarantees finding the globally optimal sequence.

Question 16

+4 marksOne or more correct options

Which components are essential in a RAG pipeline?

Select all that apply.

  1. A

    retriever model (e.g., DPR) that fetches relevant documents.

  2. B

    decoder-only transformer for sequence generation.

  3. C

    BM25-based sparse retrieval method as the primary retriever.

  4. D

    BERT-based query encoder for document ranking.

Show answer

Correct answers

  • A

    retriever model (e.g., DPR) that fetches relevant documents.

  • D

    BERT-based query encoder for document ranking.

Question 17

+4 marksOne or more correct options

Which of the following are the examples of unintended bias in an NLP model?

Select all that apply.

  1. A

    A sentiment analysis model rating all political tweets as "negative".

  2. B

    A chatbot trained specifically for medical consultations failing on legal queries.

  3. C

    A text summarization model producing longer summaries for academic papers.

  4. D

    A machine translation system translating "doctor" to "he" and "nurse" to "she" in a gender-neutral language.

Show answer

Correct answers

  • A

    A sentiment analysis model rating all political tweets as "negative".

  • D

    A machine translation system translating "doctor" to "he" and "nurse" to "she" in a gender-neutral language.

Question 18

+4 marksOne or more correct options

Which of the following factors contribute to bias amplification in NLP models?

Select all that apply.

  1. A

    Reinforcement learning from biased human feedback.

  2. B

    Training on unbalanced datasets where stereotypes exist.

  3. C

    Applying debiasing techniques such as zeroing out gender-related word embeddings.

  4. D

    Using a larger model size to improve performance.

Show answer

Correct answers

  • A

    Reinforcement learning from biased human feedback.

  • B

    Training on unbalanced datasets where stereotypes exist.

Question 19

+5 marksOne or more correct options

Select all that apply.

  1. A

    The probability of "apple" increases further.

  2. B

    The probabilities of "banana" and "cherry" become closer to "apple".

  3. C

    The probabilities remain unchanged.

  4. D

    The model always picks "banana".

  5. E

    The model always picks "cherry".

Show answer

Correct answer

  • A

    The probability of "apple" increases further.

Question 20

+4 marksNumerical answer

In a transition-based parser using SHIFT, LEFTARC, and RIGHTARC operations, what is the minimum number of operations needed to parse the sentence "I love coding" (excluding the ROOT node)?

Show answer

Correct answer: 4

Question 21

+4 marksNumerical answer

A TF-IDF model is applied to a document corpus of 50,000 documents. The term "optimization" appears in 750 documents. In a specific document, "optimization" appears 8 times, and the total number of words in that document is 1200. Using log base 10 ( log10), compute the TF-IDF score for "optimization" in this document. Enter your answer correct to three decimal places.

Show answer

Correct answer: 0.015 (accepted within ±0.005)

Question 22

+4 marksNumerical answer

A beam search with beam width = 4 and vocabulary size = 8 is run for 3 decoding steps. How many sequences will remain at the end of 3 steps after pruning?

Show answer

Correct answer: 4

Question 23

+4 marksNumerical answer

A transformer-based Retrieval-Augmented Generation (RAG) system retrieves the top-10 most relevant passages, where each passage contains 512 tokens. However, a portion of the model's 4096-token context length is reserved for the input query and special tokens (e.g., separators, instructions). If the model reserves 1024 tokens for the input query, how many full retrieved passages can fit within the remaining context window?

Show answer

Correct answer: 6

Question 24

+4 marksNumerical answer

Consider the following regression model:
F(x) = 500 * Age + 1000 * Income + 20000
For an input with:
Age = 30
Income = 50
Baseline Input:
Age = 0
Income = 0
What is the Integrated Gradient for the feature Income?

Show answer

Correct answer: 50000

Question 25

+6 marksNumerical answer

An e-commerce company predicts the total sales (in dollars) based on 3 key features:

  • Discount (e.g., 10%, 20%)
  • Social Media Ads (Yes/No)
  • Email Campaigns (Yes/No)

Following are the predicted sales:

Feature CombinationPredicted Sales (in dollars)
No features (baseline)200
Only "Discount"300
Only "Social Media Ads"280
Only "Email Campaigns"250
"Discount" + "Social Media Ads"450
"Discount" + "Email Campaigns"400
"Social Media Ads" + "Email Campaigns"370
"Discount" + "Social Media Ads" + "Email Campaigns"600

What is the Shapley value of the "Discount" feature?

Show answer

Correct answer: 162.5 (accepted within ±0.5)