Deep Poisson Factorization Machines: a factor analysis model for mapping behaviors in journalist ecosystem

Similar documents
Lecture 13 : Variational Inference: Mean Field Approximation

Stochastic Variational Inference

13: Variational inference II

A graph contains a set of nodes (vertices) connected by links (edges or arcs)

CS839: Probabilistic Graphical Models. Lecture 7: Learning Fully Observed BNs. Theo Rekatsinas

Probabilistic Graphical Models for Image Analysis - Lecture 4

Sparse Stochastic Inference for Latent Dirichlet Allocation

Variational Inference (11/04/13)

STA 4273H: Statistical Machine Learning

Note 1: Varitional Methods for Latent Dirichlet Allocation

STA 4273H: Statistical Machine Learning

Mixtures of Gaussians. Sargur Srihari

Probabilistic Graphical Models

STA 4273H: Statistical Machine Learning

Pattern Recognition and Machine Learning. Bishop Chapter 9: Mixture Models and EM

Study Notes on the Latent Dirichlet Allocation

Lecture 16 Deep Neural Generative Models

Graphical Models for Collaborative Filtering

Statistical Machine Learning (BE4M33SSU) Lecture 5: Artificial Neural Networks

COMS 4721: Machine Learning for Data Science Lecture 16, 3/28/2017

Machine Learning. Lecture 3: Logistic Regression. Feng Li.

Approximate Bayesian inference

Lecture 8: Graphical models for Text

Gaussian Processes. Le Song. Machine Learning II: Advanced Topics CSE 8803ML, Spring 2012

Probabilistic Graphical Models

Generative Clustering, Topic Modeling, & Bayesian Inference

Linear Dynamical Systems

STA 414/2104: Machine Learning

Introduction to Probabilistic Machine Learning

13 : Variational Inference: Loopy Belief Propagation and Mean Field

Chapter 16. Structured Probabilistic Models for Deep Learning

ECE521 week 3: 23/26 January 2017

STA 4273H: Statistical Machine Learning

Bayesian Learning in Undirected Graphical Models

19 : Bayesian Nonparametrics: The Indian Buffet Process. 1 Latent Variable Models and the Indian Buffet Process

Cheng Soon Ong & Christian Walder. Canberra February June 2018

PMR Learning as Inference

Introduction to Machine Learning

The Origin of Deep Learning. Lili Mou Jan, 2015

Latent variable models for discrete data

Side Information Aware Bayesian Affinity Estimation

COS513 LECTURE 8 STATISTICAL CONCEPTS

Variational Inference via Stochastic Backpropagation

Pattern Recognition and Machine Learning. Bishop Chapter 2: Probability Distributions

Fully Bayesian Deep Gaussian Processes for Uncertainty Quantification

G8325: Variational Bayes

LDA with Amortized Inference

Latent Variable Models

An Introduction to Bayesian Machine Learning

Variational inference

Probabilistic Graphical Models

CS6220 Data Mining Techniques Hidden Markov Models, Exponential Families, and the Forward-backward Algorithm

Bayesian Machine Learning

Restricted Boltzmann Machines

Click Prediction and Preference Ranking of RSS Feeds

Default Priors and Effcient Posterior Computation in Bayesian

Learning Deep Architectures for AI. Part II - Vijay Chakilam

Logistic Regression: Online, Lazy, Kernelized, Sequential, etc.

Clustering. Professor Ameet Talwalkar. Professor Ameet Talwalkar CS260 Machine Learning Algorithms March 8, / 26

Lecture 6: Graphical Models: Learning

Graphical Models and Kernel Methods

Variational Inference in TensorFlow. Danijar Hafner Stanford CS University College London, Google Brain

A short introduction to INLA and R-INLA

Latent Dirichlet Allocation (LDA)

CSC411 Fall 2018 Homework 5

Two Useful Bounds for Variational Inference

Clustering with k-means and Gaussian mixture distributions

Learning MN Parameters with Approximation. Sargur Srihari

Faster Stochastic Variational Inference using Proximal-Gradient Methods with General Divergence Functions

Time-Sensitive Dirichlet Process Mixture Models

A new Hierarchical Bayes approach to ensemble-variational data assimilation

Exponential Families

Scaling Neighbourhood Methods

Auto-Encoding Variational Bayes

Probabilistic Reasoning in Deep Learning

The Expectation Maximization or EM algorithm

EXAM IN STATISTICAL MACHINE LEARNING STATISTISK MASKININLÄRNING

6.867 Machine learning, lecture 23 (Jaakkola)

Non-Parametric Bayes

Topic Modelling and Latent Dirichlet Allocation

Probabilistic Matrix Factorization

Learning Bayesian network : Given structure and completely observed data

Undirected Graphical Models

Content-based Recommendation

Machine Learning Basics III

Variational Bayesian Dirichlet-Multinomial Allocation for Exponential Family Mixtures

Bayesian Methods for Machine Learning

Statistical Data Mining and Machine Learning Hilary Term 2016

Introduction to Machine Learning

Latent Variable Models and EM algorithm

Generative Models and Stochastic Algorithms for Population Average Estimation and Image Analysis

DEPARTMENT OF COMPUTER SCIENCE Autumn Semester MACHINE LEARNING AND ADAPTIVE INTELLIGENCE

Sequence labeling. Taking collective a set of interrelated instances x 1,, x T and jointly labeling them

Chris Bishop s PRML Ch. 8: Graphical Models

Nonparametric Inference for Auto-Encoding Variational Bayes

Learning with Noisy Labels. Kate Niehaus Reading group 11-Feb-2014

Learning MN Parameters with Alternative Objective Functions. Sargur Srihari

Bayesian Learning and Inference in Recurrent Switching Linear Dynamical Systems

9/12/17. Types of learning. Modeling data. Supervised learning: Classification. Supervised learning: Regression. Unsupervised learning: Clustering

UNSUPERVISED LEARNING

Transcription:

000 001 002 003 004 005 006 007 008 009 010 011 012 013 014 015 016 017 018 019 020 021 022 023 024 025 026 027 028 029 030 031 032 033 034 035 036 037 038 039 040 041 042 043 044 045 046 047 048 049 050 051 052 053 054 Deep Poisson Factorization Machines: a factor analysis model for mapping behaviors in journalist ecosystem Abstract Newsroom in online ecosystem is difficult to untangle. With prevalence of social media, interactions between journalists and individuals become visible, but lack of understanding to inner processing of information feedback loop in public sphere leave most journalists baffled. Can we provide an organized view to characterize journalist behaviors on individual level to know better of the ecosystem? To this end, we propose Poisson Factorization Machine (PFM, a Bayesian analogue to matrix factorization that assumes Poisson distribution for generative process. The model generalizes recent studies on Poisson Matrix Factorization to account temporal interaction which involves tensor-like structure, and label information. We design two inference procedures, one based on batch variational EM and another stochastic variational inference scheme that efficiently scales with data size. We show how to stack layers of PFM to introduce a deep architecture. This work discusses some preliminary results applying the model and explains how such latent factors may be useful for analyzing latent behaviors for data exploration. 1. Intuition and Introduction Digital newsroom is rapidly changing. With the introduction of social media, the new public sphere offers greater mutual visibility and diversity. However, a full understanding of how the new system operates is still out of complete grasp. In particular, the problem is made further challenging with data sparsity, where individual records about responses to any particular news event is limited. We believe mapping the development of analytical framework that integrates different domains of data can significantly help us characterize behavioral patterns of journalists and understand how they operate in social media ac- Preliminary work. Do not distribute. cording to different news topics and events. Figure 1 outlines a possible data mapping. Ingesting data from published feeds by news organizations and map corresponding journalists to social media and observe their activities will undoubtedly enable a clearer mapping of individual behaviors related to news event progression. Based on this data mapping, we can incorporate general response by normal users on social media to construct a data feedback loop. Figure 1. A sampled data view of a network of relational data spanning news data and social media data. Blue nodes denote tweets, green nodes denote journalists, yellow nodes denote news articles, and red nodes denote news organizations. Edges are data relations and interactions. We are interested in aggregated behaviors as well as individual behaviors that interact with the ecosystem. A way to achieve this aim is to design a mathematical model that can map the latent process that characterize individual behavior as well as feature analysis on aggregate level. In this work, we propose a model building on top of probabilistic matrix factorization, called Poisson Factorization Machine, to describe the latent factors that behavioral features are embedded upon. In particular, we first create a data design matrix by inferring links between data instances from different domains. Figure 2 illustrates such a representation, where each row is a news article published by news organization. The columns denote the features associated with the story, 055 056 057 058 059 060 061 062 063 064 065 066 067 068 069 070 071 072 073 074 075 076 077 078 079 080 081 082 083 084 085 086 087 088 089 090 091 092 093 094 095 096 097 098 099 100 101 102 103 104 105 106 107 108 109

110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 Deep Poisson Factorization Machine Figure 2. An example encoded under factorization machine format. Each row encodes an item with corresponding features. A color box denotes a particular feature category. Color shades denotes frequency; darker means higher counts. Different categories can interact and particular category of feature encodes dependency. We can dictate certain categories as response variables for supervision. which can include topics written in the news, name entities mentioned, as well as social media engagement associated with journalists Twitter accounts and general users interactions. Then, we perform our Poisson Factorization Machine to learn a lower dimensional embedding of the latent factors that map to these features. Using this framework, we can answer several key questions: query- given any data instance or any subset of features as queries, can we understand potentially related instances and features by the learned latent feature mapping? factor analysis- can we describe the learned latent factors in a meaningful way to better understand relations between features? prediction- given new data instances, can we use its latent dimensional embedding to predict the instance s response at some unobserved features (e.g. features that have not yet occurred so we cannot record. Our proposed factorization model offers several advantages. First, the model bases on a hierarchical generative structure with Poisson distribution, which provide better statistical strength sharing among factors and model human behavior data better, being discrete output. Second, our model generalizes earlier works on Poisson Matrix Factorization by extending the model to include response variables to enable a form of supervised guidance. We offer batch as well as online variational inference to accommodate large-scale datasets. In addition, we show that it is possible to stack units of PFM to make a deep architecture. Third, we further extend our model to incorporate multiway interactions among features. This provides natural feature grouping for more interpretable feature exploration. 2. Methodology In this section, we describe the details for the proposed Poisson Factorization Machine, where we discuss the formal definition of the model, and inference with prediction procedures. Consider a set of observed news articles, where for each article, we have mapped the authors to their respective Twitter handles and extracted a set of behavior patterns around the time of posting the article. We denote this data matrix by X R NxD, where each entry x i is a D dimensional feature associated with that article. Also, we have response variables Y R NxC with total of C response types. In this work, we set C = 1, but the reasoning can easily apply to the higher dimension cases. Imagine there are k {1,,K} latent factors from the matrix factorization model. We define the Poisson Factorization Machine with the following generative process: θ i,k Gamma(a, ac β k,d Gamma(b, b x i,d P oisson( K k=1 θ i,kβ k,d y i,c Gaussian(θ T i η, σ where β k R D + is the kth latent factor mapping for feature vector, θ i R K + denotes the factor weights. Note the hyperparameters of the model a, b, c, and η R KxC, σ R CxC. Here, c is a scalar used to tune the weights. To generate the response variable, for each instance, we use the corresponding factor weights as input for normal linear model for regression. Figure shows the graphical model. 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219

220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 In this work, we leave a, b predefined, and update other hyperparameters during model fitting. Notice the introduction of auxiliary variable z. This is employed to facilitate posterior variational inference by helping us to develop closed coordinate ascent updates for the parameters. More specifically, by the Superposition Theorem [], the Poisson distribution dictated by x can be composed of K independent Poisson variables x id = Σ K k=1 z idk where z idk P oisson(θ ik β kd. Effectively, when we are looking at the data likelihood, it can be viewed as marginalizing z (if we denote all hidden parameters by π, but keep in mind that having z not marginalized maintains flexibility for inference later on: P (y i,c, x i,d π = z idk P (y i,c, x i,d, z i,d,k π z The intuition for selecting Poisson model comes from the statistical property that Poisson distribution models count data, which is more suitable for sparse behavioral patterns than traditional Gaussian-based matrix factorization. Also, Poisson factorization avoids the problem of data sparsity since it penalizes 0 less strongly than Gaussian distribution, which makes it desirable for weakly labeled data[]. The selection of Gamma prior as originally suggested by et al.[]. Notice that response variable need not be Gaussian, and can vary depending on the nature of inputting dataset. In fact, since our proposed learning and inference procedure is very similar as in [], our model can generalize to Generalized Linear Models, which include other distributions such as Poisson, Multinomial, etc. X i,d β k,d b, b D a, ac θ i,k Y N η, σ Figure 3. The graphical model representation of Poisson Factorization Model (PFM. Shaded nodes are observed variables, and note that we did not include auxiliary variable z. 2.1. Posterior Inference For posterior inference, we adopt variational EM algorithm, which was employed in Supervised Topic Model K []. After showing the derivation, we will also present a stochastic variational inference analogue for the inference algorithm. First, we consider a fully factorized variational distribution for the parameters: K ( N D ( D q(θ, β, z = q(θ ik q(z idk k=1 q(β kd For the above variational distribution, we choose the following distributions to reflect the generative process in the Poisson Factorization Model: q(θ i,k = Gamma(γ ik, χ ik q(β k,d = Gamma(ν kd, λ kd q(z i,k,d = Multinomial( φ id The log likelihood for the data features is calculated and bounded by: q(θ, β ln p(x 1:N π = ln p(θ, β, x, y π θ, β q(θ, β θ β E [ln p(θ, β, x π] E [ln q(θ, β] = E [ln p(θ, β, x π] + H(q where H(q is the entropy of the variational distribution q and the resulting lower bound is our Evidence Lower Bound (ELBO. 2.1.1. BATCH INFERENCE The ELBO lower bounds the log-likelihood for all article items in the data. For the E-step in variational EM procedure, we run variational inference on the variational parameters. In the M-step, we optimize according to the ELBO with respect to model parameters c (with a, b held fixed, as well as regression parameters η and σ. Variational E-step To calculate the updates, we try to first further break down E q [ln p(θ, β, x π] and draw analogy to earlier works on Poisson Matrix Factorization [][][] to illustrate how we can directly leverage on previous results to derive coordinate ascent update rules for the proposed model. Notice that: E [ln p(θ, β, x π] = E [ln p(β b, b] + E [ln p(θ a, ac] + E [ln p(z x, θ, β] + n=1 E [ln p(x θ, β] + E [ln p(y θ, η, σ] n=1 In fact, for variational parameters, when taking partial derivatives, the expression is identical to batch inference 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329

330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 algorithm in ordinary Poisson Matrix Factorization, so we arrive at the following updates for θ i,k, β k,d []: exp(e [ln θ ik β kd ] φ idk := K k=1 exp(e [ln θ ik β kd ] γ i,k = a + χ i,k = ac + ν k,d = b + λ k,d = b + D D E [β kd ] Expectations for and E [ln θ ik ] are γ ik /χ ik and ψ(γ ik ln χ ik respectively (where ψ( is the digamma function. Variational M-step In the M-step, we maximize the article-level ELBO with respect to c, η, and σ. We update c according to c = E [θ] c 1 = 1 NK. For regression parameters, we take partial derivatives with respect to η and σ, yielding for η []: L η = ( 1 η σ = 1 σ N i,k E[η T θ i ]y i E[ ηt θ i θi T η i ] 2 E[θ i ]y i η T E[θ i θi T ] where the latter term E[θ i θi T ] is evaluated as 1 ( K 2 j l j γ ij χ ij γ il χ il + j ( 1 ac 2 + γ ij χ ij. Setting the partial derivative to zero and we arrive at the updating rule for η, as we collapse all instances i into vector: ( 1E[θ] η = E[θ θ] T T y For derivative of σ, we have: L σ = 1 ( 1 2σ + N E[η T θ i ]y i E[ ηt θ i θi T η i ] σ 2 σ = 1 { ( 1E[θ] } y T y y T E[θ] E[θ θ] T T y N To complete the procedure, we iterate between updating and optimizing parameters by following E-step and M-step until convergence. Algorithm 1 outlines the entire process. 2.1.2. STOCHASTIC INFERENCE Batch variational EM algorithm might take multiple passes at the dataset before reaching convergence. In real world applications, this may not be desirable since social media data is more dynamic and large in scale. Recently, Hoffman et al. developed stochastic variational inference where each iteration we work with a subset of data instead, averaging over the noisy variational objective L. We optimize by iterating between global variables and local variables. The global objective is based on β, and at each iteration t, with data subset B t,we have: L t = N E q [ln p(x i, θ i β] + E q [ln p(β] + H(q. The main difference in the inference procedure for stochastic variational inference is in the updating part, where parameters c, η, and σ are updated with the average empirically according to the mini-batch samples (where θ = {θ i ; i B t }, ŷ = {y i ; i B t }: (c (t 1 = 1 K,k ( η (t = E[ θ T θ] 1E[ θ]t ŷ σ (t = 1 { ( } ŷ T ŷ ŷ T E[ θ] E[ θ T θ] 1E[ θ]t ŷ As for β, since it is also global variable, we update by taking a natural gradient step based on the Fisher information matrix of variational distribution q(β kd. We have the variational parameters for β updated as: ( ν (t k,d = (1 ρ tν (t 1 kd + ρ t b + N ( λ (t k,d = (1 ρ tλ (t 1 kd + ρ t b + N where ρ t is a positive interpolation factor and ensuring convergence. We adopt ρ t = (t 0 + t κ for t 0 > 0 and κ (0.5, 1] which is shown to correspond to natural gradient step in information geometry with stochastic optimization[][]. Algorithm 2 summaries the stochastic variational inference procedure. 2.2. Query and Prediction For any given query x i or s D, we can infer the corresponding latent factor distribution by computing E[θ i ] as well as E[β s s] given that E[β] is already learned by the model. Prediction follows by combining both latent factors to generate the response. 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439

440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 Algorithm 1 Variational Inference for PFM repeat Determine instance set S for iteration: S = X R NxD S = B t R Bt xd E-Step: for each instance i do update γ i, χ i end for for each component k do update ν k, λ k update ν (t k, λ(t k end for update all corresponding φ idk M-Step: update c, η, σ update c (t, η (t, σ (t until convergence 2.3. Modeling Cross-Category Interactions (Under development Notice that we can enforce each θ i,k, βk, d to be an f dimensional vector. In this way, we create an f-way interaction among latent factors. We can further impose a sparse deterministic prior B with binary entries where each data entry encodes whether the two latent factors should interact. We can also approach by using a diffusion tree prior, which consider a hierarchy of prior interactions. Under this construct, we can flatmap the tensor data structure to two dimensional structure and apply the factor interactions to encode a higher level of feature dependency. 3. Deep Poisson Factorization Machines Given the development of Poisson Factorization Machines, here we show that it is possible to stack layers of latent Gamma units on top of PFM to introduce a deep architecture. In particular, for latent factors β and θ, a layering (for layer l parent variables z n,l with corresponding weights w l,k are fed with link function g l 1 specified by g l 1 (z T l w l,k. As described in the recent work on Deep Exponential Families [] with exponential family in the form p(x = h(x exp(η T T (x a(η, we can condition the sufficient statistics, the mean to be particular, controlled by the link function g l via the gradient of the log-normalizer. E[T (z l,k ] = η a(g l (z T l+1w l,k. Figure 4 shows the schematics of stacking layers of latent variables on PFM latent states. Gamma variables The Gamma distribution is an exponential family distribution with the probability density controlled by natural parameters α, β where p(z = z 1 exp(αlog(z βz logγ(α αlog(β The link functions for α and β are respectively α l g α = α l, g β = zl+1 T w l,k where α l denotes the shape parameter at layer l, and w is simply drawn from a Gamma distribution. Gaussian variables For Gaussian distribution, we are interested in the switching variables θ, which is calculated as part of stacking Gamma variables. Inference For inference, since all variables in each layer follows precisely for the inference procedures derived earlier, we focus on the stacking variables. The ELBO for the generative process now includes layer-wise w and z. For each stacking z and corresponding w, we have: w l q(w l z l q(z l g l log q(z l For parameter updates, taking the gradient for the variational bound z,w L can be used to update each stacking layer s parameters, respectively. w l+1,k w l,k PFM z l+1,k z l,k K l+1 K l Figure 4. Schematics for stacking gamma layers on PFM. 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549