TL;DR
This paper introduces Tensor Contraction Layers (TCLs) and Tensor Regression Layers (TRLs) as new, end-to-end trainable components for deep neural networks. These layers preserve and leverage the inherent multilinear structure of activation tensors, replacing the problematic flattening and fully connected layers. This approach leads to significantly more compact models with comparable or improved accuracy, particularly for structured data like MRI.
What Problem Does This Paper Address?
Modern deep neural networks, especially Convolutional Neural Networks (CNNs), often process data that has a natural high-order tensor structure (e.g., images as 3D tensors, videos as 4D tensors). However, a common practice is to flatten these activation tensors into vectors before feeding them into fully connected layers. This flattening process discards valuable multilinear structure and requires a large number of parameters, making the models less efficient and potentially less effective at capturing complex relationships in the data. The paper aims to address this by proposing methods that retain and utilize this tensor structure throughout the network.
Methods
The core of this work lies in two novel layer types:
- Tensor Contraction Layers (TCLs): These layers reduce the dimensionality of input tensors while preserving their multilinear structure. They achieve this through tensor contraction, effectively learning projection factors that map the high-order activation tensor to a lower-dimensional "core" tensor. This is presented as a more efficient alternative to fully connected layers for dimensionality reduction, requiring fewer parameters and less computation.
- Tensor Regression Layers (TRLs): These layers are designed to map high-order activation tensors to output tensors (e.g., class labels or regression values) using a low-rank multilinear mapping. Instead of flattening, TRLs directly leverage the input tensor's structure. They express the regression weights as a low-rank tensor decomposition, which acts as a form of regularization and significantly reduces the number of parameters.
Both TCLs and TRLs are designed to be trainable end-to-end within a neural network using gradient backpropagation.
Datasets
The paper evaluates its proposed methods on the following datasets:
- ImageNet: Used for large-scale image classification tasks, demonstrating the effectiveness of TCLs and TRLs in standard CNN architectures like VGG and ResNet.
- UK Biobank Dataset: A large MRI dataset used for three specific prediction tasks: gender classification, body mass index (BMI) prediction, and age regression. This dataset is highlighted for its structured, multimodal nature, where preserving topological information is crucial.
Key Insights and Ideas
- Flattening is a bottleneck: The paper strongly argues that flattening activation tensors discards crucial multilinear information, which is a significant drawback in current deep learning architectures.
- Tensor structure is valuable: By preserving and leveraging the multilinear structure of activations, models can become more efficient (fewer parameters) and potentially more accurate, especially for data with inherent topological or multimodal properties.
- Low-rank constraints as regularization: Imposing low-rank constraints on TCLs (activations) and TRLs (regression weights) acts as a powerful form of regularization, leading to more compact and robust models that require less data to train.
- End-to-end trainability is key: The proposed TCLs and TRLs are not just theoretical constructs but are designed as differentiable layers that can be seamlessly integrated into existing deep learning frameworks and trained from scratch.
Key Results
- ImageNet Performance: When applied to VGG and ResNet architectures on ImageNet, TCLs and TRLs reduced the number of parameters by over 65% while maintaining or increasing accuracy compared to standard fully connected layers.
- MRI Data Superiority: On the UK Biobank MRI dataset, the proposed TRLs significantly outperformed baseline ResNet models with fully connected layers across three tasks (age regression, gender classification, BMI prediction). For instance, on age regression, the TRL achieved a Mean Absolute Error (MAE) of 2.70 years compared to the baseline's 2.96 years.
- Space Savings: The methods enable substantial space savings, with up to 80% reduction in parameters achievable with minimal impact on performance.
Limitations and Future Work
- Rank Selection: The rank of the TRL is an additional hyperparameter that needs to be tuned, although the paper suggests it's relatively easy to do in practice.
- Computational Overhead: While TCLs and TRLs reduce parameter count, tensor contractions can still be computationally intensive. The authors mention leveraging recent work on hardware acceleration for BLAS primitives to mitigate this.
- Future Directions: The authors plan to apply TCLs and TRLs to a wider range of network architectures and explore additional regularization terms for further improvements. They also aim to investigate how to further avoid computational overhead from transpositions in tensor contractions.
Summary updated