Online MAP Inference and Learning for Nonsymmetric Determinantal Point Processes

1 INTRODUCTION . Determinantal Point Processes ( DPPs ) were first introduced in the context of quantum mechanics ( Macchi , 1975 ) and have subsequently been extensively studied with applications in several areas of pure and applied mathematics like graph theory , combinatorics , random matrix theory ( Hough et al. , 2006 ; Borodin , 2009 ) , and randomized numerical linear algebra ( Derezinski & Mahoney , 2021 ) . Discrete DPPs have gained widespread adoption in machine learning following the seminal work of Kulesza & Taskar ( 2012 ) and there has been a recent explosion of interest in DPPs in the machine learning community . For instance , some of the very recent uses of DPPs include automation of deep neural network design ( Nguyen et al. , 2021 ) , deep generative models ( Chen & Ahmed , 2021 ) , document and video summarization ( Perez-Beltrachini & Lapata , 2021 ) , image processing ( Launay et al. , 2021 ) , and learning in games ( Perez-Nieves et al. , 2021 ) . A DPP is a probability distribution over subsets of items and is characterized by some kernel matrix such that the probability of sampling any particular subset is proportional to the determinant of the submatrix corresponding to that subset in the kernel . Until very recently , most prior work on DPPs focused on the setting where the kernel matrix is symmetric . Due to this constraint , DPPs can only model negative correlations between items . Recent work has shown that allowing the kernel matrix to be nonsymmetric can greatly increase the expressive power of DPPs and allows them to model compatible sets of items ( Gartrell et al. , 2019 ; Brunel , 2018 ) . To differentiate this line of work from prior literature on symmetric DPPs , the term Nonsymmetric DPPs ( NDPPs ) has often been used . Modeling positive correlations can be useful in many practical scenarios . For instance , an E-commerce company trying to build a product recommendation system would want the system to increase the probability of suggesting a router if a customer adds a modem to a shopping cart . State-of-the-art algorithms for learning and inference on NDPPs ( Gartrell et al. , 2021 ) require storing the full data in memory and take multiple passes over the complete dataset . Therefore , these algorithms take too much memory to be useful for large scale data , where the size of the entire dataset can be much larger than the random-access memory available . These algorithms are also not practical in settings where data is generated on the fly , for example , in E-commerce applications where new items are added to the store over time , and more importantly , added to the carts of users instantaneously . This work makes the following contributions : Streaming and Online Inference : We formulate streaming and online versions of maximum a posteriori ( MAP ) inference on fixed-size NDPPs and provide algorithms for solving these problems . In the streaming setting , data points arrive in an arbitrary order and the algorithms are constrained to use a single-pass over the data as well as sub-linear memory ( i.e . memory that is substantially smaller than the size of the data stream ) . The online setting we consider has an additional restriction that we need to maintain a valid solution at every time step . For both these settings , we provide algorithms which have comparable or even better solution quality than the offline greedy algorithm while taking only a single pass over the data and using a fraction of the memory used by the offline algorithm . Online Learning : We introduce the online learning problem for NDPPs and provide an algorithm which solves this problem using a single-pass over the data and memory that is constant in m , the number of baskets in the training data ( or equivalently the length of the stream ) . In comparison , the offline learning algorithm takes a large number of passes over the entire data and uses memory linear in m. Strikingly , our online learning algorithm shows comparable performance ( log-likelihood ) to the state-of-the-art offline learning algorithm , while converging significantly faster in all cases ( Figure 2 ) . This is notable , since our algorithm uses only a single pass over the data , while using a tiny fraction of the memory . 2 RELATED WORK . Even in the case of ( symmetric ) DPPs , the study of online and streaming settings is in a nascent stage . In particular , Bhaskara et al . ( 2020 ) were the first to propose online algorithms for MAP inference of DPPs and Liu et al . ( 2021 ) were the first to give streaming algorithms for the maximum induced cardinality objective proposed by Gillenwater et al . ( 2018 ) . However , no work has focused on either online or streaming MAP inference or online learning for Nonsymmetric DPPs . A special subset of NDPPs called signed DPPs were the first class of NDPPs to be studied ( Brunel et al. , 2017 ) . Gartrell et al . ( 2019 ) studied a more general class of NDPPs and provided learning and MAP Inference algorithms , and also showed that NDPPs have additional expressiveness over symmetric DPPs and can better model certain problems . This was improved by Gartrell et al . ( 2021 ) in which they provided a new decomposition which enabled linear time learning and MAP Inference for NDPPs . More recently , Anari & Vuong ( 2021 ) proposed the first algorithm with a kO ( k ) approximation factor for MAP Inference on NDPPs where k is the number of items to be selected . These works are not amenable to the streaming nor online settings that are studied in our paper . In particular , they store all data in memory and use multiple passes over the data , among other issues . In this work , we formally introduce the streaming and online MAP inference and online learning problems for NDPPs and develop online algorithms for solving these problems . To the best of our knowledge , our work is the first to study NDPPs in the streaming and online settings , and develop algorithms for solving MAP inference and learning of NDPPs in these settings . 3 PRELIMINARIES . Notation . Throughout the paper , we use uppercase bold letters ( A ) to denote matrices and lowercase bold letters ( a ) to denote vectors . Letters in normal font ( a ) will be used for scalars . For any positive integer n , we use [ n ] to denote the set { 1 , 2 , . . . , n } . A matrix M is said to be skew-symmetric if M = −M > where > is used to represent matrix transposition . A DPP is a probability distribution on all subsets of [ n ] characterized by a matrix L ∈ Rn×n . The probability of sampling any subset S ⊆ [ n ] i.e . Pr [ S ] ∝ det ( LS ) where LS is the submatrix of L obtained by keeping only the rows and columns corresponding to indices in S. The normalization constant for this distribution can be computed efficiently since we know that ∑ S⊆ [ n ] det ( LS ) = det ( L + In ) ( Kulesza & Taskar , 2012 , Theorem 2.1 ) . Therefore , Pr [ S ] = det ( LS ) det ( L+In ) . For the DPP corresponding to L to be a valid probability distribution , we need det ( LS ) ≥ 0 for all S ⊆ [ n ] since Pr [ S ] ≥ 0 for all S ⊆ [ n ] . Matrices which satisfy this property are known as P0-matrices ( Fiedler & Pták , 1966 ) . For any symmetric matrix L , det ( LS ) ≥ 0 for all S ⊆ [ n ] if and only if L is positive semi-definite ( PSD ) i.e . xTLx ≥ 0 for all x ∈ Rn . Therefore , all symmetric matrices which correspond to valid DPPs are PSD . But there are P0-matrices which are not necessarily symmetric ( or even positive semi-definite ) . For example , L = [ 1 1 −1 1 ] is a nonsymmetric P0 matrix . Any matrix L can be uniquely written as the sum of a symmetric and skew-symmetric matrix : L = ( L + L > ) /2 + ( L − L > ) /2 . For the DPP characterized by L , the symmetric part of the decomposition can be thought of as encoding negative correlations between items and the skewsymmetric part as encoding positive correlations . Gartrell et al . ( 2019 ) proposed a decomposition which covers the set of all nonsymmetric PSD matrices ( a subset of P0 matrices ) which allowed them to provide a cubic time algorithm ( in the ground set size ) for NDPP learning . This decomposition is L = V > V + ( BC > −CB > ) . Gartrell et al . ( 2021 ) provided more efficient ( linear time ) algorithms for learning and MAP inference using a new decomposition L = V > V + B > CB . Although both these decompositions only cover a subset of P0 matrices , it turns out that they are quite useful for modeling real world instances and provide improved results when compared to ( symmetric ) DPPs . For the decomposition L = V > V + B > CB , we have V , B ∈ Rd×n , C ∈ Rd×d and C is skewsymmetric . Here we can think of the items having having a latent low-dimensional representation ( vi , bi ) where vi , bi ∈ Rd . Intuitively , a low-dimensional representation ( when compared to n ) is sufficient for representing items because any particular item only interacts with a small number of other items in real-world datasets , as evidenced by the fact that the maximum basket size encountered in real-world data is much smaller than n . 4 STREAMING MAP INFERENCE . In this section , we formulate the streaming MAP inference problem for NDPPs and design an algorithm for this problem with guarantees on the solution quality , space , and time . 4.1 STREAMING MAP INFERENCE PROBLEM . We study the MAP Inference problem in low-rank NDPPs in the streaming setting where we see columns of a 2d × n matrix in order ( column-arrival model ) . Given some fixed skew-symmetric matrix C ∈ Rd×d , consider a stream of 2d-dimensional vectors ( which can be viewed as pairs of d-dimensional vectors ) arriving in order : ( v1 , b2 ) , ( v2 , b2 ) , . . . , ( vn , bn ) where vt , bt ∈ Rd , ∀ t ∈ [ n ] The main goal in the streaming setting is to output the maximum likelihood subset S ⊆ [ n ] of cardinality k at the end of the stream assuming that S is drawn from the NDPP characterized by L = V > V + B > CB i.e . S = argmax S⊆ [ n ] , |S|=k det ( LS ) = argmax S⊆ [ n ] , |S|=k det ( V > S VS + B > SCBS ) ( 1 ) For any S ⊆ [ n ] , VS ∈ Rd×|S| is the matrix whose each column corresponds to { vi , i ∈ S } . Similarly , BS ∈ Rd×|S| is the matrix whose columns correspond to { bi , i ∈ S } . In the case of symmetric DPPs , this maximization problem in the non-streaming setting corresponds to MAP Inference in cardinality constrained DPPs , also known as k-DPPs ( Kulesza & Taskar , 2011 ) . Usually , designing a streaming algorithm can be viewed as a dynamic data-structure design problem . We want to maintain a data-structure with efficient time and small space over the entire stream . Therefore , the secondary goals are to minimize the following : • Space : We consider word-RAM model , and use number of words * to measure it . * In word-RAM , we usually assume each word is O ( logn ) bits . Algorithm 1 Streaming Partition Greedy MAP Inference for low-rank NDPPs 1 : Input : Length of the stream n and a stream of data points { ( v1 , b1 ) , ( v2 , b2 ) , . . . , ( vn , bn ) } 2 : Output : A solution set S of cardinality k at the end of the stream . 3 : S0 ← ∅ , s0 ← ∅ 4 : while new data ( vt , bt ) arrives in stream at time t do 5 : i← d tkn e 6 : if f ( Si−1 ∪ { t } ) > f ( Si−1 ∪ { si } ) then 7 : si ← t 8 : if t is a multiple of nk then 9 : Si ← Si−1 ∪ si 10 : si ← ∅ 11 : return Sk • Update time : time to update our data-structure whenever we see a new arriving data point . • Total time : total time taken to process the stream . Definition 1 . Given three matrices V ∈ Rd×k , B ∈ Rd×k and C ∈ Rd×d , let Tdet ( k , d ) denote the running time of computing det ( V > V + B > CB ) . Note that Tdet ( k , d ) = 2Tmat ( d , k , d ) + Tmat ( d , d , k ) + Tmat ( k , k , k ) where Tmat ( a , b , c ) is the time required to multiply two matrices of dimensions a× b and b× c. We have the last Tmat ( k , k , k ) term because computing the determinant of a k × k matrix can be done ( essentially ) in the same time as computing the product of two matrices of dimension k × k ( Aho et al. , 1974 , Theorem 6.6 ) . We will now describe a streaming algorithm for MAP inference in NDPPs , which we call the `` Streaming Partition Greedy '' algorithm .

Summary: This paper studies the online inference and learning problems for nonsymmetric determinantal point processes (NDPPs). The authors use the online greedy algorithm for MAP inference and modify the learning objective for being suitable in the online setting. Experiments with real-world datasets show that the proposed online algorithms are comparable or even better than state-of-the-art offline algorithms.