Unit 5: Natural Language Processing with Sequence and Attention Models - Practice Quiz

INT344 — Natural Language Processing 50 Questions
0 Correct 0 Wrong 50 Left
0/50

1 What is the primary characteristic of a Sequence Model compared to a standard Feedforward Neural Network?

A. It takes the order of inputs into account and can handle variable-length inputs
B. It processes inputs of fixed length only
C. It assumes all inputs are independent of each other
D. It uses only Convolutional layers

2 Which of the following data types is best suited for a Sequence Model?

A. Iris flower categorization
B. Static image classification
C. Tabular housing price data
D. Sentiment analysis of movie reviews

3 In a Recurrent Neural Network (RNN), what is the function of the 'hidden state'?

A. To reset the network weights after every epoch
B. To visualize the attention weights
C. To store the final output class
D. To act as a memory that captures information about previous time steps

4 What is the phenomenon called when the gradients become extremely small during the backpropagation through time in an RNN, preventing weights from updating?

A. Overfitting
B. Vanishing Gradient
C. Gradient Clipping
D. Exploding Gradient

5 Which algorithm is typically used to train Recurrent Neural Networks?

A. K-Means Clustering
B. Random Forest
C. Standard Backpropagation
D. Backpropagation Through Time (BPTT)

6 Which activation function is most commonly used for the hidden state in a simple RNN to help regulate values?

A. Softmax
B. Tanh
C. ReLU
D. Linear

7 What is the primary architectural solution designed to solve the Vanishing Gradient problem in standard RNNs?

A. Autoencoder
B. Perceptron
C. Long Short-Term Memory (LSTM)
D. Convolutional Neural Network (CNN)

8 In an LSTM unit, which gate is responsible for deciding what information to discard from the cell state?

A. Input Gate
B. Forget Gate
C. Output Gate
D. Update Gate

9 What represents the 'long-term memory' component in an LSTM architecture?

A. Cell State (C_t)
B. Hidden State (h_t)
C. Input Gate
D. Output Gate

10 In an LSTM, what is the range of values output by the sigmoid activation function used in gates?

A. -infinity to +infinity
B. 0 to 1
C. 0 to 100
D. -1 to 1

11 Which task involves assigning a grammatical category (like Noun, Verb, Adjective) to every word in a sentence?

A. Sentiment Analysis
B. Machine Translation
C. Named Entity Recognition
D. Part-of-Speech (POS) Tagging

12 Named Entity Recognition (NER) is primarily concerned with identifying:

A. The translation of the text
B. Grammatical errors
C. Sentiment of the text
D. Real-world objects like people, organizations, and locations

13 What type of Sequence problem is POS Tagging?

A. Many-to-Many (Synced)
B. One-to-Many
C. Many-to-One
D. One-to-One

14 In the context of NER, what does the 'BIO' or 'IOB' tagging scheme stand for?

A. Beginning-Inside-Outside
B. Basic-Input-Operation
C. Backward-Inward-Onward
D. Binary-Input-Output

15 What is the core architecture used in Neural Machine Translation (NMT) before the introduction of Attention?

A. Encoder-Decoder (Seq2Seq)
B. Encoder-Only
C. Random Forest
D. Decoder-Only

16 In a traditional Seq2Seq model, what is the role of the Encoder?

A. To calculate the loss function
B. To generate the output sequence
C. To compress the input sequence into a fixed-length context vector
D. To visualize the data

17 What is the 'Context Vector' in a traditional RNN-based Encoder-Decoder model?

A. The weights of the output layer
B. The average of all input vectors
C. The first hidden state of the encoder
D. The last hidden state of the encoder

18 Which of the following is a major bottleneck of the traditional Seq2Seq model?

A. Performance degrades significantly for long sentences due to the fixed-length context vector
B. It can only translate into English
C. It requires too much RAM
D. It cannot handle numeric data

19 What is 'Teacher Forcing' in the context of training sequence models?

A. Using the actual ground truth output from the previous time step as input for the current step during training
B. Using the model's predicted output as input for the next step during training
C. Manually setting the weights of the network
D. Forcing the model to stop training early

20 Which search strategy explores multiple possible output sequences simultaneously to find the most likely translation?

A. Greedy Search
B. Binary Search
C. Beam Search
D. Linear Search

21 The Attention Mechanism was primarily introduced to solve which problem?

A. The inability of RNNs to process images
B. Slow training of Linear Regression
C. Overfitting in CNNs
D. The information bottleneck of the fixed-length context vector in NMT

22 How does the Attention Mechanism calculate the context vector for each time step in the decoder?

A. By randomly selecting an encoder state
B. By computing a weighted sum of all encoder hidden states
C. By taking the last state of the encoder only
D. By averaging all input words

23 In Attention, what do the 'alignment scores' (or attention weights) represent?

A. How relevant a specific input word is to the word currently being generated
B. The number of hidden layers
C. The magnitude of the gradient
D. The error rate of the model

24 What mathematical function is typically applied to alignment scores to convert them into probabilities that sum to 1?

A. Tanh
B. Softmax
C. ReLU
D. Sigmoid

25 In the context of RNNs, what is 'Backpropagation Through Time' (BPTT)?

A. A method to predict future stock prices
B. Unfolding the RNN across time steps and applying backpropagation
C. Using future data to predict past data
D. Training the network in reverse order

26 Which of the following is NOT a gate in a standard LSTM?

A. Forget Gate
B. Attention Gate
C. Output Gate
D. Input Gate

27 What is the shape of the input data for a basic RNN layer in Keras/TensorFlow?

A. (Batch Size, Features)
B. (Features, Labels)
C. (Batch Size, Timesteps, Features)
D. (Timesteps, Batch Size)

28 Why are Bidirectional RNNs (BiRNNs) useful?

A. They use fewer parameters
B. They eliminate the need for backpropagation
C. They train faster than standard RNNs
D. They allow the network to have context from both the past and the future

29 In a Many-to-One sequence model (e.g., Sentiment Analysis), where is the output typically taken?

A. Randomly sampled
B. At every time step
C. At the first time step
D. At the last time step

30 What does the 'candidate cell state' in an LSTM do?

A. It proposes new values that could be added to the state
B. It outputs the final prediction
C. It clears the memory
D. It decides what to forget

31 Which issue leads to the 'Exploding Gradient' problem?

A. Gradients > 1 accumulating multiplicatively
B. Weights initialized to zero
C. Learning rate being too low
D. Gradients < 1 accumulating multiplicatively

32 A solution to the Exploding Gradient problem is:

A. Gradient Clipping
B. Increasing the learning rate
C. Removing the hidden layer
D. Using ReLU

33 In an Attention model, the vector c_t is often referred to as:

A. The Noise Vector
B. The Context Vector
C. The Bias Vector
D. The Forget Vector

34 Sequence-to-Sequence models are most commonly associated with:

A. Image Segmentation
B. Text Summarization
C. Linear Regression
D. Cluster Analysis

35 What is 'Global Attention'?

A. Attention that considers all hidden states of the encoder
B. Attention that considers only a window of hidden states
C. Attention applied to a single word
D. Attention applied without weights

36 Which of the following describes 'Greedy Decoding'?

A. Choosing the word with the highest probability at each step immediately
B. Waiting until the end to choose words
C. Choosing a random word based on distribution
D. Considering all possible future sequences

37 In POS tagging, if a word is ambiguous (e.g., 'book' can be a noun or verb), how does an RNN resolve it?

A. It always picks the most common usage
B. It uses the context provided by surrounding words stored in the hidden state
C. It flips a coin
D. It cannot resolve ambiguity

38 What is the typical loss function for a multi-class classification problem like POS Tagging or NMT?

A. Categorical Cross-Entropy
B. Absolute Error
C. Mean Squared Error (MSE)
D. Hinge Loss

39 What does GRU stand for?

A. General Regression Unit
B. Gradient Rectified Unit
C. Gated Recurrent Unit
D. Global Recurrent Update

40 The 'Input Gate' in an LSTM is usually controlled by which activation function?

A. Sigmoid
B. ReLU
C. Linear
D. Tanh

41 What visual tool is often used to interpret what an Attention model has learned?

A. Pie Chart
B. Histogram
C. Attention Heatmap
D. Scatter Plot

42 Which limitation of RNNs prevents parallelization during training?

A. Sequential dependency of the hidden state
B. Use of sigmoid functions
C. Complex loss functions
D. Large memory footprint

43 In a sequence model, 'padding' is used to:

A. Increase the learning rate
B. Make all sequences in a batch the same length
C. Remove stopwords
D. Add noise to the data

44 Which of these is a 'many-to-one' application of sequence models?

A. Video Captioning
B. Machine Translation
C. Sentiment Classification
D. Music Generation

45 In an NER task, identifying 'Apple' as an Organization rather than a Fruit relies on:

A. The spelling of the word
B. The length of the word
C. The capitalization
D. The contextual information in the sequence

46 Why is the traditional Encoder-Decoder model often described as having 'amnesia'?

A. It uses a forget gate
B. It cannot learn new words
C. It struggles to retain information from the beginning of a long sequence at the decoding stage
D. It forgets the weights after training

47 In the attention equation score(h_t, h_s), what are h_t and h_s?

A. Input and Output Gates
B. Learning rate and Loss
C. Decoder hidden state and Encoder hidden state
D. Weight and Bias

48 Which mechanism allows a model to focus on 'local' parts of the input sequence based on the current decoding step?

A. Attention Mechanism
B. Dropout
C. Max Pooling
D. Batch Normalization

49 In sequence labeling, what does the output layer usually consist of?

A. A clustering algorithm
B. A Softmax layer over the tag set for each time step
C. A single neuron
D. A linear regression layer

50 Which of the following best describes the 'Seq2Seq' mapping?

A. Fixed Input Size -> Fixed Output Size
B. Variable Input Size -> Variable Output Size
C. Variable Input Size -> Fixed Output Size
D. Fixed Input Size -> Variable Output Size