Understanding LLMs and NLP Techniques
Understanding LLMs and NLP Techniques
([Link] ([Link]
shahkartik369@[Link]
(course)
Lec 02 : Bank
Introduction to Tree
Natural
Gravity
Language
Processing Idea
(unit? Yes, the answer is correct.
unit=18&lesson
=20)
[Link] 1/4
10/28/25, 1:42 PM Introduction to Large Language Models (LLMs) - - Unit 3 - Week 1
Score: 1
Lecture
Materials (unit? Accepted Answers:
unit=18&lesson Gravity
=22)
3) Consider the following sentence pair: 1 point
Feedback Form
(unit? Sentence 1: Riya dropped the glass.
unit=18&lesson Sentence 2: The glass broke.
=27)
Quiz: Week 1 :
Does Sentence 1 entail Sentence 2?
Assignment 1
Yes
(assessment?
name=116) No
Syntax
Morphology
Pragmatics
Semantics
[Link] 2/4
10/28/25, 1:42 PM Introduction to Large Language Models (LLMs) - - Unit 3 - Week 1
7) In the sentence, “After Sita praised Radha, she smiled happily,” who does “she” most 1 point
likely refer to?
Sita
Radha
Ambiguous
Neither
Only (i)
Only (i) and (iii)
Only (ii) and (iii)
All of the above
Yes, the answer is correct.
Score: 1
Accepted Answers:
Only (i)
Idioms
Non-standard English
Tricky Entity Names
Neologisms
Partially Correct.
Score: 0.5
Accepted Answers:
Non-standard English
Neologisms
[Link] 3/4
10/28/25, 1:42 PM Introduction to Large Language Models (LLMs) - - Unit 3 - Week 1
10) In semantic role labelling, we determine the semantic role of each argument with 1 point
respect to the ___________ of the sentence.
noun phrase
subject
predicate
adjunct
Yes, the answer is correct.
Score: 1
Accepted Answers:
predicate
[Link] 4/4
10/28/25, 1:43 PM Introduction to Large Language Models (LLMs) - - Unit 4 - Week 2
([Link] ([Link]
shahkartik369@[Link]
(course)
[Link] 1/3
10/28/25, 1:43 PM Introduction to Large Language Models (LLMs) - - Unit 4 - Week 2
unit=23&lesson Score: 1
=26) Accepted Answers:
P(w1, w2, w3, w4) = P(w1) × P(w2|w1) × P(w3|w1, w2) × P(w4|w1, w2, w3)
Lecture
Material (unit? 3) Which assumption allows n-gram models to reduce computation? 1 point
unit=23&lesson
=29) Bayes Assumption
Feedback Form
Chain Rule
(unit? Independence Assumption
unit=23&lesson
Markov Assumption
=28)
Yes, the answer is correct.
Quiz: Week 2 : Score: 1
Assignment 2 Accepted Answers:
(assessment? Markov Assumption
name=117)
4) In a trigram language model, which of the following is a correct example of linear 1 point
Week 3 ()
interpolation?
Week 4 () P(wi∣wi−2,wi−1)=λ1P(wi∣wi−2,wi−1)
P(wi∣wi−2,wi−1)=λ1P(wi∣wi−2,wi−1)+λ2P(wi∣wi−1)+λ3P(wi)
Week 5 ()
P(wi∣wi−2,wi−1)=max(P(wi∣wi−2,wi−1),P(wi∣wi−1))
Week 6 () P(wi∣wi−2,wi−1)=P(wi)P(wi−1)/P(wi−2)
3
Week 10 ()
2
Week 11 () 1
4
Week 12 ()
Yes, the answer is correct.
Score: 1
Year 2025
Accepted Answers:
July Solution 2
()
6) Which smoothing technique leverages the number of unique contexts a word appears 1 point
in?
Good-Turing
Add-k
Kneser-Ney
Absolute Discounting
[Link] 2/3
10/28/25, 1:43 PM Introduction to Large Language Models (LLMs) - - Unit 4 - Week 2
7) Assuming a bi-gram language model, calculate the probability of the sentence: 2 points
<s>birds fly in the blue sky</s>
Ignore the unigram probability of P(<s>) in your calculation.
2/37
1/27
0
1/36
8) Assuming a bi-gram language model, calculate the perplexity of the sentence: 2 points
271/4
271/5
91/6
None of these
[Link] 3/3
10/28/25, 1:44 PM Introduction to Large Language Models (LLMs) - - Unit 5 - Week 3
([Link] ([Link]
shahkartik369@[Link]
(course)
[Link] 1/4
10/28/25, 1:44 PM Introduction to Large Language Models (LLMs) - - Unit 5 - Week 3
Score: 1
Coding file
(unit? Accepted Answers:
unit=30&lesson ReLU
=33)
3) In the context of regularization, which of the following statements is true? 1 point
Feedback Form
(unit? L2 regularization tends to produce sparse weights
unit=30&lesson Dropout is applied during inference to improve accuracy
=34)
L1 regularization adds the squared weight penalties to the loss function
Quiz: Week 3 : Dropout prevents overfitting by randomly disabling neurons during training
Assignment 3
Yes, the answer is correct.
(assessment?
Score: 1
name=118)
Accepted Answers:
Dropout prevents overfitting by randomly disabling neurons during training
Week 4 ()
Week 5 () 4) Which activation function is least likely to suffer from vanishing gradients? 1 point
Tanh
Week 6 ()
Sigmoid
Week 7 () ReLU
Week 10 () 5) Which of the following equations correctly represents the derivative of the sigmoid 1 point
function?
Week 11 ()
σ(x) · (1 + σ(x))
Week 12 () σ(x)²
σ(x) · (1 − σ(x))
Year 2025 1 / (1 + e^x)
July Solution
Yes, the answer is correct.
()
Score: 1
Accepted Answers:
σ(x) · (1 − σ(x))
6) What condition must be met for the Perceptron learning algorithm to converge? 1 point
[Link] 2/4
10/28/25, 1:44 PM Introduction to Large Language Models (LLMs) - - Unit 5 - Week 3
7) Which of the following logic functions requires a network with at least one hidden layer 1 point
to model?
AND
OR
NOT
XOR
Yes, the answer is correct.
Score: 1
Accepted Answers:
XOR
9) What is typically the output activation function for an MLP solving a binary classification 1 point
task?
Tanh
ReLU
Sigmoid
Softmax
L1 regularization
L2 regularization
Dropout
Early stopping
[Link] 3/4
10/28/25, 1:44 PM Introduction to Large Language Models (LLMs) - - Unit 5 - Week 3
[Link] 4/4
10/28/25, 1:44 PM Introduction to Large Language Models (LLMs) - - Unit 6 - Week 4
([Link] ([Link]
shahkartik369@[Link]
(course)
[Link] 1/4
10/28/25, 1:44 PM Introduction to Large Language Models (LLMs) - - Unit 6 - Week 4
unit=36&lesson
=38)
3) Which property makes tf-idf a better representation than raw term frequency? 1 point
Lec 09 : It is non-linear
Tokenization It accounts for the informativeness of words
Strategies
(unit?
It penalizes longer documents
unit=36&lesson It uses hierarchical clustering
=39)
Yes, the answer is correct.
Lecture
Score: 1
Material (unit? Accepted Answers:
unit=36&lesson It accounts for the informativeness of words
=40)
4) What is the purpose of using negative sampling in Word2Vec training? 1 point
Feedback Form
(unit?
To reduce dimensionality of word vectors
unit=36&lesson
=41) To ensure gradient convergence
To balance class distribution in classification
Quiz: Week 4 :
Assignment 4 To simplify softmax computation
(assessment? Yes, the answer is correct.
name=119) Score: 1
Accepted Answers:
Week 5 () To simplify softmax computation
6) Why does SVD-based word embedding struggle with adding new words to the 1 point
Week 12 ()
vocabulary?
Year 2025
It uses online learning
July Solution
() It lacks semantic interpretability
It assumes word order
It is computationally expensive to retrain
[Link] 2/4
10/28/25, 1:44 PM Introduction to Large Language Models (LLMs) - - Unit 6 - Week 4
7) Which of the following best describes the term “distributional hypothesis” in NLP? 1 point
8) In Word2Vec, similarity between word vectors is computed using Euclidean distance. 1 point
True
False
9) Which method solves the problem of OOV (Out-Of-Vocabulary) words better? 1 point
One-hot encoding
CBOW
Skip-gram with subsampling
FastText embedding
10) If the word "economy" occurs 4 times in a corpus, and "growth" appears in a window of 1 point
5 words around it 3 times, what is the entry for (economy, growth) in a term-context matrix?
1
2
3
4
[Link] 3/4
10/28/25, 1:44 PM Introduction to Large Language Models (LLMs) - - Unit 6 - Week 4
[Link] 4/4
10/28/25, 1:44 PM Introduction to Large Language Models (LLMs) - - Unit 7 - Week 5
([Link] ([Link]
shahkartik369@[Link]
(course)
Week 4 ()
2) In an attention mechanism, what does the softmax function ensure? 1 point
Week 5 ()
Normalization of decoder outputs
[Link] 1/3
10/28/25, 1:44 PM Introduction to Large Language Models (LLMs) - - Unit 7 - Week 5
Score: 1
Lec 11 : Neural
Language Accepted Answers:
Models: LSTM Attention weights sum to 1
& GRU (unit?
3) Which of the following is true about the difference between a standard RNN and an 1 point
unit=43&lesson
LSTM?
=45)
[Link] 2/3
10/28/25, 1:44 PM Introduction to Large Language Models (LLMs) - - Unit 7 - Week 5
Score: 1
Week 11 () Accepted Answers:
The decoder generates outputs based on encoder representations and its own prior outputs.
Week 12 ()
7) What is self-attention in Transformers used for? 1 point
Year 2025
To enable sequential computation
July Solution
() To attend to the previous layer’s output
To relate different positions in the same sequence
To enforce fixed-length output
9) Given the following encoder and decoder hidden states, compute the attention 2 points
scores. (Use dot product as the scoring function)
[Link] 3/3
10/28/25, 1:44 PM Introduction to Large Language Models (LLMs) - - Unit 8 - Week 6
([Link] ([Link]
shahkartik369@[Link]
(course)
[Link] 1/3
10/28/25, 1:44 PM Introduction to Large Language Models (LLMs) - - Unit 8 - Week 6
Lecture
5) The sinusoidal positional encoding uses sine for even dimensions and ___ for odd 1 point
Material (unit? dimensions.
unit=56&lesson
=60) sine
cosine
Feedback Form
(unit? tangent
unit=56&lesson None of these
=61)
Yes, the answer is correct.
Quiz: Week 6 : Score: 1
Assignment 6 Accepted Answers:
(assessment? cosine
name=125)
6) Why is positional encoding added to input embeddings in Transformers? 1 point
Week 7 ()
To provide unique values for each word
Week 8 () To indicate the position of tokens since Transformers are non-sequential
To scale embeddings
Week 9 ()
To avoid vanishing gradients
Week 10 () Yes, the answer is correct.
Score: 1
Week 11 () Accepted Answers:
To indicate the position of tokens since Transformers are non-sequential
Week 12 ()
7) You are given a self-attention layer with input dimension 512, using 8 heads. What is 2 points
Year 2025 the output dimension per head?
July Solution
64
[Link] 2/3
10/28/25, 1:44 PM Introduction to Large Language Models (LLMs) - - Unit 8 - Week 6
() 128
32
256
8) For a transformer with dmodel = 512, calculate the positional encoding for position 2 points
p=14 and dimensions 6 and 7 using the sinusoidal formula:
[Link] 3/3
10/28/25, 1:45 PM Introduction to Large Language Models (LLMs) - - Unit 9 - Week 7
([Link] ([Link]
shahkartik369@[Link]
(course)
Week 7 () Unlabelled text is turned into a supervised task via a noising scheme.
Training relies on a next-sentence-prediction loss.
Lec 18 : Pre-
Training
Yes, the answer is correct.
Strategies:
S
[Link] 1/3
10/28/25, 1:45 PM Introduction to Large Language Models (LLMs) - - Unit 9 - Week 7
Lecture 4) T5 experiments showed that clean and compact pre-training data can outperform a 1 point
Material (unit? larger but noisier corpus primarily because:
unit=63&lesson
=67) Larger corpora overfit.
Feedback Form Noise forces the model to waste capacity on modelling irrelevant patterns.
(unit? Clean data has longer documents.
unit=63&lesson
Compact data allows bigger batches.
=68)
Yes, the answer is correct.
Quiz: Week 7 : Score: 1
Assignment 7
Accepted Answers:
(assessment?
Noise forces the model to waste capacity on modelling irrelevant patterns.
name=126)
Week 8 () 5) What makes sampling from an auto-regressive language model straightforward? 1 point
[Link] 2/3
10/28/25, 1:45 PM Introduction to Large Language Models (LLMs) - - Unit 9 - Week 7
7)
87
2 points
[Link] 3/3
10/28/25, 1:45 PM Introduction to Large Language Models (LLMs) - - Unit 10 - Week 8
([Link] ([Link]
shahkartik369@[Link]
(course)
[Link] 1/4
10/28/25, 1:45 PM Introduction to Large Language Models (LLMs) - - Unit 10 - Week 8
[Link] 2/4
10/28/25, 1:45 PM Introduction to Large Language Models (LLMs) - - Unit 10 - Week 8
6) In training a reward model with pairwise preferences (x, y+, y-), the Bradley-Terry style 1 point
Week 11 ()
objective encourages:
7) Which of the following are recommended while performing REINFORCE-style policy 1 point
optimization?
REINFORCE
Monte Carlo Approximation
Proximal Policy Optimization
Constitutional AI
9) Which of the following is the reason for performing alignment beyond instruction tuning 1 point
in LLMs?
[Link] 3/4
10/28/25, 1:45 PM Introduction to Large Language Models (LLMs) - - Unit 10 - Week 8
10) Let πθ be the probability of choosing token at in state st assigned by the current policy 1 point
being optimized, πk be that by the old/reference policy and ∈ > 0 be the clip parameter. When the
token-level advantage At is positive, PPO-CLIP maximizes which of the following expression at step
t?
max (πθ/πk , 1 - ∈) At
max (πk/πθ ,1-∈) At
min (πk/πθ ,1+∈) At
min (πθ/πk ,1+∈) At
[Link] 4/4
10/28/25, 1:45 PM Introduction to Large Language Models (LLMs) - - Unit 11 - Week 9
([Link] ([Link]
shahkartik369@[Link]
(course)
Week 6 ()
Any unobserved triple is treated as false for training purposes.
It is strictly correct because KGs are exhaustive.
Week 7 ()
It helps training but may mislabel genuinely missing positives as negatives.
Week 8 () It eliminates the need for development/test splits.
[Link] 1/4
10/28/25, 1:45 PM Introduction to Large Language Models (LLMs) - - Unit 11 - Week 9
Feedback Form 5) Compared to semantic interpretation (logical-form execution), a differentiable KGQA 1 point
(unit? system:
unit=83&lesson
=87) Requires a hand-coded logical form for every question.
Quiz: Week 9 : Cannot be trained end-to-end.
Assignment 9 Provides complete interpretability of reasoning steps.
(assessment?
name=128)
Learns dense question and graph embeddings and uses cross-attention to align them.
Yes, the answer is correct.
Week 10 () Score: 1
Accepted Answers:
Week 11 () Learns dense question and graph embeddings and uses cross-attention to align them.
Year 2025 It removes candidates that are true facts in train/dev from the ranked list before scoring the
July Solution test query.
[Link] 2/4
10/28/25, 1:45 PM Introduction to Large Language Models (LLMs) - - Unit 11 - Week 9
() It increases fairness by not penalizing the model for ranking another correct answer that
happened to be in training data.
It always decreases MRR.
It affects measures like MRR and MAP.
7) Which of the following best captures the motivation for KG completion? 1 point
8) Consider pairwise hinge/ReLU loss for discriminative training with margin m: max{ 0, m 1 point
+ f(s’k , r, o’k) − f(s, r, o) }. When does this loss become exactly zero for a given negative (s’k , r,
o’k)?
9) Uniform negative sampling can introduce an extra bias unless you do which of the 1 point
following when forming the sampled denominator?
[Link] 3/4
10/28/25, 1:45 PM Introduction to Large Language Models (LLMs) - - Unit 11 - Week 9
f(s, r, o) = ‖s+r−o‖²
f(s, r, o) = ‖s⊙r−o‖², where r lies on the unit circle element-wise
f(s, r, o) = sᵀRᵣo with Rᵣ orthonormal
f(s, r, o) = −⟨s, r, o⟩
[Link] 4/4
10/28/25, 1:46 PM Introduction to Large Language Models (LLMs) - - Unit 12 - Week 10
([Link] ([Link]
shahkartik369@[Link]
(course)
[Link] 1/4
10/28/25, 1:46 PM Introduction to Large Language Models (LLMs) - - Unit 12 - Week 10
Lec 29 :
3) Which of the following are correct about the extensions of LoRA? 1 point
Parameter
LongLoRA supports inference on longer sequences using global attention
Efficient Fine-
Tuning (PEFT) QLoRA supports low-rank adaptation on 4-bit quantized models
(unit? DyLoRA automatically selects the optimal rank during training
unit=90&lesson
=92)
LoRA+ introduces gradient clipping to stabilize training
Quiz: Week 10
6) Which best summarizes the function of the unembedding matrix WU? 1 point
: Assignment
10 It merges the queries and keys for each token before final classification.
(assessment?
name=129)
It converts the final residual vector into vocabulary logits for next-token prediction.
It is used for normalizing the QK and OV circuits so that their norms match.
[Link] 2/4
10/28/25, 1:46 PM Introduction to Large Language Models (LLMs) - - Unit 12 - Week 10
10) Which of the following are true about sequence-level distillation for LLMs? 1 point
[Link] 3/4
10/28/25, 1:46 PM Introduction to Large Language Models (LLMs) - - Unit 12 - Week 10
It trains a student model by matching the teacher’s sequence outputs (e.g., predicted token
sequences) rather than just individual token distributions.
It requires storing only the top-1 predictions from the teacher model for each token.
It can be combined with word-level distillation to transfer both local and global knowledge.
It forces the teacher to produce a chain-of-thought explanation for each example.
[Link] 4/4
10/28/25, 1:46 PM Introduction to Large Language Models (LLMs) - - Unit 13 - Week 11
([Link] ([Link]
shahkartik369@[Link]
(course)
Week 6 ()
2) Which statements correctly characterize the basic DistMult approach for knowledge 1 point
graph completion?
Week 7 ()
Each relation 𝑟 is parameterized by a full D×D matrix that can capture asymmetric relations.
Week 8 ()
The relation embedding is a diagonal matrix, leading to a multiplicative interaction of entity
embeddings.
[Link] 1/4
10/28/25, 1:46 PM Introduction to Large Language Models (LLMs) - - Unit 13 - Week 11
[Link] 2/4
10/28/25, 1:46 PM Introduction to Large Language Models (LLMs) - - Unit 13 - Week 11
Using separate subject and object embeddings per entity and including inverse relations,
with an averaged score over the two directions
Constraining relation vectors to unit modulus
Replacing dot-products by max-pooling
Removing inverse relations entirely
7) Which of the following statements correctly describe hyperbolic (Poincare) embeddings 1 point
for hierarchical data?
They map nodes onto a disk (or ball) such that large branching factors can be represented
with lower distortion than in Euclidean space.
Distance grows slowly near the center and becomes infinite near the boundary, making it
naturally suited for tree-like structures.
They require each node to be embedded on the surface of the Poincare disk of radius 1.
They can achieve arbitrarily low distortion embeddings for trees with the same dimension as
Euclidean space.
8) Why might a partial-order-based approach (like order embeddings) be beneficial for 1 point
modelling ‘is-a’ relationships compared to purely distance-based approaches?
[Link] 3/4
10/28/25, 1:46 PM Introduction to Large Language Models (LLMs) - - Unit 13 - Week 11
They do not rely on pairwise distances but use a notion of coordinate-wise ordering or
interval containment.
9) Which statement about box embeddings in hierarchical modelling is most accurate? 1 point
Each entity or type is assigned a single real-valued vector, ignoring bounding volumes.
Containment Ix ⊆ Iy all dimensions encodes x≺y .
They rely on spherical distances around a central node to measure tree depth.
They cannot be used to represent set intersections or partial overlap.
[Link] 4/4
10/28/25, 1:46 PM Introduction to Large Language Models (LLMs) - - Unit 14 - Week 12
([Link] ([Link]
shahkartik369@[Link]
(course)
Week 2 () 1 and 2
1 and 3
Week 3 ()
2 and 4
1, 3, and 4
Week 4 ()
Yes, the answer is correct.
Week 5 () Score: 1
Accepted Answers:
1 and 3
Week 6 ()
[Link] 1/4
10/28/25, 1:46 PM Introduction to Large Language Models (LLMs) - - Unit 14 - Week 12
Week 9 () The proportion of examples in which a model chooses a stereotypical association over an
anti-stereotypical one.
Week 10 () Yes, the answer is correct.
Score: 1
Week 11 () Accepted Answers:
The proportion of examples in which a model chooses a stereotypical association over an anti-
stereotypical one.
Week 12 ()
3) Which of the following are prominent sources of bias in LLMs? 1 point
Lec 36 :
Responsible
1. Improper selection of training data leading to skewed distributions.
LLMs (unit?
unit=105&lesso 2. Reliance on older datasets causing “temporal bias.”
n=106) 3. Overemphasis on low-resource languages causing “linguistic inversion.”
4. Unequal focus on high-resource languages resulting in “cultural bias.”
Lec 37 :
Conclusion: 1 and 2 only
Expert Panel
2 and 3 only
Discussion
(unit? 1, 2, and 4
unit=105&lesso 1, 3, and 4
n=107)
Yes, the answer is correct.
Lecture Score: 1
Material (unit? Accepted Answers:
unit=105&lesso 1, 2, and 4
n=108)
Feedback Form 4) In the context of bias mitigation based on adversarial triggers, which best describes the 1 point
(unit? goal of prepending specially chosen tokens to prompts?
unit=105&lesso
n=109) To directly fine-tune the model parameters to remove bias
To override all prior knowledge in a model, effectively “resetting” it
Quiz: Week 12
: Assignment To exploit the model’s distributional patterns, thereby neutralizing or flipping biased
12 associations in generated text
(assessment? To randomly shuffle the tokens so that the model becomes more robust
name=131)
Yes, the answer is correct.
Year 2025 Score: 1
July Solution Accepted Answers:
() To exploit the model’s distributional patterns, thereby neutralizing or flipping biased associations
in generated text
It is a measure of how well a model can explain its internal decision process.
It is a measurement of a model’s perplexity on demographically sensitive text.
It is the proportion of times a model self-corrects discriminatory language.
It is a classification label reflecting the attitude towards a demographic group in the
generated text.
[Link] 2/4
10/28/25, 1:46 PM Introduction to Large Language Models (LLMs) - - Unit 14 - Week 12
6) Which of the following steps compose the approach for improving response safety via 1 point
in-context learning?
7) Which statement(s) is/are correct about how high-resource (HRL) vs. low-resource 1 point
languages (LRL) affect model training?
LRLs typically have higher performance metrics due to smaller population sizes.
HRLs get more data, so the model might overfit to HRL cultural perspectives.
LRLs are often under-represented, leading to potential underestimation of their cultural
nuances.
The dominance of HRLs can cause a reinforcing cycle that perpetuates imbalance.
[Link] 3/4
10/28/25, 1:46 PM Introduction to Large Language Models (LLMs) - - Unit 14 - Week 12
9) Within the StereoSet framework, the icat metric specifically refers to: 1 point
10) Bias due to improper selection of training data typically arises in LLMs when: 1 point
Data are selected exclusively from curated, balanced sources with equal representation
The language model sees only real-time social media feeds without any historical texts
The training corpus over-represents some topics or groups, creating a skewed distribution
All data are automatically filtered to remove any demographic markers
[Link] 4/4
The Markov assumption allows n-gram models to assume that the probability of a word given its predecessors depends only on the most recent predecessor(s). This assumption simplifies the computation by reducing the dependence from the entire history to a fixed number of preceding words, typically two in the case of trigrams .
Positional encoding is introduced to indicate the position of tokens because transformers process sequences in parallel rather than sequentially. By adding unique positional information to each token embedding, the model can distinguish and utilize the order of tokens, which is crucial for capturing the structural relationship of the sequence .
Multi-head attention allows the transformer to focus on different positions within the input sequence simultaneously. Each head processes the input in parallel, capturing multiple relationships and enabling the model to gain a richer understanding of the sequence. This parallel processing improves the model's ability to represent the input context, thus enhancing its overall interpretability and performance .
The feedforward network introduces non-linearity between attention layers in a transformer. This non-linearity allows the model to transform inputs through complex functions and adds depth, enabling more sophisticated pattern recognition and learning capabilities, which improves the overall performance of the model .
Negative sampling addresses the computational challenge of the large denominator in the softmax function, which sums over all entities in the knowledge graph, making it computationally expensive. By sampling a small number of negative examples, it reduces the computational burden significantly while maintaining the quality of training .
The dot product is used to compute attention scores because it efficiently measures the similarity between vectors, which correlates to relevance in transformers and other attention-based models. By scaling the result, it helps to control gradient behavior and captures the interactions across different layers, making it a crucial component in attention mechanisms .
Self-attention allows transformers to process input sequences by relating different positions of the same sequence to each other. Each token in the input sequence can attend to every other token and gather relevant information, enabling the model to capture long-range dependencies and context effectively .
Differentiable KGQA systems provide the advantage of being trainable end-to-end and do not require hand-coded logical forms for each question. They learn dense embeddings for both questions and the graph while using cross-attention mechanisms for alignment, providing a flexible and scalable method compared to the rigid logical-form execution .
Filtered evaluation improves fairness by removing from the ranked list any candidate facts that are known to be true from the train/dev sets before scoring a test query. This method ensures the model is fairly assessed for its ability to correctly rank new facts, thus enhancing precision in measures like Mean Reciprocal Rank (MRR) and Mean Average Precision (MAP).
Kneser-Ney smoothing is effective because it leverages the number of unique contexts a word appears in, making it more robust in estimating probabilities for infrequent words by distributing a calculated discount among all contexts the word appears in, unlike other techniques which might spread the probability equally across all words .