6. Representation Learning

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

1/52

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 9:33 AM on 6/12/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

53 Terms

1
New cards

What is the "Curse of Dimensionality" in unsupervised learning and how does it impact data metrics?

High-dimensional spaces lead to extreme data sparsity because the volume of the space scales exponentially. This makes traditional distance metrics (like Euclidean distance) less meaningful because all data points tend to become roughly equidistant from one another.

2
New cards

Map out the 4 "Classic Approaches" to handling large, high-dimensional datasets.

1. Numerosity reduction: Regression, Clustering.

2. Dimensionality reduction: Feature selection.

3. Feature transformation: Principal Component Analysis (PCA), Linear Discriminant Analysis (LDA), Independent Component Analysis (ICA).

4. Data compression: Autoencoders.

3
New cards

What is the algorithmic step-by-step process to perform Principal Component Analysis (PCA)?

1. Normalize data: Compute the mean vector x\mathbf{x} and center the data.

2. Compute Covariance: Generate the n×nn \times n covariance matrix.

3. Decompose Matrix: Calculate and sort eigenvalues (λ1λ2\lambda_1 \ge \lambda_2 \ge \dots) and their corresponding eigenvectors.

4. Select Subspace: Choose the top kk eigenvectors.

5. Project: Project the original data into the new kk-dimensional subspace.

4
New cards

Write out the full Covariance Matrix Equation (Σ\mathbf{\Sigma} ) and define its variables.

Σ=1N1n=1N(xnx)(xnx)T=1N1XTX\mathbf{\Sigma} = \frac{1}{N-1}\sum_{n=1}^{N}(\mathbf{x}_{n}-\overline{\mathbf{x}})(\mathbf{x}_{n}-\overline{\mathbf{x}})^{T} = \frac{1}{N-1}\mathbf{X}^{T}\mathbf{X}

  • xn\mathbf{x}_n: Individual high-dimensional data sample vector.

  • x\overline{\mathbf{x}}: Computed mean vector across all sample observations (x=1Nxn\overline{\mathbf{x}} = \frac{1}{N}\sum \mathbf{x}_n).

  • X\mathbf{X}: Mean-centered data matrix where rows correspond to individual observations.

5
New cards

Explain the core structural difference between how PCA and Factor Analysis define a "Latent Factor."

  • PCA: Describes a latent factor simply as a direct linear composite of the observed variables (projecting along axes of greatest variance).

  • Factor Analysis: Is a probabilistic measurement model that defines observed variables as continuous mixtures of latent factors, explicitly incorporating mean transformations (W\mathbf{W}), a prior, and unique sensor noise.

6
New cards

In the Probabilistic Factor Analysis framework, what is the assumed Prior Distribution of the latent factors z\mathbf{z}?

The latent factors z\mathbf{z} are assumed to follow a simple standard normal distribution, meaning they are mutually independent and zero-centered:

  • p(z)=N(z;0,I)p(\mathbf{z}) = \mathcal{N}(\mathbf{z}; \mathbf{0}, \mathbf{I})

7
New cards

Write the generation equation and the Conditional Likelihood function p(xz)p(\mathbf{x} \mid \mathbf{z}) for Factor Analysis.

Generation Equation: x=Wz+μ+ϵwhereϵN(0,Ψ)\mathbf{x} = \mathbf{W}\mathbf{z} + \boldsymbol{\mu} + \boldsymbol{\epsilon} \quad \text{where} \quad \boldsymbol{\epsilon} \sim \mathcal{N}(\mathbf{0}, \mathbf{\Psi})

  • (W\mathbf{W} is the factor loading matrix; Ψ\mathbf{\Psi} is a diagonal matrix containing unique feature variances).

Conditional Likelihood:

  • p(xz)=N(x;Wz+μ,Ψ)p(\mathbf{x} \mid \mathbf{z}) = \mathcal{N}(\mathbf{x}; \mathbf{W}\mathbf{z} + \boldsymbol{\mu}, \mathbf{\Psi})

8
New cards

What is the Marginal Distribution p(x)p(\mathbf{x}) in Factor Analysis obtained by integrating out the latent vector z\mathbf{z}?

p(x)=p(xz)p(z)dz=N(x;μ,WWT+Ψ)p(\mathbf{x}) = \int p(\mathbf{x} \mid \mathbf{z}) p(\mathbf{z}) d\mathbf{z} = \mathcal{N}(\mathbf{x}; \boldsymbol{\mu}, \mathbf{W}\mathbf{W}^T + \mathbf{\Psi})

This distribution serves as a foundation for deep generative models.

9
New cards

Why is Factor Analysis insufficient for data like the "Cocktail Party Effect," and how does Independent Component Analysis (ICA) resolve it?

Factor Analysis assumes Gaussian distributions, which cannot distinguish individual underlying source directions when waveforms are mixed together. ICA resolves this by explicitly modeling non-Gaussian continuous sources and learning a demixing matrix that minimizes mutual information between latent components.

10
New cards

How do high-dimensional and low-dimensional similarity metrics differ in t-SNE?

High-Dimensional Space: Computes the probability pjip_{j\mid i} that point xi\mathbf{x}_i picks xj\mathbf{x}_j as its neighbor under a localized Gaussian distribution.

  • Low-Dimensional Space: Maps coordinates yi\mathbf{y}_i and yj\mathbf{y}_j using a heavy-tailed Student-t distribution (1 degree of freedom) to compute the low-dimensional probability qijq_{ij}.

11
New cards

What is the Crowding Problem in dimensionality reduction and how does t-SNE's Student-t distribution fix it?

In high-dimensional spaces, volume scales exponentially. When projecting down to a 2D2\text{D} space, there isn't enough room to preserve moderate distances, causing points to clump into a dense, uninterpretable cluster. The heavy-tailed Student-t distribution allows moderate distances to be stretched out, separating distinct clusters during optimization.

12
New cards

Write out the reconstruction loss equations for a baseline Bottleneck Autoencoder versus an L1L_1 Regularized Sparse Autoencoder.

Bottleneck / Undercomplete AE:

LReconstruction(ϕ,θ)=1Ni=1Nxigθ(fϕ(xi))22\mathcal{L}_{\text{Reconstruction}}(\phi, \theta) = \frac{1}{N}\sum_{i=1}^{N} \|\mathbf{x}_i - g_\theta(f_\phi(\mathbf{x}_i))\|_2^2

L1L_1 Sparse AE:

LSparse=LReconstruction+λjzj\mathcal{L}_{\text{Sparse}} = \mathcal{L}_{\text{Reconstruction}} + \lambda \sum_{j} |z_j|

13
New cards

Write out the exact KL-Divergence penalty equation used to enforce activation sparsity in a Sparse Autoencoder.

jKL(ρρ^j)=j(ρlogρρ^j+(1ρ)log1ρ1ρ^j)\sum_{j} \text{KL}(\rho \parallel \hat{\rho}_j) = \sum_{j} \left( \rho \log \frac{\rho}{\hat{\rho}_j} + (1-\rho) \log \frac{1-\rho}{1-\hat{\rho}_j} \right)

Where ρ\rho is the tiny target activation probability and ρ^j\hat{\rho}_j is the average activation of neuron jj over the minibatch.

14
New cards

How do advanced architectures like SegNet or U-Net handle hidden representations differently than standard bottleneck autoencoders?

Instead of forcing all information strictly through a single central low-dimensional bottleneck, they use skip connections or pooling indices to link encoder-decoder pairs. This allows latent representations to form across multiple hierarchical levels, which is highly effective for preservation tasks like image segmentation.

15
New cards

Define the Manifold Hypothesis and explain how neural networks utilize it.

The hypothesis states that most naturally occurring high-dimensional data (e.g., 784D MNIST digits) lies on a much lower-dimensional manifold embedded within that space. Neural networks use hidden layers to learn non-linear coordinate transformations that untangle these overlapping manifolds, rendering features linearly separable.

16
New cards

Contrast Distributed Representations with localist ("one-hot") encodings.

Localist encodings assign one concept strictly to one neuron (like a sparse one-hot vector). A distributed representation uses a many-to-many relationship where multiple features are active simultaneously; each neuron participates in representing many concepts, and each concept is expressed across many neurons.

17
New cards

What is Disentanglement in latent spaces and what are its key goals?

Disentanglement ensures that distinct, interpretable factors of variation (e.g., a face's hair color, angle, or smile) are cleanly separated along individual, isolated dimensions of the latent space. Key goals include smoothness, linearity, compositionality, coherence, and hierarchical organization.

18
New cards

Compare the architectures of CBOW and Skip-gram in Word2Vec.

Continuous Bag-of-Words (CBOW): Predicts a missing central target word (wtw_t) given its surrounding context words. It averages the context vectors, making it faster to train and highly accurate for frequent words.

  • Skip-gram: Predicts the surrounding context words given a single central target word. It weights closer context words heavier, excels with small datasets, and handles rare words exceptionally well.

19
New cards

What design problem with Skip-gram led to the creation of GloVe (Global Vectors)?

Skip-gram requires an explicit cross-entropy normalization over the entire vocabulary (V\mathcal{V}) to compute probabilities, which is incredibly expensive. GloVe solves this by training unsupervised directly on global word-word co-occurrence matrix statistics (XX), minimizing a robust squared loss function that completely avoids vocabulary-wide normalization steps.

20
New cards

What is an Autoencoder (AE) and what is its primary objective?

An autoencoder is a neural network trained to replicate its input to its output through a low-dimensional bottleneck layer. Its core goal is data compression and unsupervised feature learning.

21
New cards

What are the components, mappings, and reconstruction function of a basic Autoencoder?

Encoder (fef_e): Maps input to a latent representation, xzx \to z.

  • Decoder (fdf_d): Maps the latent representation back to an input reconstruction, zx^z \to \hat{x}.

  • Reconstruction Function:

    • r(x)=fd(fe(x))r(x) = f_d(f_e(x))

22
New cards

Compare the two main loss functions used in the baseline Autoencoder framework.

  • Squared Reconstruction Error:

L(θ)=r(x)x22L(\theta) = \|r(x) - x\|_2^2

  • Probabilistic/Generative Framework:

    L(θ)=logp(xr(x))L(\theta) = -\log p(x|r(x))

23
New cards

What is the degenerate "identity solution" in Autoencoders, and how do Undercomplete representations prevent it?

If hidden layers are too wide, the network will simply memorize the data and learn the identity function (r(x)=xr(x) = x).

An Undercomplete representation forces the latent dimension (LL) to be strictly smaller than the input dimension (DD), creating a narrow bottleneck that compels the network to capture only the most meaningful patterns.

24
New cards

How does an Overcomplete Autoencoder representation function without collapsing into a trivial identity mapping?

In an Overcomplete Autoencoder, the latent dimension is larger than the input (LDL \gg D). To prevent simple memorization, explicit regularization is imposed—such as adding noise to inputs, forcing activation sparsity, or penalizing derivatives.

25
New cards

What is a Linear Bottleneck Autoencoder mathematically equivalent to, and why?

It is mathematically equivalent to Principal Component Analysis (PCA).

If the encoder (z=W1xz = W_1x) and decoder (x^=W2z\hat{x} = W_2z) use strictly linear mappings and minimize squared reconstruction error, the model acts as an orthogonal projection onto the first LL eigenvectors of the data's empirical covariance matrix.

26
New cards

Why do Convolutional (CNN) architectures typically outperform Multi-Layer Perceptrons (MLPs) on image reconstruction tasks (e.g., Fashion MNIST)?

MLPs flatten images into 1D vectors, destroying structural layout. CNN architectures utilize localized kernels and weight sharing, which explicitly preserves spatial structural information.

27
New cards

Describe the training mechanism of a Denoising Autoencoder (DAE).

Instead of reconstructing a clean input, a DAE is fed a corrupted input x~\tilde{x} (distorted via Gaussian noise or Bernoulli dropout) and is trained to output the original, uncorrupted version xx. This forces the network to learn manifold structures to "hallucinate" missing details.

28
New cards

What mathematical vector field is approximated by a Denoising Autoencoder (DAE) as noise variance approaches zero (σ0\sigma \to 0)?

he residual error e(x)=r(x~)xe(x) = r(\tilde{x}) - x approximates the score function (the gradient of the log data density):

e(x)xlogp(x)e(x) \approx \nabla_x \log p(x)

This creates a vector field where all vectors point directly toward higher-probability regions on the underlying data manifold.

29
New cards

How do Contractive Autoencoders (CAEs) force the network to be insensitive to small input variations?

By adding a penalty term based on the Frobenius norm of the encoder's Jacobian matrix:

Ω(z,x)=λfe(x)xF2=λkxhk(x)22\Omega(z, x) = \lambda \left\| \frac{\partial f_e(x)}{\partial x} \right\|_F^2 = \lambda \sum_k \|\nabla_x h_k(x)\|_2^2

This forces the encoder activations hk(x)h_k(x) to remain stable under minor perturbations of the input xx.

30
New cards

Why do Contractive Autoencoders (CAEs) utilize tied weights (Wd=WeTW_d = W_e^T), and what is their engineering drawback?

Tied Weights: Prevent a trivial solution where the encoder shrinks the input by an infinitesimally small ϵ\epsilon to satisfy the penalty while the decoder simply multiplies by 1/ϵ1/\epsilon.

  • Drawback: CAEs are computationally slow to train due to the high overhead of computing the Jacobian matrix at every step.

31
New cards

How do 1\ell_1 Regularization and KL Divergence penalties differ in how they enforce a Sparse Autoencoder architecture?

1\ell_1 Regularization (λz1\lambda\|z\|_1): Can be overly harsh, permanently turning many neurons completely off across all data samples.

  • KL Divergence Penalty: Compares average hidden unit activation $q_k$ across a minibatch to a tiny target probability pp (e.g., 0.1) via λkDKL(pqk)\lambda \sum_k D_{KL}(p \parallel q_k). This yields a dynamic, biological-like sparse firing pattern (~70% off on average) without creating completely dead neurons.

32
New cards

What are the probabilistic outputs of a VAE's Encoder and Decoder networks?

  • ncoder / Inference Network (qϕ(zx)q_\phi(z|x)): Outputs the parameters (mean μ\mu and diagonal covariance Σ\Sigma) of a Gaussian distribution: N(zfe,μ(x),diag(fe,σ(x)))\mathcal{N}(z|f_{e,\mu}(x), \text{diag}(f_{e,\sigma}(x))).

  • Decoder / Generative Model (pθ(xz)p_\theta(x|z)): Outputs a probability distribution over the input space, such as a Gaussian Likelihood for continuous data or a Bernoulli Likelihood for binary data.

33
New cards

What is Amortized Inference in the context of Variational Autoencoders?

It is the technique of using a single neural network (qϕq_\phi) to instantly predict and approximate the optimal latent distribution parameters for any given data sample, entirely replacing slow, iterative per-point optimization algorithms.

34
New cards

Write out the Evidence Lower Bound (ELBO) equation for VAEs and define what its two components measure.

L(θ,ϕx)=Eqϕ(zx)[logpθ(xz)]DKL(qϕ(zx)p(z))\mathcal{L}(\theta, \phi|x) = \mathbb{E}_{q_\phi(z|x)}[\log p_\theta(x|z)] - D_{KL}(q_\phi(z|x) \parallel p(z))

  • Term 1 (Expected Log-Likelihood): Measures reconstruction accuracy.

  • Term 2 (KL Divergence): Regularizes the network by forcing the approximate posterior qϕ(zx)q_\phi(z|x) to match a simple prior distribution, usually a standard Gaussian p(z)=N(0,I)p(z) = \mathcal{N}(0, I).

35
New cards

What is the closed-form equation for the KL Divergence term in a VAE when matching a Gaussian posterior to a standard Gaussian prior?

DKL(qp)=12k=1K(logσk2σk2μk2+1)D_{KL}(q \parallel p) = -\frac{1}{2} \sum_{k=1}^K \left( \log \sigma_k^2 - \sigma_k^2 - \mu_k^2 + 1 \right)

36
New cards

What is the Reparameterization Trick in VAEs and why is it mathematically required?

Gradients cannot backpropagate through a random sampling node (zqϕ(zx)z \sim q_\phi(z|x)). To bypass this, the trick isolates the stochasticity by shifting the random sample to an independent noise variable ϵN(0,I)\epsilon \sim \mathcal{N}(0, I), defining zz deterministically as:

z=μ+σϵz = \mu + \sigma \odot \epsilon

This allows gradients to flow smoothly back through the mean (μ\mu) and variance (σ\sigma) networks during backpropagation.

37
New cards

Compare Deterministic AEs and VAEs regarding Latent Space Mapping and Generative Ability.

  • Latent Space Mapping:

  • Deterministic AE: Maps an input directly to a discrete, fixed point vector (delta function).

  • VAE: Maps an input to a continuous probability distribution (Gaussian mean μ\mu and variance σ\sigma).

Generative Ability:

  • Deterministic AE: No generative capability. It cannot sample cleanly and has no mathematical framework for handling random latent inputs outside of its exact training points.

  • VAE: Yes, fully generative. You can easily sample random vectors from a standard Gaussian distribution $z \sim \mathcal{N}(0, I)$ and run them through the decoder to generate entirely new, synthetic data.

38
New cards

Compare Deterministic AEs and VAEs regarding Latent Space Topology and Latent Interpolation.

  • Latent Space Topology:

    • Deterministic AE: Often non-smooth and fragmented. Distinct classes can end up overlapping or containing empty "dead gaps" where the decoder fails.

    • VAE: Continual and locally smooth due to being forced to integrate with the standard Gaussian prior distribution.

  • Latent Interpolation:

    • Deterministic AE: Poorer transitions. Traveling between intermediate points often crosses unmapped or unrealistic regions, causing distorted outputs.

    • VAE: Seamless latent space interpolation. Moving along a line between points using $z = \lambda z_1 + (1-\lambda)z_2$ yields a smooth, continuous morphing between items.

39
New cards

In LSA, how does changing the local sliding window size (hh) change what type of linguistic information is captured?

  • Small windows (e.g., h=2h=2): Capture syntactic behavior (e.g., grouping words with similar grammatical roles, like matching "dog" with "cat").

  • Large windows (e.g., h=30h=30): Capture semantic/topical themes (e.g., matching "dog" with "kennel, bark, puppy").

40
New cards

Write the formulas for Pointwise Mutual Information (PMI) and Positive PMI (PPMI). Why is PPMI preferred over raw counts?

PMI(i,j)=logp(i,j)p(i)p(j)\text{PMI}(i, j) = \log \frac{p(i, j)}{p(i)p(j)}

PPMI(i,j)=max(PMI(i,j),0)\text{PPMI}(i, j) = \max(\text{PMI}(i, j), 0)

Raw co-occurrence counts perform poorly because they over-index frequent, uninformative words. PPMI isolates true context-word relationships and zeros out negative values, which are statistically unreliable in finite corpora.

41
New cards

Write out the low-rank Singular Value Decomposition (SVD) formula used in Latent Semantic Analysis (LSA) and define what represents the word vs. document embedding.

Cijk=1KuikskvkjC_{ij} \approx \sum_{k=1}^K u_{ik}s_k v_{kj}

  • Word embedding: Represented by the row vector uiu_i.

  • Document/Context embedding: Represented by svjs \odot v_j.

  • It minimizes the Frobenius norm error: minCC^F2\min \|C - \hat{C}\|_F^2.

42
New cards

State the core premise of the Distributional Hypothesis (Harris, 1954; Firth, 1957).

word is characterized by the company it keeps." Words are considered semantically similar if they consistently appear within similar contexts. Standard embedding models leverage this by learning mappings from a word’s local or global context to its vector representation.

43
New cards

Why do sparse one-hot vectors fail to represent semantic relationships between words? Give an example.

One-hot vectors treat all words as completely independent orthogonal categories. For example, the related pair ("man", "woman") and the entirely unrelated pair ("man", "banana") both yield an identical Hamming distance of 1, failing to capture semantic proximity.

44
New cards

Describe the objective and vector calculation mechanism of the Continuous Bag of Words (CBOW) model.

  • Goal: Predicts a target central word $w_t$ given its surrounding context window wtm:t+mw_{t-m : t+m}.

  • Mechanism: It averages the continuous embeddings of the surrounding context words into a single joint vector vtv_t:

    vt=12mh=1m(vwt+h+vwth)v_t = \frac{1}{2m} \sum_{h=1}^m (v_{w_{t+h}} + v_{w_{t-h}})

45
New cards

Write out the conditional distribution formula for Word2vec's Skip-gram model and explain why each word has two distinct vectors.

logp(wowc)=uoTvclogiVexp(uiTvc)\log p(w_o | w_c) = u_o^T v_c - \log \sum_{i \in V} \exp(u_i^T v_c)

Each word has two spaces to handle its active structural role: $v_i$ is used when the word acts as the central target word, and $u_i$ is used when it acts as a surrounding context word.

46
New cards

How does Skip-gram with Negative Sampling (SGNS) convert a multi-class problem into a binary classification task?

Evaluating a standard softmax requires computing a denominator over the entire vocabulary VV. SGNS converts this by treating true pairs (wt,wt+j)(w_t, w_{t+j}) as positive targets (D=1D=1) while drawing KK alternative "noise words" wkw_k from a custom unigram distribution and labeling them as negative ($$D=0$$).

47
New cards

Write out the mathematical objective function for Skip-gram with Negative Sampling (SGNS).

Objective: Maximize the probability of true pairs while minimizing noise pairs:

p(wt+jwt)=σ(uwt+jTvwt)k=1K[1σ(uwkTvwt)]p(w_{t+j} | w_t) = \sigma(u_{w_{t+j}}^T v_{w_t}) \prod_{k=1}^K \left[1 - \sigma(u_{w_k}^T v_{w_t})\right]

Where noise words are sampled from: p(w)freq(w)3/4p(w) \propto \text{freq}(w)^{3/4} to boost the chances of selecting rare words.

48
New cards

What is the final objective function of GloVe, and how is the final word representation calculated when training is complete?

Objective:

L=iVjVh(xij)(ujTvi+bi+cjlogxij)2L = \sum_{i \in V} \sum_{j \in V} h(x_{ij}) \left( u_j^T v_i + b_i + c_j - \log x_{ij} \right)^2

Where h(xij)=min(1,(xij/100)0.75)h(x_{ij}) = \min\left(1, (x_{ij}/100)^{0.75}\right) balances frequent words. The final word representation is computed by averaging its dual vector assignments:

vi+ui2\frac{v_i + u_i}{2}

49
New cards

Explain the mathematical framework used to solve linear word analogies (e.g., $a:b :: c:?$) in an embedding space.

To solve a:b::c:?a:b :: c:?, compute the direction vector δ=vbva\delta = v_b - v_a (which acts as a semantic transformation vector, like gender). The target vector vdv_d is calculated by shifting the vector cc along that same direction:

vdvc+(vbva)v_d \approx v_c + (v_b - v_a)

50
New cards

What underlying linguistic co-occurrence condition causes linear geometry and analogies to hold true in word vector spaces?

Linear geometry emerges because the underlying ratios of co-occurrence probabilities with arbitrary words $w$ remain stable across related semantic concepts:

p(wman)p(wwoman)p(wking)p(wqueen)\frac{p(w|\text{man})}{p(w|\text{woman})} \approx \frac{p(w|\text{king})}{p(w|\text{queen})}

51
New cards

What are the core assumptions of the RAND-WALK generative model (Arora et al., 2016)?

  1. Text generation is driven by a latent discourse vector ztRDz_t \in \mathbb{R}^D moving via a slow Gaussian random walk.

  2. Words are generated via a log-bilinear model: p(wzt)=exp(ztTvw)Z(zt)p(w|z_t) = \frac{\exp(z_t^T v_w)}{Z(z_t)}.

  3. High-dimensional properties of isotropic Gaussian priors cause the partition function Z(zt)ZZ(z_t) \approx Z to behave as a self-normalizing constant.

52
New cards

What is the major proof result of the RAND-WALK model concerning Word2vec and GloVe?

  • It proves that the mathematical Pointwise Mutual Information (PMI) of two words directly mirrors their low-dimensional vector dot product:

    PMI(w,w)vwTvwD\text{PMI}(w, w') \approx \frac{v_w^T v_{w'}}{D}

    This means minimizing Word2vec and GloVe objectives is mathematically equivalent to optimizing a frequency-weighted SVD factorization of the empirical PMI matrix.

53
New cards

What is the critical limitation of static word embeddings (LSA, Word2vec, GloVe), and how do Contextual Embeddings solve it?

Static embeddings assign a single, fixed vector to each word, making them unable to resolve polysemy or homonyms (e.g., "Apple computer" vs. "eating an apple" share the exact same vector).

Contextual word embeddings (e.g., Transformers) dynamically generate a word's vector representation as a function of its entire surrounding sentence.