♎
Limited AI
  • Machine Learning
    • Linear Model Cheating Sheet
    • Nonlinear Model Cheating Sheet
    • General Linear Model 1
    • General Linear Model 2
    • General Linear Model 3
    • Tree Based Methods
    • Tree Based Methods Supplement
    • XG,Cat,Light__Boosting
    • KNN&PCA
    • Model Performance
    • Model Evaluation
    • Code Practice
      • KNN
      • Decision Tree Python Code
    • Data and Feature Engineering
      • Handle Bias Data
      • Cold Start Problem
  • Deep Learning
    • Summary v2
    • Basic Neural Network
      • From Linear to Deep
      • Perceptron and Activation Function
      • NN network Details
      • Backpropagation Details
      • Gradient Vanishing vs Gradient Exploding
    • Basic CNN
      • Why CNN
      • Filter/ Convolution Kernel and Its Operation
      • Padding& Stride
      • Layers
      • Extra:From Fully Connected Layers to Convolutions
      • Extra: Multiple Input and Multiple Output Channels
    • Advance CNN
      • Convolutional Neural Networks(LeNet)
      • Deep Convolution Neural Networks(AlexNet)
      • Networks Using Blocks (VGG)
      • Network in Network(NiN)
      • Multi-Branch Networks(GoogLeNet&I mageNet)
      • Residual Networks(ResNet) and ResNeXt
      • Densely Connected Networks(DenseNet)
      • Batch Normalization
    • Basic RNN
      • Seq Model
      • Raw Text to Seq
      • Language Models
      • Recurrent Neural Networks(RNN)
      • Backpropagation Through Time
    • Advance RNN
      • Gated Recurrent Units(GRU)
      • Long Short-Term Memory(LSTM)
      • Bidirectional Recurrent Neural Networks(BRNN)
      • Encoder-Decoder Architecture
      • Seuqence to Sequence Learning(Seq2Seq)
    • Attention Mechanisms and Transformers
      • Queries, Keys, and Values
      • Attention is all you need
        • Attention and Kernel
        • Attention Scoring Functions
        • The Bahdanau Attention Mechanism
        • Multi-Head Attention
        • Self-Attention
        • Attention的实现
      • The Transformer Architecture
        • Extra Reading
        • 最短的最大路径长度
      • Large-Scaling Pretraning with Transformers
        • BERT vs OpenAI GPT vs ELMo
        • Decoder Model框架
        • Bert vs XLNet
        • T5& GPT& Bert比较
        • 编码器-解码器架构 vs GPT 模型
        • Encoder vs Decoder Reference
      • Transformers for Vision
      • Transformer for Multiomodal
    • NLP Pretraining
      • Word Embedding(word2vec)
        • Extra Reading
      • Approximate Training
      • Word Embedding with Global Vectors(GloVe)
        • Extra Reading
        • Supplement
      • Encoder(BERT)
        • BERT
        • Extra Reading
      • Decoder(GPT&XLNet&Lamma)
        • GPT
        • XLNet
          • XLNet架构
          • XLNet特点与其他比较
      • Encoder-Decoder(BART& T5)
        • BART
        • T5
  • GenAI
    • Introduction
      • GenAI Paper Must Read
      • GenAI六个阶段
    • Language Models Pre-training
      • Encoder-Decoder Architecture
      • Encoder Deep Dive
      • Decoder Deep Dive
      • Encoder VS Decoder
      • Attention Mechanism
      • Transformers
    • Example: Llama 3 8B架构
    • Fine-Tuning Generation Models
    • RAG and Adavance RAG
    • AI Agent
  • Statistics and Optimization
    • A/B testing
    • Sampling/ABtesting/GradientMethod
    • Gradient Decent Deep Dive
  • Machine Learning System Design
    • Extra Reading
    • Introduction
  • Responsible AI
    • AI Risk and Uncertainty
      • What is AI risk
      • General Intro for Uncertainty Quantification
      • Calibration
      • Conformal Prediction
        • Review the linear regression
        • Exchangeability
        • Split Conformal Prediction
        • Conformalized Quantile Regression
        • Beyond marginal coverage
        • Split Conformal Classification
        • Full Conformal Coverage
        • Cross-Validation +
        • Conformal Histgram Regression
    • xAI
      • SHAP value
  • Extra Research
    • Paper Reading
    • Reference
Powered by GitBook
On this page
  1. Deep Learning
  2. NLP Pretraining
  3. Word Embedding with Global Vectors(GloVe)

Supplement

问GloVe和n-gram word embedding是隶属的关系吗?

GloVe 和 n-gram word embedding 并不是隶属关系,而是两种不同的词嵌入方法,尽管它们都用于将词汇表示为稠密向量。

GloVe(Global Vectors for Word Representation)

GloVe 是一种全局共现矩阵的词嵌入方法,基于整个语料库中词与词共现的统计信息。它通过构建词与词共现的矩阵,并利用这些统计信息进行词向量学习。具体来说,GloVe 方法通过最小化词向量的损失函数来捕捉词与词之间的共现关系。这种方法可以通过全局语料库生成稠密的词向量,保持语义关系的良好特性。

GloVe 的主要思想是,词与词之间的共现概率能够揭示它们的语义关系。如果两个词在大量上下文中共现,它们的词向量距离会较近。因此,GloVe 注重全局统计特性,不依赖局部上下文。

n-gram Word Embedding

n-gram 是一种基于局部上下文的词嵌入方法,主要捕捉短距离的词序列(n-gram 是指长度为 n 的词序列,n 可以是 1、2、3 等)。在语言建模或词嵌入中,n-gram 主要用于捕捉词与其上下文之间的依赖关系。

n-gram 嵌入方法可能会通过考虑 n 个词的组合来生成嵌入向量,特别适用于局部上下文建模。它常见于 Skip-gram 或 Continuous Bag of Words (CBOW) 等模型中,这些模型是基于上下文窗口来预测中心词或上下文词的。

区别

  • GloVe 基于全局共现矩阵,利用整个语料库的词共现信息生成词嵌入。

  • n-gram Word Embedding 通常是基于局部上下文窗口,通过学习 n-gram 词序列的局部依赖关系来生成嵌入。

因此,二者并不是隶属关系,而是从不同角度建模词汇的语义关系。

PreviousExtra ReadingNextEncoder(BERT)

Last updated 8 months ago