1. The computer-implemented method of labeling a media item, the method comprising: receiving a media item that is associated with a plurality of frames, each of the plurality of frames being associated with a list of nodes including one or more nodes of a Hidden Markov Model; identifying a frame from the plurality of frames, the identified frame being located at a predicted segmentation point that segments the media item from a subsequent media; pruning one or more nodes from the list of nodes associated with the identified frame, the pruning comprising: determining whether a score for a particular node in the list of nodes for the identified frame satisfies a threshold that represents a sum of (i) a best score among the scores for the nodes in the list of nodes for the identified frame and (ii) a beam threshold representing a threshold used in a beam search to prune one or more nodes that are associated with a frame located at a non-predicted segmentation point, and based on a determination that the score for the particular node satisfies the threshold, pruning the particular node from the list of nodes for the identified frame; and predicting a label for the media item using the pruned list of nodes.