โ† All NLP Flashcard Decks

Text Classification Flashcards

7 cards from real NLP practice questions. Tap to flip, then mark Knew It or Still Learning โ€” missed cards come back until you master them.

Read the first 7 Text Classification flashcards as text
  1. What is the primary function of a softmax layer at the output of a text classification neural network?

    Answer: To convert raw logits into a probability distribution over all classes

    Softmax exponentiates each logit and divides by the sum, producing a valid probability distribution where all class probabilities sum to 1.

  2. In the context of text classification, what is 'data augmentation'?

    Answer: Artificially expanding the training dataset by creating modified versions of existing examples

    Text data augmentation techniques such as synonym replacement, back-translation, and random insertion create new training examples to improve model robustness and generalization.

  3. Which approach best describes 'prompt-based' text classification using large language models?

    Answer: Framing the classification task as a text generation problem with natural language instructions

    Prompt-based classification provides the LLM with a natural language template (prompt) so the model generates or selects the correct label token, unifying classification with the generative pretraining objective.

  4. What distinguishes 'domain adaptation' in text classification?

    Answer: Adapting a model trained on one domain (e.g., news) to perform well on a different domain (e.g., medical)

    Domain adaptation addresses the distribution shift between source and target domains, using techniques like continued pre-training or adversarial training to transfer knowledge effectively.

  5. What is 'macro-averaged F1-score' in multi-class text classification?

    Answer: The unweighted mean of the per-class F1-scores, treating all classes equally

    Macro-averaged F1 computes F1 independently for each class and then takes the simple average, giving equal weight to each class regardless of its frequency.

  6. Which of the following is a key characteristic of convolutional neural networks (CNNs) when applied to text classification?

    Answer: They apply filters over local n-gram windows to capture local features

    CNNs for text use 1D convolutional filters that slide over windows of consecutive words, learning to detect locally informative n-gram patterns useful for classification.

  7. What is the role of 'attention pooling' in a text classification model?

    Answer: It learns to assign higher weights to more task-relevant tokens when summarizing a sequence

    Attention pooling computes a weighted sum of token representations where weights are learned based on relevance to the classification task, producing a more informative document-level embedding.