A neural network consisting of piecewise affine building blocks, such as fully-connected layers and ReLU activations, is itself a piecewise affine function supported on a polyhedral complex. This complex has been previously studied to characterize theoretical properties of neural networks, but, in practice, extracting it remains a challenge due to its high combinatorial complexity. A natural idea described in previous works is to subdivide the regions via intersections with hyperplanes induced by each neuron. However, we argue that this view leads to computational redundancy. Instead of regions, we propose to subdivide edges, leading to a novel method for polyhedral complex extraction. A key to this are sign-vectors, which encode the combinatorial structure of the complex. Our approach allows to use standard tensor operations on a GPU, taking seconds for millions of cells on a consumer grade machine. Motivated by the growing interest in neural shape representation, we use the speed and differentiability of our method to optimize geometric properties of the complex. The code is available at https://github.com/arturs-berzins/relu_edge_subdivision .
翻译:由分段仿射构件(如全连接层和ReLU激活函数)组成的神经网络本身即为支撑于多面体复形上的分段仿射函数。该复形此前被用于刻画神经网络的理论特性,但在实践中,因其组合复杂度极高,提取该复形仍面临挑战。既有研究提出一种自然思路:通过每个神经元诱导的超平面与区域求交进行细分。然而我们认为该视角存在计算冗余。本文提出以边而非区域为基本单元进行分割,由此发展出多面体复形提取的新方法。该方法的关键在于使用符号向量编码复形的组合结构。本方案可利用GPU上的标准张量运算,在消费级设备上数秒内处理数百万个胞腔。受神经形状表征领域日益增长的研究兴趣驱动,我们利用该方法的速度与可微性优化复形的几何特性。代码见https://github.com/arturs-berzins/relu_edge_subdivision。