Question 1
What are the examples of a free morpheme?
“sleep” in “sleeping”
“un-” in “undo”
“book” in “booked”
“-s” in “books”
The IIT Madras BS Introduction to Natural Language Processing (Intro to NLP) End Term paper sat on 22 Dec 2024, in the September 2024 term: 28 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.
What are the examples of a free morpheme?
“sleep” in “sleeping”
“un-” in “undo”
“book” in “booked”
“-s” in “books”
Correct answers
“sleep” in “sleeping”
“book” in “booked”
Which of the following are challenges in applying Shapley values for model explainability?
Computing Shapley values requires evaluating an exponential number of feature coalitions.
Shapley values assume independence between features, which may not hold in real-world data.
Shapley values are computationally efficient for deep neural networks.
Shapley values provide additive explanations, ensuring the contributions of all features sum up to the model's output.
Correct answers
Computing Shapley values requires evaluating an exponential number of feature coalitions.
Shapley values assume independence between features, which may not hold in real-world data.
Correct answer: 0.815 (accepted within ±0.015)
Correct answer: 0.036 (accepted within ±0.01)
Correct answer: 99.5 (accepted within ±0.5)
Consider top-k sampling with as the decoding strategy for a large language model. For the context "I want to become a", the probabilities output by the model over all the words in the vocabulary are extracted and sorted in descending order. The top four words and their associated probabilities are given below:
If a word is sampled at this stage, what is the probability with which the model outputs "lawyer"?
Correct answer: 0.375 (accepted within ±0.005)
In a transformer model, attention rollout is used to compute the contribution of input tokens to the final output. Consider a model with 3 layers and an input sequence of 4 tokens . The attention scores for each token in each layer are:
The initial contributions for each token are equal:
Using attention rollout, compute the final contribution of token to the model's output. Enter your answer correct to three decimal points.
Correct answer: 0.006 (accepted within ±0.004)
FastText is a word embedding model that extends Word2Vec by considering subword information through character n-grams (e.g., bi-grams, tri-grams). Which of the following statements about FastText's behavior and capabilities are true?
FastText can generate embeddings for unseen words by summing the embeddings of their subword n-grams.
FastText considers only complete words and does not split them into subword n-grams.
FastText embeddings for morphologically similar words (e.g., "run" and "running") will be highly similar because they share many n-grams.
FastText cannot distinguish between semantically unrelated words like "mouse" and "house" because they share common n-grams(e.g., "ouse").
Correct answers
FastText can generate embeddings for unseen words by summing the embeddings of their subword n-grams.
FastText embeddings for morphologically similar words (e.g., "run" and "running") will be highly similar because they share many n-grams.
FastText cannot distinguish between semantically unrelated words like "mouse" and "house" because they share common n-grams(e.g., "ouse").
The Direct Preference Optimization (DPO) loss function is given as:
where,
Which of the following statements about the terms in the DPO loss function are correct?
Correct answers
Which of the following are suitable choices for an autoregressive language model with the primary objective of using it to generate text based on a given prompt?
(1) Vanilla RNN
(2) Bidirectional RNN
Only (1)
Only (2)
Both (1) and (2)
Correct answer
Only (1)
The model will completely ignore the future tokens during training.
The model will stop attending to any tokens in the sequence.
The model will incorrectly attend to future tokens, leading to information leakage and breaking the causality constraint.
The softmax function will fail to compute attention scores for any position.
Correct answer
The model will incorrectly attend to future tokens, leading to information leakage and breaking the causality constraint.
What will be the 0th element in the positional encoding for a word at position 10000 in models with dimensions 512 and 1024, respectively?
Correct answer
Which of the following approaches would be the best fit for these specific use cases? 1. A system that retrieves the latest financial data to provide investment advice.
2. Optimizing a general-purpose model for sentiment analysis on product reviews.
3. Generating concise summaries from a pre-trained model with a carefully worded input. 4. Using a general-purpose language model without any modifications.
RAG, Fine-tuning, Prompt engineering, Pre-trained model
Prompt engineering, RAG, Fine-tuning, Pre-trained model
RAG, Prompt engineering, Fine-tuning, Pre-trained model
Fine-tuning, RAG, Prompt engineering, Pre-trained model
Correct answer
RAG, Fine-tuning, Prompt engineering, Pre-trained model
What are the inputs and outputs of the query encoder and passage encoder in the Dense Passage Retriever (DPR)?
Correct answer
Few-shot prompting
Chain-of-thought prompting
Zero-shot prompting
Instruction prompting
Correct answer
Instruction prompting
A-4, B-3, C-1, D-2
A-2, B-3, C-1, D-4
A-2, B-4, C-3, D-1
A-1, B-3, C-2, D-4
Correct answer
A-2, B-3, C-1, D-4
Correct answer
Based on the above data, answer the given subquestions.
Which of the following is the embedding matrix?
Correct answer
Based on the above data, answer the given subquestions.
Which of the following is the matrix corresponding to the feedforward connections between the embedding layer and the hidden layer?
Correct answer
Based on the above data, answer the given subquestions.
Which of the following are true?
Correct answers
Based on the above data, answer the given subquestions.
Correct answer: 4800
Part of speech tagging
Named entity recognition
Machine translation
Sentiment analysis
Correct answer
Sentiment analysis
Consider an encoder-decoder transformer used for story generation. If we use exhaustive search to generate tokens for 20 time steps for a story generation task given a vocabulary of size 5,000 , what is the size of the search space?
Correct answer
A decoder-only transformer-based language model is used to generate text based on some prompt. The language model is prompted ten times with the same prompt. It produces the same response all ten times. Each run is to be treated independently without any memory of the previous runs. Which of the following could be the most likely decoding strategy used?
Beam search with beam width of 4
Top-k sampling
Nucleus sampling
Greedy sampling
Correct answer
Greedy sampling
In the context of bias mitigation techniques, loss function modification would fall under which of the following categories?
Pre-processing mitigation
In-training mitigation
Intra-processing mitigation
Post-processing mitigation
Correct answer
In-training mitigation
Correct answer: 3
Which of the following techniques can be used to explain the predictions of a deep learning model by attributing the importance of each feature?
Shapley Values
Integrated Gradients
Principal Component Analysis
Attention Mechanisms
Correct answers
Shapley Values
Integrated Gradients
Attention Mechanisms
Why is calculating Shapley values computationally expensive for models with a large number of features?
It requires retraining the model for every subset of features.
It depends on the dataset size, which scales quadratically.
It evaluates the contribution of all possible feature subsets, which grows exponentially.
It computes gradients for every input sample.
Correct answer
It evaluates the contribution of all possible feature subsets, which grows exponentially.