词嵌入的近无损二值化
Near-lossless Binarization of Word Embeddings
摘要:
词嵌入通常用作许多NLP模型的起点,以实现最先进的性能。然而,由于词汇量大,维数多,这些浮点表示在内存和计算方面都很昂贵,这使得它们不适合在低资源设备上使用。本文提出的方法将实值嵌入转换为二进制嵌入,同时保留语义信息,每个向量只需要128或256位。这导致小的内存占用和快速的向量操作。该模型基于自动编码器架构,该架构还允许从二进制向量重建原始向量。在语义相似度、文本分类和情感分析任务上的实验结果表明,词嵌入的二值化只会导致约2%的准确率损失,而向量大小减少了97%。此外,top-k基准测试表明,使用这些二进制向量比使用实值向量快30倍。
英文摘要:
Word embeddings are commonly used as a starting point in many NLP models to achieve state-of-the-art performances. However, with a large vocabulary and many dimensions, these floating-point representations are expensive both in terms of memory and calculations which makes them unsuitable for use on low-resource devices. The method proposed in this paper transforms real-valued embeddings into binary embeddings while preserving semantic information, requiring only 128 or 256 bits for each vector. This leads to a small memory footprint and fast vector operations. The model is based on an autoencoder architecture, which also allows to reconstruct original vectors from the binary ones. Experimental results on semantic similarity, text classification and sentiment analysis tasks show that the binarization of word embeddings only leads to a loss of ~2% in accuracy while vector size is reduced by 97%. Furthermore, a top-k benchmark demonstrates that using these binary vectors is 30 times faster than using real-valued vectors.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。