Unit 3: Deep Learning Sequence Models for NLP - Practice Quiz

CSE472 — Deep Learning For Natural Language Processing 60 Questions
0 Correct 0 Wrong 60 Left
0/60

1 Why is text commonly treated as sequential data?

Sequential text data Easy
A. Word order affects meaning
B. Word length affects meaning
C. Page width affects meaning
D. Font size affects meaning

2 What is a token in a text sequence?

Sequential text data Easy
A. A metric such as recall
B. A layer such as dropout
C. A device such as a GPU
D. A unit such as a word

3 What allows a recurrent neural network to use information from earlier time steps?

Recurrent neural networks Easy
A. Its batch size
B. Its vocabulary size
C. Its hidden state
D. Its output label

4 Which type of input is an RNN especially designed to process?

Recurrent neural networks Easy
A. Static lookup keys
B. Ordered sequence data
C. Independent color values
D. Unrelated table rows

5 What is the main purpose of an LSTM network?

Long short-term memory networks Easy
A. Converting text into images
B. Removing all hidden states
C. Sorting tokens alphabetically
D. Learning long-term dependencies

6 Which LSTM component decides what information should be removed from the cell state?

Long short-term memory networks Easy
A. Output gate
B. Input gate
C. Hidden layer
D. Forget gate

7 Which two gates are commonly used in a GRU?

Gated recurrent units Easy
A. Input and output gates
B. Forget and output gates
C. Update and reset gates
D. Pooling and dropout gates

8 How does a GRU generally compare with an LSTM?

Gated recurrent units Easy
A. It has a simpler structure
B. It requires image inputs
C. It has no hidden state
D. It processes only one token

9 How does a bidirectional RNN process a sequence?

Bidirectional RNNs Easy
A. In random token order
B. In forward direction only
C. In alphabetical token order
D. In forward and backward directions

10 What is a key benefit of a bidirectional RNN for text processing?

Bidirectional RNNs Easy
A. It uses context from both sides
B. It guarantees perfect predictions
C. It removes the need for tokens
D. It avoids all model training

11 Which task is a common application of sequence modeling?

Sequence modeling applications Easy
A. Machine translation
B. Image resizing
C. Table sorting
D. File compression

12 In next-word prediction, what does a sequence model predict?

Sequence modeling applications Easy
A. The training device
B. The document font
C. The screen resolution
D. The following word

13 What does sentiment classification usually identify in a text?

Sentiment classification Easy
A. The selected font
B. The file format
C. The paragraph width
D. The expressed opinion

14 Which label would a basic sentiment classifier most likely assign to the review "I loved this movie"?

Sentiment classification Easy
A. Neutral
B. Negative
C. Positive
D. Unrelated

15 What is the goal of text classification?

Text classification Easy
A. Assigning labels to text
B. Changing text font styles
C. Increasing document margins
D. Sorting words by length

16 Which task is an example of text classification?

Text classification Easy
A. Detecting spam emails
B. Cropping profile images
C. Adjusting screen brightness
D. Compressing audio files

17 What is padding used for when training sequence models in batches?

Sequence training techniques Easy
A. Making vocabulary entries unique
B. Making class labels continuous
C. Making sequence lengths equal
D. Making model layers identical

18 What is supplied as the next decoder input during teacher forcing?

Teacher forcing Easy
A. The current evaluation score
B. The predicted future token
C. The final hidden layer
D. The correct previous token

19 What does truncated backpropagation through time limit during training?

Truncated backpropagation through time Easy
A. The number of unrolled steps
B. The number of evaluation labels
C. The number of output classes
D. The number of vocabulary words

20 Which metric measures the proportion of predicted positive cases that are actually positive?

Evaluation metrics for sequence tasks Easy
A. Precision
B. Accuracy
C. Recall
D. Perplexity

21 Why is word order important when representing a sentence for a sequence model?

Sequential text data Medium
A. It makes the sequence independent of its surrounding context.
B. It removes the need for a vocabulary or tokenizer.
C. It guarantees that every word receives the same vector.
D. It determines how meanings are composed across positions.

22 At time step , which information is typically used by a vanilla RNN to compute its hidden state?

Recurrent neural networks Medium
A. Only the current input vector
B. The next hidden state and current output
C. All future inputs in the sequence
D. The previous hidden state and current input

23 An RNN performs well on short sequences but loses information from the beginning of very long sequences. Which problem most directly explains this behavior?

Recurrent neural networks Medium
A. Incorrect token ordering
B. Excessive vocabulary size
C. Insufficient output classes
D. Vanishing gradients during training

24 What is the main purpose of the forget gate in an LSTM?

Long short-term memory networks Medium
A. To convert every input token into a label
B. To normalize all hidden-state values
C. To select which cell-state information to discard
D. To reverse the order of the input sequence

25 For a sentiment classifier, why might an LSTM outperform a vanilla RNN when a sentiment cue appears far earlier than the final classification decision?

Long short-term memory networks Medium
A. It ignores neutral words before making a prediction.
B. It always requires fewer parameters than a vanilla RNN.
C. It can preserve relevant information through gated memory.
D. It converts sentiment directly from the first token.

26 Which statement best describes a key difference between a GRU and an LSTM?

Gated recurrent units Medium
A. A GRU always uses bidirectional information during training.
B. A GRU cannot process sequences with variable lengths.
C. A GRU replaces recurrent connections with convolutional filters.
D. A GRU uses gates but does not maintain a separate cell state.

27 A GRU's update gate tends to remain highly open for a time step. What behavior does this usually encourage?

Gated recurrent units Medium
A. Preventing the current input from being processed
B. Producing an output without using any hidden state
C. Retaining more of the previous state
D. Discarding the entire previous state

28 Why is a bidirectional RNN useful for named-entity recognition in a completed sentence?

Bidirectional RNNs Medium
A. It can use context from both earlier and later words.
B. It guarantees correct recognition of every entity.
C. It eliminates the need for token-level annotations.
D. It processes only the first half of each sentence.

29 Which limitation should be considered when using a bidirectional RNN for real-time speech transcription?

Bidirectional RNNs Medium
A. It requires the sequence to contain exactly two words.
B. It can only classify complete documents after padding.
C. It generally needs future context before finalizing predictions.
D. It cannot represent information from previous time steps.

30 Which task is most naturally modeled as sequence-to-sequence learning?

Sequence modeling applications Medium
A. Classifying an image by its dominant color
B. Machine translation
C. Predicting a single value from a fixed table
D. Counting the number of files in a directory

31 In sequence labeling, how does the model output usually differ from document classification?

Sequence modeling applications Medium
A. It produces a label for each relevant time step.
B. It produces no output until the vocabulary is rebuilt.
C. It assigns labels only to tokens appearing twice.
D. It produces exactly one label for the entire document.

32 A review says, "The camera is small, but the battery life is excellent." What is the main challenge in assigning an overall sentiment label?

Sentiment classification Medium
A. The text contains aspect-specific sentiments.
B. The model must treat every adjective as negative.
C. The review contains too few tokens for classification.
D. The sentence has no meaningful sequence structure.

33 Why can a recurrent model be preferable to a bag-of-words classifier for detecting whether a message is a question?

Text classification Medium
A. It can represent word order and local context.
B. It automatically translates the message into another language.
C. It avoids learning parameters from labeled examples.
D. It assigns every word a unique sentiment score.

34 A dataset has 95% negative examples and 5% positive examples. Which evaluation choice gives the clearest view of positive-class performance?

Text classification Medium
A. Training loss alone, because it directly measures deployment quality
B. Accuracy alone, because it weights both classes equally
C. The number of tokens processed per second during inference
D. Precision, recall, and the F1-score for the positive class

35 Why are padding masks used when training on a batch of variable-length sequences?

Sequence training techniques Medium
A. To increase the number of meaningful tokens in each sequence.
B. To force every sequence to have a different vocabulary.
C. To prevent padding positions from affecting loss or attention.
D. To replace unknown words with labels from the next batch.

36 A sequence model overfits its training set while achieving much worse validation performance. Which technique is a reasonable response?

Sequence training techniques Medium
A. Increase the number of training epochs without monitoring validation loss.
B. Apply dropout or recurrent regularization.
C. Remove validation data so the model sees more examples.
D. Use the test labels to select the best training checkpoint.

37 During teacher forcing for next-token prediction, what is fed to the decoder at time ?

Teacher forcing Medium
A. The model's predicted token from time
B. A randomly selected token from the vocabulary
C. The final label for the entire sequence
D. The ground-truth token from time

38 What is a common drawback of using teacher forcing during training but relying only on model predictions during inference?

Teacher forcing Medium
A. The decoder is forced to process inputs backward
B. Exposure bias from different training and inference inputs
C. The vocabulary becomes fixed to the training batch size
D. The model cannot calculate a loss for any output token

39 What is the primary purpose of truncated backpropagation through time?

Truncated backpropagation through time Medium
A. To make every sequence contain the same number of words.
B. To guarantee that gradients reach the first token.
C. To remove recurrent connections from the network.
D. To limit memory use and computational cost over long sequences.

40 If the truncation window is too short, which behavior is most likely?

Truncated backpropagation through time Medium
A. The model will automatically become bidirectional.
B. The model will always have zero training loss.
C. The model will require no hidden state between windows.
D. The model may fail to learn dependencies longer than the window.

41 A batch contains right-padded sequences with true lengths . A unidirectional RNN processes all seven time steps without packing or masking, and its hidden state is updated normally for padding tokens. Which representation should be used to classify the second sequence while preserving its intended semantics?

Sequential text data Hard
A. The hidden state at time step for the second sequence
B. The mean of hidden states from time steps through
C. The hidden state at time step for the second sequence
D. The maximum over hidden states from time steps through

42 For a linearized RNN, , suppose is normal and has spectral radius . Ignoring loss-specific factors, what is the asymptotic behavior of the gradient contribution propagated across recurrent steps?

Recurrent neural networks Hard
A. It becomes exactly zero after a finite number of steps
B. It typically grows on the order of
C. It typically decays on the order of
D. It remains constant because is normal

43 An LSTM uses . Along one cell dimension, assume indirect dependencies through the gates are ignored and for 200 steps. Approximately what fraction of a gradient on reaches through the direct cell-state path?

Long short-term memory networks Hard
A.
B.
C.
D.

44 A GRU has input size and hidden size . Each of its reset, update, and candidate computations has an input matrix, a recurrent matrix, and one bias vector. Excluding embeddings and output layers, how many trainable scalar parameters does it have?

Gated recurrent units Hard
A.
B.
C.
D.

45 A bidirectional RNN is trained for token-level prediction using the entire sentence. The system must later emit each prediction immediately as a token arrives in a live stream. What is the central deployment incompatibility?

Bidirectional RNNs Hard
A. The output layer cannot consume concatenated directional representations
B. The forward state cannot represent tokens seen before the current token
C. The two directional states must always use different hidden dimensions
D. The backward state depends on future tokens unavailable at emission time

46 A named-entity recognizer independently predicts BIO tags and frequently outputs illegal transitions such as O I-PER. Which modification most directly models dependencies between adjacent output labels while retaining neural token representations?

Sequence modeling applications Hard
A. Average all token states before applying a softmax classifier
B. Replace token embeddings with larger pretrained embeddings
C. Increase the number of independent softmax classes per token
D. Add a linear-chain CRF over the token-level emission scores

47 A document-level sentiment model uses only the final hidden state of a unidirectional RNN. Reviews are truncated to their last 200 tokens, but sentiment-changing premises often occur near the beginning. Which change most directly preserves those premises without increasing the 200-token limit?

Sentiment classification Hard
A. Reverse only the labels while retaining the current token truncation
B. Use a hierarchical model that encodes chunks and then their sequence
C. Apply a larger softmax layer to the final recurrent representation
D. Increase dropout on recurrent connections during document encoding

48 In a multilabel text classifier, each label is trained with binary cross-entropy. Label A is common and Label B is rare, and their score distributions differ substantially. Which validation procedure is most appropriate when the target metric is macro-?

Text classification Hard
A. Normalize all label probabilities so that they sum to exactly one
B. Apply one threshold of because binary cross-entropy requires it
C. Tune a separate decision threshold for each label on validation data
D. Select the largest logit as the only positive label for every example

49 During sequence-model training, scheduled sampling increasingly replaces gold previous tokens with model-generated tokens. Which theoretical issue can remain even if this improves robustness at inference time?

Sequence training techniques Hard
A. The output probabilities must become independent across decoding steps
B. The training objective may become inconsistent with maximum-likelihood estimation
C. The decoder can no longer condition on any previously generated token
D. The recurrent parameters cease to receive gradients from later losses

50 A decoder trained with full teacher forcing has low validation loss when conditioned on gold prefixes but produces poor long free-running sequences. Which explanation best identifies the mismatch?

Teacher forcing Hard
A. Inference conditions on model errors that were absent from training prefixes
B. Inference disables the recurrent transition used during teacher forcing
C. Training computes gradients only for the first generated sequence position
D. Training uses future target tokens directly in the current output softmax

51 A stateful RNN processes a long stream in consecutive chunks of 50 steps. The final hidden value of each chunk initializes the next chunk, but it is detached from the computation graph at every boundary. Which statement is correct?

Truncated backpropagation through time Hard
A. Neither forward information nor gradients can cross chunk boundaries
B. Gradients cross boundaries, but hidden-state values are reinitialized
C. Forward information crosses boundaries, but gradients do not cross them
D. Both forward information and exact full-sequence gradients cross boundaries

52 A language model has average negative log-likelihood nats per token on a corpus. What is its token-level perplexity?

Evaluation metrics for sequence tasks Hard
A.
B.
C.
D.

53 Two translation systems are evaluated with BLEU. System X produces fluent paraphrases with few exact reference -grams, while System Y copies many reference phrases but occasionally changes critical meanings. Which limitation of BLEU is most directly illustrated?

Evaluation metrics for sequence tasks Hard
A. Reference overlap guarantees identical scores for all paraphrases
B. Reference overlap may not reliably reflect semantic adequacy
C. BLEU requires a probabilistic score for every generated token
D. BLEU assigns no penalty to outputs shorter than their references

54 For an LSTM, . Suppose a cell stores useful information with , but is nearly zero. What follows at time ?

Long short-term memory networks Hard
A. The input gate is forced to one to reveal the stored information
B. The forget gate becomes irrelevant to all subsequent cell states
C. The information is erased from by the output gate
D. The information remains in but is mostly hidden from

55 Consider the GRU convention . If is approximately zero in every dimension, what behavior results?

Gated recurrent units Hard
A. The candidate state almost completely replaces the previous state
B. The hidden state becomes the elementwise product of both states
C. The reset gate is forced to zero by the update equation
D. The previous hidden state is copied with little modification

56 A model mean-pools token representations for text classification. A minibatch is right-padded, and padding vectors are zeros before entering a recurrent encoder. Why must the pooling operation still use a length mask?

Sequential text data Hard
A. Padding positions necessarily receive larger gradients than valid positions
B. Recurrent outputs at padded positions can be nonzero and alter the mean
C. Zero input vectors always cause recurrent hidden states to become undefined
D. Mean pooling is mathematically valid only for equal-length input sequences

57 A bidirectional LSTM has hidden size in each direction and concatenates its forward and backward states at every token. A linear token classifier predicts classes. Ignoring bias, what is the classifier weight matrix shape under the convention ?

Bidirectional RNNs Hard
A.
B.
C.
D.

58 A binary text classifier is evaluated on 10,000 examples, of which only 100 are positive. It predicts every example as negative. Which metric can appear deceptively strong despite total failure on the positive class?

Text classification Hard
A. Positive-class recall, which equals
B. Accuracy, which equals
C. Positive-class precision, which equals
D. Positive-class , which equals

59 An RNN occasionally produces extremely large gradient norms because products of recurrent Jacobians amplify particular directions. Which intervention directly bounds the magnitude of each parameter update while largely preserving the gradient direction?

Sequence training techniques Hard
A. Increase the truncation window without changing optimization
B. Clip the global gradient norm before the optimizer step
C. Normalize output probabilities independently at every time step
D. Apply token dropout only to the decoder target sequence

60 A BIO-tagged NER prediction identifies the correct entity type but extends the entity by one token beyond the gold boundary. Under strict entity-level micro-, how is this single predicted span counted?

Evaluation metrics for sequence tasks Hard
A. As one false positive and no false negative
B. As one false positive and one false negative
C. As one true positive with a boundary penalty
D. As one true positive and one false positive