A team needs to predict the next word in a sentence, where each prediction depends on the words that came before it in order. Which model class is classically built for this kind of sequential, order-dependent prediction task?
Select an answer to reveal the explanation.
Short Explanation and Infographic
Here's the deal: when order matters and each output depends on everything that came before it, you need a model with memory, and that's exactly what a Recurrent Neural Network gives you. An RNN carries a hidden state forward step by step through a sequence, so word five gets to "remember" something about words one through four before making its prediction. That's why RNN is the classic answer for sequence prediction like language modeling, time series, or anything ordered in time. A CNN is brilliant at spatial patterns like edges in an image, but it doesn't naturally track order across an unbounded sequence. K-Means is unsupervised clustering, grouping similar points together, not predicting a next value. And a decision tree makes one-shot branching decisions on fixed features; it has no built-in concept of "what came before."
Full explanation below image
Full Explanation
Recurrent Neural Networks are the classical architecture for sequence prediction because they process input one step at a time while maintaining a hidden state that is updated and passed forward at every step. This hidden state acts as a compressed memory of everything the network has seen so far in the sequence, which lets the RNN condition its prediction at time t on the preceding tokens rather than treating each input independently. This design makes RNNs (and their gated descendants, LSTM and GRU) a natural fit for tasks like language modeling, next-word prediction, speech recognition, and time-series forecasting, where the order and history of inputs carries essential information.
A Convolutional Neural Network is incorrect as the classic answer here because CNNs are designed around local, spatially-invariant filters that excel at detecting patterns like edges or textures regardless of position in an image or grid. While 1D convolutions can be applied to sequences, CNNs do not inherently maintain a running memory of arbitrary-length history the way an RNN does, making them a secondary rather than the textbook choice for sequence prediction.
K-Means clustering is incorrect because it is an unsupervised algorithm that partitions unlabeled data into k groups based on similarity; it has no notion of sequence, order, or prediction of a next value at all, and it is not a supervised sequence model.
A decision tree is incorrect because it is a supervised model that makes branching decisions based on feature thresholds evaluated on a fixed-size input vector at a single point in time. It has no mechanism for retaining information across a sequence of prior inputs, so it cannot natively model order-dependent dynamics.
Memory aid: RNN equals "Remembers Nearby Numbers" (or more precisely, recurrent equals recurring — the network loops its own output/state back in as part of the next input), which is exactly the mechanism sequence prediction requires.