hamilton product
Quaternion Self-Attention with Shared Scores
Yamauchi, Shogo, Nitta, Tohru, Tamori, Hideaki
Quaternion neural networks are parameter-efficient and model multidimensional dependencies by representing four related features as a single entity. However, existing quaternion self-attention computes component-wise scores and applies independent softmax operations to each component, which increases the computational cost and allows attention distributions to diverge across components. We propose a shared-score quaternion self-attention mechanism that computes a single real-valued score using the quaternion inner product and applies a shared attention distribution across all components. This reduces score-computation multiplications by 75% and the number of softmax operations from four to one. We prove that, when queries and keys are produced by quaternion linear projections that induce component pre-mixing, the component-wise and shared scores lie in the same interaction subspace, indicating that independent component-wise attention primarily re-parameterizes the same interactions rather than expanding the feature interaction space. In speech enhancement, our method reduces inference time by up to 44.3% on a GPU and 58.1% on a CPU while maintaining quality, with consistent trends across vision and natural language processing.
Reviews: Quaternion Knowledge Graph Embeddings
The paper attempts learn better entity and relation embeddings for knowledge graphs. In this regard, the authors employ quarternion algebra with Hamilton product, which is used as the scoring function for knowledge triplets. Hamilton product is asymmetric, which is claimed to be beneficial for modeling directed egdes in a knowledge graph. Further the paper outperforms many well established methods and the authors seem to have done an exhaustive set of experiments. However, all the reviewers are in consensus that motivation for the use of quarternions is not clear, e.g. the paper does a poor job in demonstrating how does more degrees of freedom in rotation help in learning better embedding.
Demystifying the Hypercomplex: Inductive Biases in Hypercomplex Deep Learning
Comminiello, Danilo, Grassucci, Eleonora, Mandic, Danilo P., Uncini, Aurelio
Hypercomplex algebras have recently been gaining prominence in the field of deep learning owing to the advantages of their division algebras over real vector spaces and their superior results when dealing with multidimensional signals in real-world 3D and 4D paradigms. This paper provides a foundational framework that serves as a roadmap for understanding why hypercomplex deep learning methods are so successful and how their potential can be exploited. Such a theoretical framework is described in terms of inductive bias, i.e., a collection of assumptions, properties, and constraints that are built into training algorithms to guide their learning process toward more efficient and accurate solutions. We show that it is possible to derive specific inductive biases in the hypercomplex domains, which extend complex numbers to encompass diverse numbers and data structures. These biases prove effective in managing the distinctive properties of these domains, as well as the complex structures of multidimensional and multimodal signals. This novel perspective for hypercomplex deep learning promises to both demystify this class of methods and clarify their potential, under a unifying framework, and in this way promotes hypercomplex models as viable alternatives to traditional real-valued deep learning for multidimensional signal processing.
Two-view Graph Neural Networks for Knowledge Graph Completion
Tong, Vinh, Nguyen, Dai Quoc, Phung, Dinh, Nguyen, Dat Quoc
To this end, we propose a new KG embedding model, named A knowledge graph (KG) is a network of entity nodes and WGE, to leverage GNNs to capture entity-focused graph structure relationship edges, which can be represented as a collection and relation-focused graph structure for KG completion. of triples in the form of (h, r, t), wherein each triple (h, r, In particular, WGE transforms a given KG into two views. The t) represents a relation r between a head entity h and a tail first view--a single undirected entity-focused graph--only entity t. Here, entities are real-world things or objects such includes entities as nodes to provide the entity neighborhood as music tracks, movies persons, organizations, places and the information. The second view--a single undirected relationfocused like, while each relation type determines a certain relationship graph--considers both entities and relations as nodes, between entities. KGs are used in a number of commercial applications, constructed from constraints (subjective relation, predicate e.g. in such search engines as Google, Microsoft's entity, objective relation), to attain the potential dependence Bing and Facebook's Graph search. They also are useful between two neighborhood relations. Then WGE introduces a resources for many natural language processing tasks such as new encoder module of adopting two vanilla GNNs directly co-reference resolution ([1], [2]), semantic parsing ([3], [4]) on these two graph views to better update entity and relation and question answering ([5], [6]). However, an issue is that embeddings, followed by the decoder module using a weighted KGs are often incomplete, i.e., missing a lot of valid triples score function. In summary, our contributions are as follows: [7].
Beyond Fully-Connected Layers with Quaternions: Parameterization of Hypercomplex Multiplications with $1/n$ Parameters
Zhang, Aston, Tay, Yi, Zhang, Shuai, Chan, Alvin, Luu, Anh Tuan, Hui, Siu Cheung, Fu, Jie
Recent works have demonstrated reasonable success of representation learning in hypercomplex space. Specifically, "fully-connected layers with Quaternions" (4D hypercomplex numbers), which replace real-valued matrix multiplications in fully-connected layers with Hamilton products of Quaternions, both enjoy parameter savings with only 1/4 learnable parameters and achieve comparable performance in various applications. However, one key caveat is that hypercomplex space only exists at very few predefined dimensions (4D, 8D, and 16D). This restricts the flexibility of models that leverage hypercomplex multiplications. To this end, we propose parameterizing hypercomplex multiplications, allowing models to learn multiplication rules from data regardless of whether such rules are predefined. As a result, our method not only subsumes the Hamilton product, but also learns to operate on any arbitrary nD hypercomplex space, providing more architectural flexibility using arbitrarily $1/n$ learnable parameters compared with the fully-connected layer counterpart. Experiments of applications to the LSTM and Transformer models on natural language inference, machine translation, text style transfer, and subject verb agreement demonstrate architectural flexibility and effectiveness of the proposed approach.
Quaternion Graph Neural Networks
Nguyen, Dai Quoc, Nguyen, Tu Dinh, Phung, Dinh
Recently, graph neural networks (GNNs) become a principal research direction to learn low-dimensional continuous embeddings of nodes and graphs to predict node and graph labels, respectively. However, Euclidean embeddings have high distortion when using GNNs to model complex graphs such as social networks. Furthermore, existing GNNs are not very efficient with the high number of model parameters when increasing the number of hidden layers. Therefore, we move beyond the Euclidean space to a hyper-complex vector space to improve graph representation quality and reduce the number of model parameters. To this end, we propose quaternion graph neural networks (QGNN) to generalize GCNs within the Quaternion space to learn quaternion embeddings for nodes and graphs. The Quaternion space, a hyper-complex vector space, provides highly meaningful computations through Hamilton product compared to the Euclidean and complex vector spaces. As a result, our QGNN can reduce the model size up to four times and enhance learning better graph representations. Experimental results show that the proposed QGNN produces state-of-the-art accuracies on a range of well-known benchmark datasets for three downstream tasks, including graph classification, semi-supervised node classification, and text (node) classification.
QuatRE: Relation-Aware Quaternions for Knowledge Graph Embeddings
Nguyen, Dai Quoc, Vu, Thanh, Nguyen, Tu Dinh, Phung, Dinh
We propose a simple and effective embedding model, named QuatRE, to learn quaternion embeddings for entities and relations in knowledge graphs. QuatRE aims to enhance correlations between head and tail entities given a relation within the Quaternion space with Hamilton product. QuatRE achieves this by associating each relation with two quaternion vectors which are used to rotate the quaternion embeddings of the head and tail entities, respectively. To obtain the triple score, QuatRE rotates the rotated embedding of the head entity using the normalized quaternion embedding of the relation, followed by a quaternion-inner product with the rotated embedding of the tail entity. Experimental results show that our QuatRE outperforms up-to-date embedding models on well-known benchmark datasets for knowledge graph completion.
Quaternion-Based Self-Attentive Long Short-Term User Preference Encoding for Recommendation
Tran, Thanh, You, Di, Lee, Kyumin
Quaternion space has brought several benefits over the traditional Euclidean space: Quaternions (i) consist of a real and three imaginary components, encouraging richer representations; (ii) utilize Hamilton product which better encodes the inter-latent interactions across multiple Quaternion components; and (iii) result in a model with smaller degrees of freedom and less prone to overfitting. Unfortunately, most of the current recommender systems rely on real-valued representations in Euclidean space to model either user's long-term or short-term interests. In this paper, we fully utilize Quaternion space to model both user's long-term and short-term preferences. We first propose a QUaternion-based self-Attentive Long term user Encoding (QUALE) to study the user's long-term intents. Then, we propose a QUaternion-based self-Attentive Short term user Encoding (QUASE) to learn the user's short-term interests. To enhance our models' capability, we propose to fuse QUALE and QUASE into one model, namely QUALSE, by using a Quaternion-based gating mechanism. We further develop Quaternion-based Adversarial learning along with the Bayesian Personalized Ranking (QABPR) to improve our model's robustness. Extensive experiments on six real-world datasets show that our fused QUALSE model outperformed 11 state-of-the-art baselines, improving 8.43% at HIT@1 and 10.27% at NDCG@1 on average compared with the best baseline.