AML AML Natural Language Processing & Computer Vision 1 — Questions and Answers
Question 1: Which NLP technique converts words into dense vector representations that capture semantic relationships?
- TF-IDF
- Bag of Words
- Word2Vec / Word Embeddings (Correct answer)
- Stemming
Correct answer: Word2Vec / Word Embeddings
Word embeddings like Word2Vec map words to dense vectors where semantically similar words have high cosine similarity.
Question 2: What does TF-IDF stand for in text feature extraction?
- Text Frequency–Inverse Document Function
- Term Frequency–Inverse Document Frequency (Correct answer)
- Token Filter–Index Document Format
- Text Format–Inverse Data Frame
Correct answer: Term Frequency–Inverse Document Frequency
TF-IDF weighs each word by how often it appears in a document (TF) penalized by how common it is across all documents (IDF).
Question 3: In computer vision, what is the role of a convolutional layer in a CNN?
- Flatten the image into a 1D vector
- Apply learnable filters to detect local spatial features (Correct answer)
- Normalize pixel values across channels
- Perform non-maximum suppression on detected objects
Correct answer: Apply learnable filters to detect local spatial features
Convolutional layers slide learnable filters across the input image to detect local patterns like edges, textures, and shapes.
Question 4: Which NLP task involves assigning a label (positive, negative, neutral) to a piece of text based on its emotional tone?
- Named Entity Recognition
- Sentiment Analysis (Correct answer)
- Machine Translation
- Coreference Resolution
Correct answer: Sentiment Analysis
Sentiment analysis classifies text according to the opinion or emotion expressed, commonly as positive, negative, or neutral.
Question 5: What is the purpose of max pooling in a convolutional neural network?
- Increase the spatial resolution of feature maps
- Introduce non-linearity into the network
- Reduce spatial dimensions while retaining dominant features (Correct answer)
- Normalize activations across the batch
Correct answer: Reduce spatial dimensions while retaining dominant features
Max pooling downsamples feature maps by taking the maximum value in each pooling window, reducing size while preserving strong activations.
Question 6: Which transformer-based model introduced bidirectional context for language understanding and set new NLP benchmarks in 2018?
- GPT-2
- BERT (Correct answer)
- ELMo
- Seq2Seq
Correct answer: BERT
BERT (Bidirectional Encoder Representations from Transformers) pre-trains on masked language modeling using full left and right context simultaneously.
Which NLP technique converts words into dense vector representations that capture semantic relationships?