Lecture 3 Flashcards

1
Q

What is Language Modeling?

A

Language modeling is the task of predicting the next word in a sequence based on previous words, a core part of NLP tasks like text generation and machine translation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Describe Causal Language Modeling.

A

Causal language modeling predicts the next token in a sequence incrementally, mimicking human language processing.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is an N-Gram Model?

A

An N-Gram model uses fixed-length word sequences (e.g., bigrams, trigrams) to predict the likelihood of a word based on the previous words.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Define the Markov Assumption in language modeling.

A

The Markov assumption limits the dependency of a word to only the previous n−1 words, simplifying the computation of probabilities in N-Gram models.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is Smoothing in N-Gram models?

A

Smoothing is a technique to handle unseen N-Grams by assigning a small probability instead of zero, improving model robustness.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is Zipf’s Law?

A

Zipf’s Law states that in a language, a few words are very common, while most words are rare, leading to a “long tail” distribution of word frequency.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How is Perplexity used in language models?

A

Perplexity measures a model’s ability to predict a sample sequence; lower perplexity indicates better predictive accuracy.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How is Cross-Entropy related to Perplexity?

A

Cross-entropy measures the difficulty of a model predicting a corpus; perplexity is the exponent of cross-entropy, representing uncertainty in prediction

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are Word Embeddings?

A

Word embeddings are dense vector representations of words, capturing semantic similarity by positioning similar words closer in vector space.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are the two main training setups in word2vec?

A

CBOW (Continuous Bag of Words), which predicts a target word from context, and Skip-gram, which predicts context words from a target word.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How does CBOW differ from Skip-gram in word2vec?

A

CBOW predicts a word from its context, ideal for frequent words; Skip-gram predicts surrounding words from a target word, better for rare words.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is the Bag of Words (BoW) approach in sentence embeddings?

A

BoW represents sentences by their word count, ignoring grammar and word order, but does not capture context between words.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Describe a Naive Approach to sentence embeddings.

A

One naive approach averages word embeddings in a sentence, which can serve as a simple baseline but ignores word order and context.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What are LSTMs and their role in language modeling?

A

Long Short-Term Memory networks (LSTMs) are a type of RNN that handle long-distance dependencies in sequences, making them suitable for sequential data.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is the Transformer architecture?

A

The Transformer uses self-attention mechanisms to capture relationships between words without sequence limitations, powering models like BERT and GPT.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Explain Masked Language Modeling.

A

Masked Language Modeling predicts missing words in a sentence, enabling bidirectional context understanding, as seen in models like BERT.

17
Q

How does Prompt Engineering work in language models?

A

Prompt engineering guides a model’s output by framing tasks as questions or instructions, enhancing model performance on specific tasks.

18
Q

What is Structural Priming in evaluating LLMs?

A

Structural priming examines if exposure to certain syntactic structures influences model responses, indicating learned structural representation.

19
Q

What are Natural Language Inference (NLI) tasks?

A

NLI tasks test a model’s understanding of logical entailments and relationships between sentences, measuring reasoning capabilities.

20
Q

Why is Perplexity a significant metric in NLP?

A

Perplexity indicates how well a model predicts the next word, with lower values meaning more accurate and reliable language models.