Existing attention mechanisms either attend to local image grid or object level features for Visual Question Answering (VQA). Motivated by the observation that questions can relate to both object instances and their parts, we propose a novel attention mechanism that jointly considers reciprocal relationships between the two levels of visual details. The bottom-up attention thus generated is further coalesced with the top-down information to only focus on the scene elements that are most relevant to a given question. Our design hierarchically fuses multi-modal information i.e., language, object- and gird-level features, through an efficient tensor decomposition scheme. The proposed model improves the state-of-the-art single model performances from 67.9% to 68.2% on VQAv1 and from 65.7% to 67.4% on VQAv2, demonstrating a significant boost.
Recurrent Neural Networks (RNNs) are powerful sequence modeling tools. However, when dealing with high dimensional inputs, the training of RNNs becomes computational expensive due to the large number of model parameters. This hinders RNNs from solving many important computer vision tasks, such as Action Recognition in Videos and Image Captioning. To overcome this problem, we propose a compact and flexible structure, namely Block-Term tensor decomposition, which greatly reduces the parameters of RNNs and improves their training efficiency. Compared with alternative low-rank approximations, such as tensor-train RNN (TT-RNN), our method, Block-Term RNN (BT-RNN), is not only more concise (when using the same rank), but also able to attain a better approximation to the original RNNs with much fewer parameters. On three challenging tasks, including Action Recognition in Videos, Image Captioning and Image Generation, BT-RNN outperforms TT-RNN and the standard RNN in terms of both prediction accuracy and convergence rate. Specifically, BT-LSTM utilizes 17,388 times fewer parameters than the standard LSTM to achieve an accuracy improvement over 15.6\% in the Action Recognition task on the UCF11 dataset.
Boolean tensor decomposition approximates data of multi-way binary relationships as product of interpretable low-rank binary factors, following the rules of Boolean algebra. Here, we present its first probabilistic treatment. We facilitate scalable sampling-based posterior inference by exploitation of the combinatorial structure of the factor conditionals. Maximum a posteriori decompositions feature higher accuracies than existing techniques throughout a wide range of simulated conditions. Moreover, the probabilistic approach facilitates the treatment of missing data and enables model selection with much greater accuracy. We investigate three real-world data-sets. First, temporal interaction networks in a hospital ward and behavioural data of university students demonstrate the inference of instructive latent patterns. Next, we decompose a tensor with more than 10 billion data points, indicating relations of gene expression in cancer patients. Not only does this demonstrate scalability, it also provides an entirely novel perspective on relational properties of continuous data and, in the present example, on the molecular heterogeneity of cancer. Our implementation is available on GitHub: https://github.com/TammoR/LogicalFactorisationMachines.
In this paper we study the problem of learning the weights of a deep convolutional neural network. We consider a network where convolutions are carried out over non-overlapping patches with a single kernel in each layer. We develop an algorithm for simultaneously learning all the kernels from the training data. Our approach dubbed Deep Tensor Decomposition (DeepTD) is based on a rank-1 tensor decomposition. We theoretically investigate DeepTD under a realizable model for the training data where the inputs are chosen i.i.d. from a Gaussian distribution and the labels are generated according to planted convolutional kernels. We show that DeepTD is data-efficient and provably works as soon as the sample size exceeds the total number of convolutional weights in the network. We carry out a variety of numerical experiments to investigate the effectiveness of DeepTD and verify our theoretical findings.
The investment on the stock market is prone to be affected by the Internet. For the purpose of improving the prediction accuracy, we propose a multi-task stock prediction model that not only considers the stock correlations but also supports multi-source data fusion. Our proposed model first utilizes tensor to integrate the multi-sourced data, including financial Web news, investors' sentiments extracted from the social network and some quantitative data on stocks. In this way, the intrinsic relationships among different information sources can be captured, and meanwhile, multi-sourced information can be complemented to solve the data sparsity problem. Secondly, we propose an improved sub-mode coordinate algorithm (SMC). SMC is based on the stock similarity, aiming to reduce the variance of their subspace in each dimension produced by the tensor decomposition. The algorithm is able to improve the quality of the input features, and thus improves the prediction accuracy. And the paper utilizes the Long Short-Term Memory (LSTM) neural network model to predict the stock fluctuation trends. Finally, the experiments on 78 A-share stocks in CSI 100 and thirteen popular HK stocks in the year 2015 and 2016 are conducted. The results demonstrate the improvement on the prediction accuracy and the effectiveness of the proposed model.
In low-rank tensor completion tasks, due to the underlying multiple large-scale singular value decomposition (SVD) operations and rank selection problem of the traditional methods, they suffer from high computational cost and high sensitivity of model complexity. In this paper, taking advantages of high compressibility of the recently proposed tensor ring (TR) decomposition, we propose a new model for tensor completion problem. This is achieved through introducing convex surrogates of tensor low-rank assumption on latent tensor ring factors, which makes it possible for the Schatten norm regularization based models to be solved at much smaller scale. We propose two algorithms which apply different structured Schatten norms on tensor ring factors respectively. By the alternating direction method of multipliers (ADMM) scheme, the tensor ring factors and the predicted tensor can be optimized simultaneously. The experiments on synthetic data and real-world data show the high performance and efficiency of the proposed approach.
Exact recovery of tensor decomposition (TD) methods is a desirable property in both unsupervised learning and scientific data analysis. The numerical defects of TD methods, however, limit their practical applications on real-world data. As an alternative, convex tensor decomposition (CTD) was proposed to alleviate these problems, but its exact-recovery property is not properly addressed so far. To this end, we focus on latent convex tensor decomposition (LCTD), a practically widely-used CTD model, and rigorously prove a sufficient condition for its exact-recovery property. Furthermore, we show that such property can be also achieved by a more general model than LCTD. In the new model, we generalize the classic tensor (un-)folding into reshuffling operation, a more flexible mapping to relocate the entries of the matrix into a tensor. Armed with the reshuffling operations and exact-recovery property, we explore a totally novel application for (generalized) LCTD, i.e., image steganography. Experimental results on synthetic data validate our theory, and results on image steganography show that our method outperforms the state-of-the-art methods.
Prepositions are among the most frequent words in English and play complex roles in the syntax and semantics of sentences. Not surprisingly, they pose well-known difficulties in automatic processing of sentences (prepositional attachment ambiguities and idiosyncratic uses in phrases). Existing methods on preposition representation treat prepositions no different from content words (e.g., word2vec and GloVe). In addition, recent studies aiming at solving prepositional attachment and preposition selection problems depend heavily on external linguistic resources and use dataset-specific word representations. In this paper we use word-triple counts (one of the triples being a preposition) to capture a preposition's interaction with its attachment and complement. We then derive preposition embeddings via tensor decomposition on a large unlabeled corpus. We reveal a new geometry involving Hadamard products and empirically demonstrate its utility in paraphrasing phrasal verbs. Furthermore, our preposition embeddings are used as simple features in two challenging downstream tasks: preposition selection and prepositional attachment disambiguation. We achieve results comparable to or better than the state-of-the-art on multiple standardized datasets.
We propose tensorial neural networks (TNNs), a generalization of existing neural networks by extending tensor operations on low order operands to those on high order ones. The problem of parameter learning is challenging, as it corresponds to hierarchical nonlinear tensor decomposition. We propose to solve the learning problem using stochastic gradient descent by deriving nontrivial backpropagation rules in generalized tensor algebra we introduce. Our proposed TNNs has three advantages over existing neural networks: (1) TNNs naturally apply to high order input object and thus preserve the multi-dimensional structure in the input, as there is no need to flatten the data. (2) TNNs interpret designs of existing neural network architectures. (3) Mapping a neural network to TNNs with the same expressive power results in a TNN of fewer parameters. TNN based compression of neural network improves existing low-rank approximation based compression methods as TNNs exploit two other types of invariant structures, periodicity and modulation, in addition to the low rankness. Experiments on LeNet-5 (MNIST), ResNet-32 (CIFAR10) and ResNet-50 (ImageNet) demonstrate that our TNN based compression outperforms (5% test accuracy improvement universally on CIFAR10) the state-of-the-art low-rank approximation based compression methods under the same compression rate, besides achieving orders of magnitude faster convergence rates due to the efficiency of TNNs.
Tensor CANDECOMP/PARAFAC (CP) decomposition is an important tool that solves a wide class of machine learning problems. Existing popular approaches recover components one by one, not necessarily in the order of larger components first. Recently developed simultaneous power method obtains only a high probability recovery of top $r$ components even when the observed tensor is noiseless. We propose a Slicing Initialized Alternating Subspace Iteration (s-ASI) method that is guaranteed to recover top $r$ components ($\epsilon$-close) simultaneously for (a)symmetric tensors almost surely under the noiseless case (with high probability for a bounded noise) using $O(\log(\log \frac{1}{\epsilon}))$ steps of tensor subspace iterations. Our s-ASI method introduces a Slice-Based Initialization that runs $O(1/\log(\frac{\lambda_r}{\lambda_{r+1}}))$ steps of matrix subspace iterations, where $\lambda_r$ denotes the r-th top singular value of the tensor. We are the first to provide a theoretical guarantee on simultaneous orthogonal asymmetric tensor decomposition. Under the noiseless case, we are the first to provide an \emph{almost sure} theoretical guarantee on simultaneous orthogonal tensor decomposition. When tensor is noisy, our algorithm for asymmetric tensor is robust to noise smaller than $\min\{O(\frac{(\lambda_r - \lambda_{r+1})\epsilon}{\sqrt{r}}), O(\delta_0\frac{\lambda_r -\lambda_{r+1}}{\sqrt{d}})\}$, where $\delta_0$ is a small constant proportional to the probability of bad initializations in the noisy setting.
Anomaly Detection has several important applications. In this paper, our focus is on detecting anomalies in seller-reviewer data using tensor decomposition. While tensor-decomposition is mostly unsupervised, we formulate Bayesian semi-supervised tensor decomposition to take advantage of sparse labeled data. In addition, we use Polya-Gamma data augmentation for the semi-supervised Bayesian tensor decomposition. Finally, we show that the P\'olya-Gamma formulation simplifies calculation of the Fisher information matrix for partial natural gradient learning. Our experimental results show that our semi-supervised approach outperforms state of the art unsupervised baselines. And that the partial natural gradient learning outperforms stochastic gradient learning and Online-EM with sufficient statistics.
Unsupervised text embeddings extraction is crucial for text understanding in machine learning. Word2Vec and its variants have received substantial success in mapping words with similar syntactic or semantic meaning to vectors close to each other. However, extracting context-aware word-sequence embedding remains a challenging task. Training over large corpus is difficult as labels are difficult to get. More importantly, it is challenging for pre-trained models to obtain word-sequence embeddings that are universally good for all downstream tasks or for any new datasets. We propose a two-phased ConvDic+DeconvDec framework to solve the problem by combining a word-sequence dictionary learning model with a word-sequence embedding decode model. We propose a convolutional tensor decomposition mechanism to learn good word-sequence phrase dictionary in the learning phase. It is proved to be more accurate and much more efficient than the popular alternating minimization method. In the decode phase, we introduce a deconvolution framework that is immune to the problem of varying sentence lengths. The word-sequence embeddings we extracted using ConvDic+DeconvDec are universally good for a few downstream tasks we test on. The framework requires neither pre-training nor prior/outside information.
As artificial agents proliferate, it is becoming increasingly important to ensure that their interactions with one another are well-behaved. In this paper, we formalize a common-sense notion of when algorithms are well-behaved: an algorithm is safe if it does no harm. Motivated by recent progress in deep learning, we focus on the specific case where agents update their actions according to gradient descent. The paper shows that that gradient descent converges to a Nash equilibrium in safe games. The main contribution is to define strongly-typed agents and show they are guaranteed to interact safely, thereby providing sufficient conditions to guarantee safe interactions. A series of examples show that strong-typing generalizes certain key features of convexity, is closely related to blind source separation, and introduces a new perspective on classical multilinear games based on tensor decomposition.
One of the current issues in Brain-Computer Interface is how to deal with noisy Electroencephalography measurements organized as multidimensional datasets. On the other hand, recently, significant advances have been made in multidimensional signal completion algorithms that exploit tensor decomposition models to capture the intricate relationship among entries in a multidimensional signal. We propose to use tensor completion applied to EEG data for improving the classification performance in a motor imagery BCI system with corrupted measurements. Noisy measurements are considered as unknowns that are inferred from a tensor decomposition model. We evaluate the performance of four recently proposed tensor completion algorithms plus a simple interpolation strategy, first with random missing entries and then with missing samples constrained to have a specific structure (random missing channels), which is a more realistic assumption in BCI Applications. We measured the ability of these algorithms to reconstruct the tensor from observed data. Then, we tested the classification accuracy of imagined movement in a BCI experiment with missing samples. We show that for random missing entries, all tensor completion algorithms can recover missing samples increasing the classification performance compared to a simple interpolation approach. For the random missing channels case, we show that tensor completion algorithms help to reconstruct missing channels, significantly improving the accuracy in the classification of motor imagery, however, not at the same level as clean data. Tensor completion algorithms are useful in real BCI applications. The proposed strategy could allow using motor imagery BCI systems even when EEG data is highly affected by missing channels and/or samples, avoiding the need of new acquisitions in the calibration stage.
We establish connections between the problem of learning a two-layer neural network and tensor decomposition. We consider a model with feature vectors $\boldsymbol x \in \mathbb R^d$, $r$ hidden units with weights $\{\boldsymbol w_i\}_{1\le i \le r}$ and output $y\in \mathbb R$, i.e., $y=\sum_{i=1}^r \sigma( \boldsymbol w_i^{\mathsf T}\boldsymbol x)$, with activation functions given by low-degree polynomials. In particular, if $\sigma(x) = a_0+a_1x+a_3x^3$, we prove that no polynomial-time learning algorithm can outperform the trivial predictor that assigns to each example the response variable $\mathbb E(y)$, when $d^{3/2}\ll r\ll d^2$. Our conclusion holds for a `natural data distribution', namely standard Gaussian feature vectors $\boldsymbol x$, and output distributed according to a two-layer neural network with random isotropic weights, and under a certain complexity-theoretic assumption on tensor decomposition. Roughly speaking, we assume that no polynomial-time algorithm can substantially outperform current methods for tensor decomposition based on the sum-of-squares hierarchy. We also prove generalizations of this statement for higher degree polynomial activations, and non-random weight vectors. Remarkably, several existing algorithms for learning two-layer networks with rigorous guarantees are based on tensor decomposition. Our results support the idea that this is indeed the core computational difficulty in learning such networks, under the stated generative model for the data. As a side result, we show that under this model learning the network requires accurate learning of its weights, a property that does not hold in a more general setting.
자기회귀 트랜스포머의 키-값(KV) 캐시는 어텐션 헤드, 토큰, 특징, 그룹화된 층에 걸친 4차 텐서로 볼 수 있다. 본 연구에서는 Mistral-7B-v0.3과 LLaMA-2-13B에서 네 가지 모드 전개(mode unfolding) 모두의 특이값 스펙트럼을 측정하고, 동일한 저장 용량 조건에서 Tucker, CP, 텐서 트레인(tensor train), t-SVD의 네 가지 표준 텐서 분해를 비교한다. 스펙트럼은 네 축을 두 부류로 나눈다. 토큰 모드와 특징 모드는 특히 키(key)에서 저순위(low-rank) 구조를 보인다. 반면 헤드 모드와 층 모드는 거의 전순위(full-rank)이며, 실용적인 어떤 오차 수준에서도 압축에 저항한다. 네 가지 분해 중 Tucker는 전순위 모드를 그대로 둘 수 있기 때문에 $2\times$에서 $5\times$까지 모든 압축률에서 가장 낮은 복원 오차를 달성한다. 2차원 전개(unfolding) 기준선과의 비교에서는 키와 값(value)에 따라 선호되는 표현이 다르다는 점이 나타난다. 동일한 저장 용량에서 2D 방법은 더 낮은 키 오차를 달성하는 반면, 4방향 Tucker는 더 낮은 값 오차를 달성한다. 모드 고정(mode-pinning) 정리는 측정된 스펙트럼만으로 전순위 모드가 보존됨을 보증한다. 전순위 모드에는 영향을 주지 않으면서 압축 가능한 모드에 영향을 미치는 두 가지 스펙트럼 특성이 더 있다. 값은 모든 압축률에서 키보다 더 높은 오차 하한(error floor)에 도달하며, RoPE 이후의 키는 두 모델 모두에서 RoPE 이전 압축 가능성의 $41\%$ - $64\%$를 잃는다.
확률적 추론(inference)은 일반적으로 트리폭(treewidth)이 낮은 그래피컬 모델(graphical model)에서만 계산적으로 다룰 수 있어(tractable), 트리폭이 높은 환경에서의 실질적인 적용에 한계가 있습니다. 기존의 많은 방법은 대칭성과 같은 특정한 모수적(parametric) 구조를 활용하여 효율성을 향상시킵니다. 그러나 이러한 방법들은 대개 해당 구조가 사전에 명시적으로 존재해야 하므로, 더 넓은 범위의 그래피컬 모델에 적용하기 어렵습니다. 이러한 한계를 해결하기 위해, 본 연구에서는 모수적 구조가 사전에 명시적으로 존재할 것을 요구하지 않고 잠재된 모수적 구조를 활용함으로써 다루기 쉬운(tractable) 추론을 제어하는 프레임워크를 제안합니다. 제안하는 접근 방식은 먼저 그래피컬 모델을 기저 텐서 네트워크(base tensor network)라고 부르는 특정 텐서(tensor) 네트워크 표현으로 재매개변수화합니다. 이 표현은 모수적 구조를 통해 추론의 다루기 쉬운 특성을 제어할 수 있게 하는 두 가지 핵심적인 성질을 제공합니다: 1) 첫째, 추론 복잡도는 주로 기저 텐서(base tensor)라는 단일 텐서의 모수적 구조에 의해 결정됩니다. 본 연구에서는 전체 기저 텐서 네트워크를 효율적으로 축약(contraction)할 수 있는 몇 가지 다루기 쉬운 기저 텐서 클래스를 규명합니다. 2) 둘째, 기저 텐서를 분해하면 다시 기저 텐서 네트워크들의 모음이 생성됩니다. 이를 통해 추론 문제를 충분한 모수적 구조를 지닌 다루기 쉬운 구성 요소들로 기저 텐서를 분해하는 문제로 자연스럽게 귀결시킬 수 있습니다. 본 연구에서는 이 절차를 모수적 텐서 분해(parametric tensor decomposition)라고 부릅니다. 기저 텐서 내의 모수적 구조를 활용함으로써, 본 프레임워크는 이러한 구조가 명시적으로 존재하는 환경을 넘어 추론에 대한 새로운 관점을 제시합니다.
Hyperspectral unmixing allows representing mixed pixels as a set of pure materials weighted by their abundances. Spectral features alone are often insufficient, so it is common to rely on other features of the scene. Matrix models become insufficient when the hyperspectral image (HSI) is represented as a high-order tensor with additional features in a multimodal, multifeature framework. Tensor models such as canonical polyadic decomposition allow for this kind of unmixing but lack a general framework and interpretability of the results. In this article, we propose an interpretable methodological framework for low-rank multifeature hyperspectral unmixing based on tensor decomposition (MultiHU-TD) that incorporates the abundance sum-to-one constraint in the alternating optimization alternating direction method of multipliers (ADMM) algorithm and provide in-depth mathematical, physical, and graphical interpretation and connections with the extended linear mixing model. As additional features, we propose to incorporate mathematical morphology and reframe a previous work on neighborhood patches within MultiHU-TD. Experiments on real HSIs showcase the interpretability of the model and the analysis of the results. Python and MATLAB implementations are made available on GitHub.
Adam 등 1차 최적화기는 파라미터를 구조 없는 벡터로 취급해 다차원 텐서 가중치의 구조를 놓치는데, Muon의 스펙트럴 노름 제약 최적화를 고차 텐서로 확장한 Tensorion은 적응적으로 선택한 unfolding 행렬 연산으로 계산 가능한 LMO(linear minimization oracle)를 통해 텐서 스펙트럴 노름을 효과적으로 제한한다. 2차 텐서에서는 Muon과 동일하게 동작하고, CNN·Vision Transformer 등 컴퓨터 비전(CV) 실험에서 Adam 및 기존 텐서 인식 기준 대비 수렴과 그래디언트 업데이트 안정성이 개선되었다.
텐서(tensor) 기반 이산 밀도 추정은 효과적인 학습을 가능하게 하기 위해 유연한 모델링과 적절한 다이버전스 기준을 필요로 합니다. 그러나 $α$-다이버전스를 사용하는 전통적인 접근 방식은 목적 함수에 포함된 $α$-거듭제곱 항으로 인해 해석적 난관에 부딪히며, 이는 닫힌 형태(closed-form)의 업데이트 규칙 도출을 저해합니다. 본 논문에서는 기댓값 최대화(EM) 알고리즘의 일반화인 E$^2$M 알고리즘을 제안합니다. 이 알고리즘은 먼저 최적화 문제를 표준 EM 알고리즘으로 다룰 수 있는 쿨백-라이블러(KL) 다이버전스 기반의 대리 목적 함수 최소화로 완화한 다음, M-단계에서 텐서 다체 근사(tensor many-body approximation)를 적용하여 모든 파라미터의 동시 닫힌 형태 업데이트를 가능하게 함으로써 이 문제를 우회합니다. 제안하는 접근법은 CP, Tucker, Tensor Train 포맷을 포함한 다양한 저계수(low-rank) 구조뿐만 아니라 이들의 혼합 모델에 대해서도 유연한 모델링을 제공하므로, 서로 다른 저계수 구조의 장점을 활용할 수 있도록 합니다. 우리는 합성 및 실제 데이터셋을 통해 제안 방법의 효과를 평가하며, 그래디언트(gradient) 기반 절차에 필적하는 수렴(convergence), 이상치에 대한 강건성, 그리고 대표적인 기존 텐서 기반 방법들에 비해 우수한 밀도 추정 성능을 보여줍니다.