Neural Network–Based Language Modelling

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/26

flashcard set

Earn XP

Description and Tags

Vocabulary flashcards covering neural network-based language modeling, including representation pipelines, activation functions, loss functions, optimization, and evaluation metrics.

27 Terms

1
New cards

Unsmoothed N-gram Probability

A probability calculated strictly by counting word co-occurrences in a training corpus, which assigns a probability of 00 to any valid or plausible sequence that was never explicitly observed.

2
New cards

Vocabulary (VV)

The fixed list of unique words that a language model knows, where each token is assigned an arbitrary integer index.

3
New cards

Vocabulary ID

An arbitrary numerical index assigned to a word in the vocabulary that serves as an identifier without representing semantic meaning or word size.

4
New cards

One-Hot Vector

A sparse vector representation of length equal to vocabulary size (VV), containing a single 11 at the word's vocabulary ID and zeros at all other positions.

5
New cards

Word Embedding

A dense vector of real numbers with a chosen dimension (dd) representing a word, whose values are learned during training to share information across similar contexts.

6
New cards

Vector Concatenation

The operation of joining multiple word vectors end-to-end in order to create a single input vector, preserving sequence order without adding or averaging the coordinates.

7
New cards

Context Window

A specified, fixed number of preceding words that the neural network is permitted to see and use as input to predict the following word.

8
New cards

Target Word

The word immediately following the context window that the language model is tasked with predicting.

9
New cards

Activation Function

A mathematical function that transforms the calculated weighted sum and bias of a neuron into an output, enabling neural networks to learn nonlinear, complex relationships.

10
New cards

Sigmoid Function

An activation function defined as σ(z)=11+e−z\sigma(z) = \frac{1}{1 + e^{-z}} that squashes any real-valued score into a continuous value between 00 and 11.

11
New cards

Rectified Linear Unit (ReLU)

A nonlinear activation function defined as ReLU(z)=max⁡(0,z)\text{ReLU}(z) = \max(0, z), which outputs 00 for negative values and leaves positive values unchanged.

12
New cards

Hidden Layer

An intermediate layer of neurons located between the input layer and output layer that computes intermediate, nonlinear feature representations.

13
New cards

Forward Propagation

The step-by-step process of computing and passing numerical values through a neural network from the input layer through the hidden layers to the output layer.

14
New cards

Logits (Scores)

The raw, unnormalized numerical scores output by the final linear layer for every word in the vocabulary before probability normalization.

15
New cards

Softmax Function

A function that converts raw output scores into a normalized probability distribution across the entire vocabulary using the formula pi=exp⁡(zi)∑jexp⁡(zj)p_i = \frac{\exp(z_i)}{\sum_j \exp(z_j)}.

16
New cards

Greedy Choice

A decoding strategy that deterministically selects the word with the highest probability from the output distribution.

17
New cards

Sampling

A text generation method that selects the next word randomly according to the model's predicted probability distribution.

18
New cards

Cross-Entropy Loss

A loss metric defined as L=−ln⁡(p)L = -\ln(p), which measures how incorrect a prediction is by taking the negative natural logarithm of the probability (pp) assigned to the true target word.

19
New cards

Self-Supervised Learning

A training setup where learning targets are extracted automatically from raw text by using the next token as the ground-truth label without requiring human annotation.

20
New cards

Backpropagation

An algorithm that passes prediction error backward through the network layers to calculate the gradient of the loss with respect to each trainable parameter.

21
New cards

Gradient (gg)

A derivative value indicating how much and in what direction the loss function changes in response to a change in a given weight or parameter.

22
New cards

Gradient Descent

An optimization method that iteratively updates weights using the formula wnew=w−ηgw_{\text{new}} = w - \eta g to minimize the loss.

23
New cards

Learning Rate (η\eta)

A hyperparameter that controls the step size of parameter updates during optimization by scaling the gradient.

24
New cards

Epoch

One complete training cycle in which the neural network processes every example in the training dataset exactly once.

25
New cards

Overfitting

The condition where a model learns the training data excessively well but fails to generalize or improve performance on unseen validation data.

26
New cards

Perplexity

An evaluation metric for language models that measures surprise or uncertainty across held-out text, calculated as Perplexity=exp⁡(Mean loss)\text{Perplexity} = \exp(\text{Mean loss}), where lower values represent better predictions.

27
New cards

Fixed-Window Limit

An architectural constraint of feedforward neural language models where context is strictly capped at a fixed number of preceding words, leaving any earlier words invisible to the prediction.