← Sunday School Curiculum
Version v1 • 55 minutes lecture

D1C1-002 Ecodim Lesson 3

Rigorous derivation of queries, keys, and values matrices, softmax normalization, and head concatenation projections.

Mathematical Formulation of Attention

Given an input sequence matrix $X in mathbb{R}^{N times d_{model}}$, we project into Queries ($Q$), Keys ($K$), and Values ($V$) via learnable parameter matrices $W_Q, W_K, W_V in mathbb{R}^{d_{model} times d_k}$:

Attention(Q, K, V) = softmax( (Q * K^T) / sqrt(d_k) ) * V

Multi-Head Mechanism

Rather than performing a single attention function with $d_{model}$-dimensional queries, keys, and values, it is beneficial to linearly project the queries, keys, and values $h$ times with distinct learned linear projections. This enables the model to jointly attend to information from different representation subspaces at different positions.

Academic Assessment & Evaluation

Lesson Knowledge Check & Quiz Evaluation

Passing Threshold: 70% Evaluation Dashboard →
Q1. What fundamental thermodynamic law governs energy conservation and transformation in physical systems?
Q2. In pedagogical curriculum design, what is the primary role of formative knowledge checks?
Q3. Upon achieving a passing score on curriculum evaluations, what formal credential is unlocked?
Results are recorded directly to your Academic Evaluation Dashboard.
← D1C1-001 Ecodim Lesson 1