M1-013M1: Mathematics & Statistics FundamentalsInformation TheoryMedium
⚡Flashcard Drill➔Mastery:
Define Mutual Information (MI) and Pointwise Mutual Information (PMI), and Detail Their Practical ML Applications
📐 Mathematical Definition
⚡ One-Sentence Core Answer
PMI measures the co-occurrence association of specific outcomes, while Mutual Information is the expected PMI across all outcomes, quantifying total shared non-linear information.
📌 Key Takeaways
- •PMI: ; positive if co-occurring more often than random chance.
- •Mutual Information: .
- •Captures arbitrary non-linear dependencies, unlike linear Pearson correlation.
- •Key uses: feature selection, Word2Vec matrix factorization, and contrastive self-supervised learning (InfoNCE).
📐 Mathematical Derivations
From definition: . Decomposing: . Symmetrically, . If and are independent, . Furthermore, .
🏭 Production Trade-offs
Levy & Goldberg (2014) proved that Word2Vec SGNS implicitly factorizes a shifted Positive PMI (PPMI) matrix . In contrastive learning (CPC, CLIP), the InfoNCE loss minimizes a variational lower bound on mutual information . In feature selection, MI handles non-linear relationships that Pearson correlation misses, but estimating continuous high-dimensional MI requires non-trivial binning or neural estimators (MINE).
⚠️ Common Interview Pitfalls
- ✕PMI suffers from severe bias toward extremely low-frequency rare words (addressed by Normalized PMI or frequency exponents).
- ✕Using Pearson correlation when relationships are strongly non-linear (e.g., where but is large).
🎯 Interviewer Follow-up Inquiries
- ?How does the InfoNCE loss function establish a lower bound on mutual information?
- ?Why is high-dimensional mutual information estimation fundamentally prone to high sample variance?
⚡
Test muscle memory on this topic via 3-Layer Flashcards
Active Recall: Mentally formulate Prompt ➔ Math Derivation ➔ Benchmark Implementation in 3 minutes.
📚
Associated Knowledge Base Guides & Mindmaps
Explore the comprehensive technical article, exam cards, and global architecture tree.
中文速览与面试要点
解释互信息与点互信息(PMI),它们分别用在哪里?
互信息衡量两变量共享的信息量;PMI 是单点对的信息贡献,MI 是 PMI 的期望。
核心要点
- 互信息 I(X;Y)=KL(p(x,y)‖p(x)p(y)) 是'联合分布与独立分布的距离',因此 I=0 当且仅当严格独立——这比相关系数强得多,因为相关系数只捕捉线性依赖(例如 Y=X² 时相关系数为 0 但 MI>0)。把它展开即得 I(X;Y)=Σp(x,y)·PMI(x,y)=E[PMI],所以 PMI 是 MI 的逐点分解 :MI 是 PMI 的期望,PMI 描述单个点对贡献了多少信息。互信息的对称性来自 p(x,y) 的对称性,而非对称的 PMI 也可对称化为 PMI(x,y)+PMI(y,x)。
- 两大应用:① 词向量 ——word2vec 的 SGNS 目标在数学上等价于分解 PMI 矩阵(Levy & Goldberg 2014 的经典结论),GloVe 则显式拟合 log 共现计数;PMI 的优点是能凸显低频但强关联的词对(因为除以边缘概率),缺点是低频词对 PMI 方差极大,故实践用 PMI^k (乘以计数阈值)或 NPMI (除以 −log p(x,y) 归一化到 [−1,1]);② 特征选择与因果发现 ——MI 用于筛选与目标非线性相关的特征,也是因果发现(PC 算法)中条件独立检验的基础。高维 MI 估计是难点:分箱法偏差大,KSG(k-NN)估计器更常用但维数灾难严重,故实践中常改用 MINE(神经估计)或直接回归预测目标。
- MI=0 当且仅当独立
- PMI 是词向量(word2vec/GloVe)与词共现分析的基础
- 归一化 PMI(NPMI)便于跨频次比较
常见陷阱
- 用相关系数替代 MI 判断独立性(漏掉非线性依赖)
- 对低频词对直接使用 PMI(方差极大、不稳定)