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. Page width affects meaning
B. Word order affects meaning
C. Font size affects meaning
D. Word length affects meaning

2 What is a token in a text sequence?

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

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

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

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

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

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. Learning long-term dependencies
D. Sorting tokens alphabetically

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

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

7 Which two gates are commonly used in a GRU?

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

8 How does a GRU generally compare with an LSTM?

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

9 How does a bidirectional RNN process a sequence?

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

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

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

11 Which task is a common application of sequence modeling?

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

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

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

13 What does sentiment classification usually identify in a text?

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

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

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

15 What is the goal of text classification?

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

16 Which task is an example of text classification?

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

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

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

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

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

19 What does truncated backpropagation through time limit during training?

Truncated backpropagation through time Easy
A. The number of output classes
B. The number of unrolled steps
C. The number of evaluation labels
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. Accuracy
B. Perplexity
C. Recall
D. Precision

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 guarantees that every word receives the same vector.
C. It determines how meanings are composed across positions.
D. It removes the need for a vocabulary or tokenizer.

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

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

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. Vanishing gradients during training
D. Insufficient output classes

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 reverse the order of the input sequence
C. To select which cell-state information to discard
D. To normalize all hidden-state values

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 always requires fewer parameters than a vanilla RNN.
B. It converts sentiment directly from the first token.
C. It ignores neutral words before making a prediction.
D. It can preserve relevant information through gated memory.

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 uses gates but does not maintain a separate cell state.
C. A GRU cannot process sequences with variable lengths.
D. A GRU replaces recurrent connections with convolutional filters.

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. Producing an output without using any hidden state
B. Preventing the current input from being processed
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 eliminates the need for token-level annotations.
B. It processes only the first half of each sentence.
C. It guarantees correct recognition of every entity.
D. It can use context from both earlier and later words.

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 cannot represent information from previous time steps.
C. It can only classify complete documents after padding.
D. It generally needs future context before finalizing predictions.

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

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

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 exactly one label for the entire document.
C. It produces no output until the vocabulary is rebuilt.
D. It assigns labels only to tokens appearing twice.

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 sentence has no meaningful sequence structure.
C. The model must treat every adjective as negative.
D. The review contains too few tokens for classification.

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 automatically translates the message into another language.
B. It avoids learning parameters from labeled examples.
C. It assigns every word a unique sentiment score.
D. It can represent word order and local context.

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. Precision, recall, and the F1-score for the positive class
B. The number of tokens processed per second during inference
C. Training loss alone, because it directly measures deployment quality
D. Accuracy alone, because it weights both classes equally

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

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

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. Remove validation data so the model sees more examples.
B. Apply dropout or recurrent regularization.
C. Increase the number of training epochs without monitoring validation loss.
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 final label for the entire sequence
B. A randomly selected token from the vocabulary
C. The model's predicted token from time
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 vocabulary becomes fixed to the training batch size
B. Exposure bias from different training and inference inputs
C. The model cannot calculate a loss for any output token
D. The decoder is forced to process inputs backward

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

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

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

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

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 mean of hidden states from time steps through
B. The maximum over hidden states from time steps through
C. The hidden state at time step for the second sequence
D. The hidden state at time step for the second sequence

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 remains constant because is normal
B. It typically grows on the order of
C. It becomes exactly zero after a finite number of steps
D. It typically decays on the order of

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 backward state depends on future tokens unavailable at emission time
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 output layer cannot consume concatenated directional representations

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. Add a linear-chain CRF over the token-level emission scores
B. Increase the number of independent softmax classes per token
C. Replace token embeddings with larger pretrained embeddings
D. Average all token states before applying a softmax classifier

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. Apply a larger softmax layer to the final recurrent representation
B. Reverse only the labels while retaining the current token truncation
C. Use a hierarchical model that encodes chunks and then their sequence
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. Apply one threshold of because binary cross-entropy requires it
B. Tune a separate decision threshold for each label on validation data
C. Select the largest logit as the only positive label for every example
D. Normalize all label probabilities so that they sum to exactly one

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 decoder can no longer condition on any previously generated token
B. The recurrent parameters cease to receive gradients from later losses
C. The training objective may become inconsistent with maximum-likelihood estimation
D. The output probabilities must become independent across decoding steps

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. Training uses future target tokens directly in the current output softmax
B. Inference disables the recurrent transition used during teacher forcing
C. Training computes gradients only for the first generated sequence position
D. Inference conditions on model errors that were absent from training prefixes

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. Gradients cross boundaries, but hidden-state values are reinitialized
B. Neither forward information nor gradients can cross chunk boundaries
C. Both forward information and exact full-sequence gradients cross boundaries
D. Forward information crosses boundaries, but gradients do not cross them

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. BLEU requires a probabilistic score for every generated token
C. Reference overlap may not reliably reflect semantic adequacy
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 information remains in but is mostly hidden from
C. The forget gate becomes irrelevant to all subsequent cell states
D. The information is erased from by the output gate

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

Gated recurrent units Hard
A. The reset gate is forced to zero by the update equation
B. The hidden state becomes the elementwise product of both states
C. The candidate state almost completely replaces the previous state
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. Mean pooling is mathematically valid only for equal-length input sequences
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. Padding positions necessarily receive larger gradients than valid positions

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 precision, which equals
B. Accuracy, which equals
C. Positive-class recall, 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. Normalize output probabilities independently at every time step
B. Increase the truncation window without changing optimization
C. Apply token dropout only to the decoder target sequence
D. Clip the global gradient norm before the optimizer step

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 true positive and one false positive
B. As one true positive with a boundary penalty
C. As one false positive and one false negative
D. As one false positive and no false negative