[论文解读] Learning K-way D-dimensional Discrete Codes for Compact Embedding Representations
KD encoding 将标准的 one-hot 嵌入用 K-way D-dimensional 离散编码和代码组合网络替代,使端到端学习成为可能,在显著降低嵌入参数的同时,保持或提升任务性能。
Conventional embedding methods directly associate each symbol with a continuous embedding vector, which is equivalent to applying a linear transformation based on a "one-hot" encoding of the discrete symbols. Despite its simplicity, such approach yields the number of parameters that grows linearly with the vocabulary size and can lead to overfitting. In this work, we propose a much more compact K-way D-dimensional discrete encoding scheme to replace the "one-hot" encoding. In the proposed "KD encoding", each symbol is represented by a $D$-dimensional code with a cardinality of $K$, and the final symbol embedding vector is generated by composing the code embedding vectors. To end-to-end learn semantically meaningful codes, we derive a relaxed discrete optimization approach based on stochastic gradient descent, which can be generally applied to any differentiable computational graph with an embedding layer. In our experiments with various applications from natural language processing to graph convolutional networks, the total size of the embedding layer can be reduced up to 98\% while achieving similar or better performance.
研究动机与目标
- 激发紧凑的嵌入表示,以在大词汇表中减少参数量和过拟合。
- 提出一种 KD encoding 方案,用一个字母表大小为 K 的 D 维编码表示每个符号。
- 开发一个端到端学习框架,优化离散编码和代码组合嵌入函数。
- 提供对参数节省和在 NLP 及图卷积任务上的性能的理论与经验分析。
提出的方法
- 用一个 K-way D-dimensional 码 c_i = (c_i^1, ..., c_i^D) 表示每个符号,其中每个 c_i^j ∈ {1,...,K}。
- 使用一个编码分配函数 φ 将符号映射到编码,及一个可微分的代码组合函数 f 从编码生成嵌入。
- 为每个编码维度嵌入一个专用的编码嵌入矩阵 W^j ∈ R^{K×d'},并通过对编码嵌入向量的一个(可能线性或非线性)变换 f_e 来组合最终的符号嵌入。
- 通过调温 Softmax 提供离散编码的连续放松以实现基于 SGD 的学习;在推理阶段使用直通估计器来恢复离散编码。
- 引入基于熵的正则化和引导机制(在线蒸馏引导、预训练蒸馏引导)以稳定离散编码的端到端学习。
- 将线性 KD-code 组合与嵌入矩阵的稀疏二元低秩分解联系起来,并显示非线性组合会提高表达能力。
实验结果
研究问题
- RQ1一个 K-way D-dimensional 离散编码方案是否能够端到端学习出具有语义意义的符号嵌入?
- RQ2在不牺牲性能的前提下,使用 KD encoding 能将嵌入参数量和整个模型规模减少多少?
- RQ3在神经网络中训练离散编码的有效策略有哪些(如连续放松和引导等)?
- RQ4在 NLP 和图任务中,KD encoding 与低秩嵌入因式分解及其他基线相比有何差异?
主要发现
- KD encoding 可以在多任务中将嵌入层大小减少至最多 95-98%,同时实现相当或更好的性能。
- 结合连续放松和蒸馏引导的端到端编码学习,显著优于天真或随机/编码学习方法。
- 在语言建模和文本分类中,该方法以显著更少的嵌入参数和比特数实现相似或更好的人类困惑度(perplexity)/准确率。
- 在图卷积网络中,KD encoding 以显著更少的嵌入参数和总比特数实现有竞争力的准确率。
- 学习到的编码显示语义邻域结构,在合理的 K 与 D 选择下,相似词被映射到同一编码或相邻编码。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。