arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2010.04290cs.LGstat.ML
收藏

深度学习满足投影聚类

Deep Learning Meets Projective Clustering

University of Haifa(海法大学);CSAIL, MIT(麻省理工学院计算机科学与人工智能实验室)

Alaa Maalouf, Harry Lang, Daniela Rus, Dan Feldman

摘要:

压缩NLP网络的常见方法是将嵌入层编码为矩阵$A\in\mathbb{R}^{n\times d}$,通过SVD计算其秩- $j$近似$A_j$,然后将$A_j$分解为对应于较小全连接层的一对矩阵以替换原始嵌入层。在几何上,$A$的行表示$\mathbb{R}^d$中的点,$A_j$的行表示它们在$j$维子空间上的投影,该投影使到这些点的平方距离之和(“误差”)最小.实际上,$A$的这些行可能分布在$k>1$子空间周围,因此基于单个子空间分解$A$可能导致大的错误,从而导致准确度大幅下降。受计算几何中的\emph{projective clustering}的启发,我们建议用一组$k$子空间来代替这个子空间,每个$j$的维度使每个点($A$中的行)到其\emph{closest}子空间的平方距离之和最小化。基于这种方法,我们提供了一种新的架构,它取代了原来的嵌入层的一组$k$小层,并行操作,然后与一个单一的全连接层重组。在GLUE基准网络上进行的大量实验结果表明,与标准矩阵分解(SVD)相比,GLUE基准网络更准确,更小。例如,我们通过将嵌入层的大小减小$40\%$来进一步压缩DistilBERT,同时与使用现有SVD方法的$2.8\%$下降相比,在所有九个GLUE任务上仅导致$0.5\%$平均准确度下降。在RoBERTa上,我们实现了嵌入层的$43\%$压缩,与之前的$3\%$下降相比,其精度下降小于$0.8\%$平均下降。提供了用于复制和扩展我们的结果的开放代码。

英文摘要:

A common approach for compressing NLP networks is to encode the embedding layer as a matrix $A\in\mathbb{R}^{n\times d}$, compute its rank-$j$ approximation $A_j$ via SVD, and then factor $A_j$ into a pair of matrices that correspond to smaller fully-connected layers to replace the original embedding layer. Geometrically, the rows of $A$ represent points in $\mathbb{R}^d$, and the rows of $A_j$ represent their projections onto the $j$-dimensional subspace that minimizes the sum of squared distances ("errors") to the points. In practice, these rows of $A$ may be spread around $k>1$ subspaces, so factoring $A$ based on a single subspace may lead to large errors that turn into large drops in accuracy. Inspired by \emph{projective clustering} from computational geometry, we suggest replacing this subspace by a set of $k$ subspaces, each of dimension $j$, that minimizes the sum of squared distances over every point (row in $A$) to its \emph{closest} subspace. Based on this approach, we provide a novel architecture that replaces the original embedding layer by a set of $k$ small layers that operate in parallel and are then recombined with a single fully-connected layer. Extensive experimental results on the GLUE benchmark yield networks that are both more accurate and smaller compared to the standard matrix factorization (SVD). For example, we further compress DistilBERT by reducing the size of the embedding layer by $40\%$ while incurring only a $0.5\%$ average drop in accuracy over all nine GLUE tasks, compared to a $2.8\%$ drop using the existing SVD approach. On RoBERTa we achieve $43\%$ compression of the embedding layer with less than a $0.8\%$ average drop in accuracy as compared to a $3\%$ drop previously. Open code for reproducing and extending our results is provided.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑