Patent ID: 12243072

DETAILED DESCRIPTION

Overview

The present disclosure describes, among other things, methods, systems, and computer program products that individually provide various functionality. In the following description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the various aspects of different embodiments of the present disclosure. It will be evident, however, to one skilled in the art, that the present disclosure may be practiced without all of the specific details.

In an example embodiment, tensor train decompositions are used to create large, personalized layers that are efficient for segment modeling. Tensor train decompositions are generalizations of singular value decompositions from matrices to tensors (multidimensional arrays). More particularly, rather than performing learning on an input matrix of training data that contains all segments, and then crossing this matrix with a vector for a particular segment, the matrix is mapped to an N-dimensional tensor, where each of the dimensions corresponds to one of the properties used to compose the segment, which can then be approximated by tensor train decomposition to enable efficient training and scoring.

More particularly, in a neural network, one of the most frequently used layers is a fully-connected layer. This layer comprises a linear transformation of a high-dimensional input signal to a high-dimensional output signal with a large dense matrix defining the transformation. In many deep neural networks, the dimensions of the input and output signals of the fully-connected layers are in the thousands, bringing the number of parameters of the fully-connected layers up to the millions.

In an example embodiment, a compact multi-linear format, called the tensor train format, is used to represent the dense weight matrix of the fully-connected layers using fewer parameters than traditional dense weight matrices of fully-connected layers while keeping enough flexibility to perform signal transformations. This can be implemented into a training algorithm for a propensity-to-interact model because all of the derivates used by back-propagation can be computed using the properties of the tensor train format.

The use of a tensor train in this context involves two parts. First, a matrix is converted to a tensor by creating a bijection, which maps each element of the matrix to an element in the tensor. This may be performed by, for example, by creating a separate bijection for rows as for columns. More particular, with respect specifically to segmentation, a specialized technique is provided to produce a bijection for a tensor train decomposition where a first dimension corresponds to the input vector and the next p−2 dimensions correspond to categorical variables (where p is the dimension of the tensor). Second, the elements of the matrix can be approximated from the final bijection.

This approximation of the matrix can be used in place of the ordinary fully-connected matrix for any training and/or evaluation operations, creating a tensor train modeling technique that compresses the neural network, making it significantly more scalable without a reduction in reliability, even for personalized segments.

DESCRIPTION

The disclosed embodiments provide a method, apparatus, and system for performing dynamic segment modeling in machine learning, and in some example embodiments, specifically performing segment modeling to determine how to display content impressions in a graphical user interface. It should be noted that for ease of understanding, a particular type of content, specifically job listings, will be described in detail in this disclosure. Nothing in this disclosure shall be read, however, as specifically limiting implementation of the techniques described herein to job listings, and the claims shall not be interpreted as being limited to job listings unless explicitly stated.

Segment modeling is used when it is desirable to personalize a machine learning model's performance at a segment level. The term “segment” is used in the broad sense and refers to any mechanism to separate the data along certain characteristics. For example, in an online service where user profiles are shared with other users and content items are also shared with users, a segment may reflect certain characteristics that are either user and item related or both. Thus, for example, segments can define different combinations of amount of user experience in the online service, amount of interaction of the user in the online service, geographic area, industry, job function, notification type, and so forth. As will be seen, in an example embodiment, segments can also be learned, and not specified before modeling, which can result in segments being defined along non-traditional boundaries. For example, while in the past the term “segment” may have implied that a specific value of a particular category is present in all data in the segment (e.g., the segment is user profiles where “software engineer” is the job function), or perhaps some combination of values of different categories are all present in all data in the segment (e.g., the segment is user profiles where “software engineer” is the job function and “Silicon Valley” is the geographic area), having the machine learning model learn segments allows for arbitrary divisions that may not be so strictly defined or separated.

Naïve approaches to segment modeling involve using techniques such as multi-task learning that is integrated into a final or near final layer of the neural network. For example, the neural network is constructed with one or more fully-connected layers, followed by a segmentation layer. The segmentation layer essentially learns parameters for the different segments. A multi-task learning layer then learns to optimize for all the outputs for all the different segments from the segmentation layer.

Multi-task learning, however, does not scale effectively when the number of segments is large and composed from individual characteristics. One reason for this is that each of the fully-connected layers is still trained and evaluated using an input matrix that contains data from all segments, and then this matrix is later crossed with a vector for the individual segments. The result is that the dimensionality of each fully-connected layer can be quite large as the number of different combinations of categories and values increases.

In an example embodiment, tensor train decompositions are used to create large, personalized layers that are efficient for segment modeling. More particularly, rather than performing learning on an input matrix of training data that contains all segments, and then crossing this matrix with a vector for a particular segment, the matrix is mapped to an N-dimensional tensor, where each of the dimensions corresponds to one of the properties used to compose the segment, which can then be approximated by tensor train decomposition to enable efficient training and scoring.

In an example embodiment, a compact multi-linear format, called the tensor train format, is used to represent the dense weight matrix of the fully-connected layers using few parameters while keeping enough flexibility to perform signal transformations. This can be implemented into a training algorithm for a propensity-to-interact model because all of the derivates used by back-propagation can be comported using the properties of the tensor train format.

In an example embodiment, a specialized technique is provided to produce a bijection for a tensor train decomposition of an original matrix where a first dimension corresponds to the input vector and the next p−2 dimensions correspond to categorical variables (where p is the dimension of the tensor). Categorical variables are variables whose values can take on one of a limited number of values, each of which corresponds to a particular group or nominal category on the basis of some qualitative property. This allows elements of the matrix to be approximated from the final bijection, without the need for the fully-connected layers to contain all the dimensions they would have if they were to take as input the original matrix.

FIG.1is a block diagram showing the functional components of a social networking service, including a data processing module referred to herein as a search engine, for use in generating and providing search results for a search query, consistent with some embodiments of the present disclosure.

As shown inFIG.1, a front end may comprise a user interface module112, which receives requests from various client computing devices and communicates appropriate responses to the requesting client devices. For example, the user interface module(s)112may receive requests in the form of Hypertext Transfer Protocol (HTTP) requests or other web-based API requests. In addition, a user interaction detection module113may be provided to detect various interactions that users have with different applications, services, and content presented. As shown inFIG.1, upon detecting a particular interaction, the user interaction detection module113logs the interaction, including the type of interaction and any metadata relating to the interaction, in a user activity and behavior database122.

An application logic layer may include one or more various application server modules114, which, in conjunction with the user interface module(s)112, generate various user interfaces (e.g., web pages) with data retrieved from various data sources in a data layer. In some embodiments, individual application server modules114are used to implement the functionality associated with various applications and/or services provided by the social networking service.

As shown inFIG.1, the data layer may include several databases, such as a profile database118for storing profile data, including both user profile data and profile data for various organizations (e.g., companies, schools, etc.). Consistent with some embodiments, when a person initially registers to become a user of the social networking service, the person will be prompted to provide some personal information, such as his or her name, age (e.g., birthdate), gender, interests, contact information, home town, address, spouse's and/or family members' names, educational background (e.g., schools, majors, matriculation and/or graduation dates, etc.), employment history, skills, professional organizations, and so on. This information is stored, for example, in the profile database118. Similarly, when a representative of an organization initially registers the organization with the social networking service, the representative may be prompted to provide certain information about the organization. This information may be stored, for example, in the profile database118or another database (not shown). In some embodiments, the profile data may be processed (e.g., in the background or offline) to generate various derived profile data. For example, if a user has provided information about various job titles that the user has held with the same organization or different organizations, and for how long, this information can be used to infer or derive a user profile attribute indicating the user's overall seniority level or seniority level within a particular organization. In some embodiments, importing or otherwise accessing data from one or more externally hosted data sources may enrich profile data for both users and organizations. For instance, with organizations in particular, financial data may be imported from one or more external data sources and made part of an organization's profile. This importation of organization data and enrichment of the data will be described in more detail later in this document.

Once registered, a user may invite other users, or be invited by other users, to connect via the social networking service. A “connection” may constitute a bilateral agreement by the users, such that both users acknowledge the establishment of the connection. Similarly, in some embodiments, a user may elect to “follow” another user. In contrast to establishing a connection, the concept of “following” another user typically is a unilateral operation and, at least in some embodiments, does not require acknowledgement or approval by the user that is being followed. When one user follows another, the user who is following may receive status updates (e.g., in an activity or content stream) or other messages published by the user being followed, relating to various activities undertaken by the user being followed. Similarly, when a user follows an organization, the user becomes eligible to receive messages or status updates published on behalf of the organization. For instance, messages or status updates published on behalf of an organization that a user is following will appear in the user's personalized data feed, commonly referred to as an activity stream or content stream. In any case, the various associations and relationships that the users establish with other users, or with other entities and objects, are stored and maintained within a social graph in a social graph database120.

As users interact with the various applications, services, and content made available via the social networking service, the users' interactions and behavior (e.g., content viewed, links or buttons selected, messages responded to, etc.) may be tracked, and information concerning the users' activities and behavior may be logged or stored, for example, as indicated inFIG.1, by the user activity and behavior database122. This logged activity information may then be used by the search engine116to determine search results for a search query.

Although not shown, in some embodiments, the social networking system110provides an Application Program Interface (API) module via which applications and services can access various data and services provided or maintained by the social networking service. For example, using an API, an application may be able to request and/or receive one or more recommendations. Such applications may be browser-based applications or may be operating system-specific. In particular, some applications may reside and execute (at least partially) on one or more mobile devices (e.g., phone or tablet computing devices) with a mobile operating system. Furthermore, while in many cases the applications or services that leverage the API may be applications and services that are developed and maintained by the entity operating the social networking service, nothing other than data privacy concerns prevents the API from being provided to the public or to certain third parties under special arrangements, thereby making the navigation recommendations available to third-party applications and services.

Although the search engine116is referred to herein as being used in the context of a social networking service, it is contemplated that it may also be employed in the context of any website or online services. Additionally, although features of the present disclosure are referred to herein as being used or presented in the context of a web page, it is contemplated that any user interface view (e.g., a user interface on a mobile device or on desktop software) is within the scope of the present disclosure.

In an example embodiment, when user profiles are indexed, forward search indexes are created and stored. The search engine116facilitates the indexing and searching for content within the social networking service, such as the indexing and searching for data or information contained in the data layer, such as profile data (stored, e.g., in the profile database118), social graph data (stored, e.g., in the social graph database120), and user activity and behavior data (stored, e.g., in the user activity and behavior database122). The search engine116may collect, parse, and/or store data in an index or other similar structure to facilitate the identification and retrieval of information in response to received queries for information. This may include, but is not limited to, forward search indexes, inverted indexes, N-gram indexes, and so on.

FIG.2is a block diagram illustrating application server module114ofFIG.1in more detail, in accordance with an example embodiment. While in many embodiments the application server module114will contain many subcomponents used to perform various different actions within the social networking system110, inFIG.1, only those components that are relevant to the present disclosure are depicted.

An engagement scoring component200acts to score content items based on a predicted engagement of user, and more particularly acts to obtain an engagement score, for a particular content item/user combination, which is a likelihood that the particular user will engage with (e.g., click on) the content item if presented with it.

The engagement scoring component200contains a neural network202trained by a machine learning algorithm204. A training data preparation component206obtains data from one or more databases and performs one or more transformations on the data in order to prepare training data for use in training. These databases may include, for example, profile database118, social graph database120, and/or user activity and behavior database122, among others, such as a jobs database (not pictured).

The transformations may include, for example, the computation of various metrics or scores based on the raw data from the databases. The result is a set of transformed training data. In an example embodiment, the transformed training data may include user attributes (such as location, skills, levels of skills, etc.), overall online network engagement across multiple users (such as home page views, unique users etc.), content engagement (such as home page views, user profile views, feed item views, etc), and so on. Some of this training data may be limited to certain time windows. For example, the engagement may be limited to only engagements performed within the last four weeks. The output of the training data preparation component206is a vector of data, including, for example, user data (with user features/categories), item data (with item features/categories), and information regarding their interactions (e.g., engagements of the users with the items).

Rather than use this training vector alone for the training of each fully-connected layer in the the neural network, a tensor train decomposition component208is used within one or more of the fully-connected layers to transform a matrix associated with the corresponding fully-connected layer to a tensor with fewer dimensions. The training input data is thus passed into a neural network, which consists of fully connected layers. Instead of representing the fully connected layers by dense matrices, tensor train networks can be used. This feature can be applied within any layer of the neural network. Bijections are used during this process, which help each sample only update a small subset of the parameters in the tensor train network. This allows the machine learning algorithm204to train fully connected layers in the neural network in a way that the fully connected layers have smaller dimensionality than traditional fully connected layers, resulting in a compact neural network202in relation to the size of the neural network202had it been trained directly using the training matrix output from the training data preparation component206.

At evaluation time, user and content information may be passed to an evaluation data preparation component210, which transforms the user and content information into an evaluation vector for scoring. Again, rather than use this evaluation vector alone, the tensor train decomposition component208transforms the evaluation vector based on the segment of the evaluation vector, using the trained tensor train fully-connected layer(s)

It should be noted that the evaluation data preparation component210and the use of the tensor train decomposition component208during evaluation can take place in either an online mode, an offline mode, or some combination thereof. In an online mode, a particular user who is being considered for display of a particular item will have their user information gathered along with the particular item's information and fed to the evaluation data preparation component210, which prepares the evaluation vector in real-time. Alternatively, in an offline mode, various user/item combinations will have their information proactively gathered and formed into an evaluation vector and fed to the tensor train decomposition component208to allow for offline scoring. Alternatively, a combination of offline and online modes may be used where some information is prepared offline and some online.

The output of the neural network202is, at evaluation time, the engagement score for the user and content information passed at evaluation time. This engagement score may then be used by another component to make a decision relevant to the online network, such as by a content item ranking component (not pictured) that ranks content items being considered for display to a particular user, and subsequently by a presentation component (not pictured) to present appropriate content items to the user (such as through feed notifications, display on a search results page, or direct communication such as via email).

A retraining component212may then, at a later time, retrain the neural network202. This retraining may be based on additional or new training data being received and/or may be based on analysis of the performance of the neural network202, as expressed by usage data for users who have had content presented to them due to the results of the neural network202. In the latter case, for example, if a user was displayed a particular content item due to the neural network predicting a high likelihood of engagement of that user with that content item, and the user ultimately does not engage with the content item, or otherwise signals a negative association with the content item, this information may be used as negative feedback by the retraining component212, which may then change the neural network202to attempt to provide more accurate predictions in the future for the user or users like that user.

For the following equations, the following definitions are used. Ā is a generic matrix of dimensionality M×N, where M is the number of rows of the matrix and N is the number of columns of the matrix. This matrix could correspond to the weight matrix of the first layer of a deep neural network. Hence, M would signify the input dimensionality of the feature vector and N would signify the dimensionality of the output learnt segmented feature representation. That is, if {right arrow over (d)}extendedis the input to the segmentation layer, Ā{right arrow over (d)}extendedwould be the output.

A is a p-dimensional tensor of dimensionality k1×k2. . . ×kp, with k1×k2. . . ×kp=M×N. Ā is converted to A using tensor train decomposition as described above to obtain a compressed and meaningful segmented feature representation easily for any given input. That is, instead of using Ā{right arrow over (d)}extended, A{right arrow over (d)}extended, is used. In this conversion, every element of Ā can be mapped to a corresponding element in A.

g and h correspond to the row and column bijections as described above. In other words, g provides a one-to-one mapping between the set of indices [1, M] and [1, m1]×[1, m2] . . . ×[1, mp] and h provides a one-to-one mapping between the set of indices [1, N] and [1, n1]×[1, n2]× . . . [1, np], with

m1⁢x⁢m2⁢…⁢x⁢mp=M⁢and⁢n1⁢x⁢n2⁢…⁢x⁢np=N.

Gifrom i=1, . . . , p corresponds to the tensor cores. That is, every element of the tensor A can be written as a product of elements of the core matrices as A(j1, j2, . . . jpn)=G1[j1] G2[j2] . . . Gn[jnp]. ricorresponds to the TT-ranks of the tensor cores. That is, riare used to represent dimensionality of the individual cores

Gi⁢as⁢G1∈R1⁢xr1,Gk∈Rrk-1⁢xrk⁢and⁢Gn∈Rrn-1⁢x⁢1n.

p is also related to the number of categorical variables used to define the segments.

Tensor networks help approximate large matrices. In general, their use involves two parts.(a) Converting a matrix Ā∈RM×Nto a p-d tensor A∈Rk1×k2. . . ×kp, where k1×k2. . . ×kp=M×N (as this will ensure that each element can be represented correctly).This involves creating a bijection, which maps each element of the matrix Ā to an element in the tensor. One way to generate the bijection is to create multiple bijections, specifically a separate bijection for row and columns.Row bijection:

g⁢:[1,M]→[1,m1]⁢X[1,m2]⁢…⁢X[1,mp]Column bijection:

h⁢:[1,N]→[1,n1]⁢X[1,n2]⁢X⁢….[1,np]Where⁢n1×n2⁢…⁢x⁢np=N⁢and⁢m1×m2⁢…⁢x⁢mp=MWhere the final bijection is

f⁢:[1,M]⁢X[1,N]→[1,k1]⁢X[1,k2]⁢X⁢….[1,kp]Where each dimension l∈1 . . . p k1=ml×nlby composing the row and column bijections(b) Approximating the elements of the n-d matrix as

A⁡(j1,j2,…⁢jn)=G1[j1]⁢G2[j2]⁢…⁢Gn[jn]Where⁢G1∈R1⁢xr1,Gk∈Rrk-1⁢xrk⁢and⁢Gn∈Rrn-1⁢x⁢1n.G1[j1]means that a different matrix is chosen for a different index jTypically, without any special information, all rimay be fixed to be the same value.

Consider an input feature set, which is a dense vector {right arrow over (d)} with a shape ×1. For each member/item, consider p−2 categorical features, f1. . . fp-2each with d1. . . dp-2individual values respectively. Crossing these p−2 categorical variables with the dense vector {right arrow over (d)} will create a vector {right arrow over (d)}extendedof dimensionsd×d1× . . . dp-2=M. Slayer Ā is introduced that consumes this input vector, and outputs a N dimension variable (N can be 1 if the output is fed to a sigmoid function).

One way to approximate the matrix behind the layer (which is of dimension M×N) is to use the following bijection definition for a tensor train decomposition.

g⁢:[1,M]→[1,m1]⁢X[1,m2]⁢…⁢X[1,mp]
Where the first dimension corresponds to the input vector of shape m1=dand the next p−2 dimensions correspond to the categorical variables, i.e., mk=dk−1for k=2 . . . p−1 and mp=1. The following definition is also used

h⁢:[1,N]→[1,n1]⁢X[1,n2]⁢X⁢….[1,np]
Where the first p−1 dimensions are always 1, nk=1 for k=1 . . . p−1 while np=N, i.e., all column indices map to the last item.

For modeling purposes, the matrix vector product of the Ā{right arrow over (d)}extendedis computed, which will be the output of this layer.

The definition above is special because it leads to efficiency in matrix vector multiplications, as well as implementation under one special consideration: each segment categorical feature for a particular data point is unique. Particularly, this means that the

A_⁢d→extended=G_1⁢G2[j2]⁢…⁢Gn-1[jn-2]⁢G_n⁢d→
WhereG1is ad−×r dimension matrix, which contains all the G1[j1] (1×r)vectors stacked vertically, and Gnis a r×N dimension matrix and the indices j2. . . jn−2are unique.

Implementation wise, what this means is that segments are used to pick different matrices G2[j2] and then a standard matrix vector multiplication product is executed to obtain an approximation of the matrix that can be used by a compact neural network.

The segment model choices above provide a good expressive global model, which allows for hierarchical generalization. For example, consider the following segments—general level of engagement, geographic location, and industry. From a learning standpoint, all data points corresponding to the same geographic location, irrespective of other segments, will contribute to optimizing the Gl[jl] matrix. This could lead to some hierarchical generalization and elevate the global model quality.

From a fine-tuning standpoint, this structure of the neural network is also very efficient since it only needs to fine tune very few of the Gl[jl] matrices.

Tensor train layers can be used at any layer of the neural network, but in some example embodiments it may be beneficial to use a tensor train n the final layer while keeping other layers as is. For a given model, the final layer can be easily replaced by this layer, which takes in special side inputs (segment) information.

FIG.3is a block diagram illustrating a neural network202, in accordance with an example embodiment. Here the neural network may be a deep neural network. The neural network202may comprise a plurality of fully connected layers302A-302B. Fully connected layers302A-302B connect every neuron in one layer to every neuron in an adjacent layer. Input to fully connected layer302A may be a subset or full set of feature representations of the data, potentially containing the segment features as well. The feature representations are ones that may be relevant to some sort of output prediction306. For example, the output prediction306may be a likelihood that a particular user will engage with a particular content item (i.e., propensity to click). The features in such an example might include user features, such as those gathered from the user's profile and usage history, and item features, such as those gathered by data and metadata about the content item (e.g., text of the content item, type of the content item, etc.). The fully connected layers302A-302B may progressively refine the features in that the features used by fully connected layer302B may only be a subset of the features used by fully connected layer302A.

A segmentation layer304may learn segments for the data based on the output of the fully connected layer302B.

It should be noted that there may be other layers in the neural network202that are not pictured, such as input and output layers, convolutional layers (which apply a convolutional operation to the input), pooling layers (which combine the outputs of neuron clusters at one layer into a single neuron in the next layer), and normalization layers. Convolutional layers, pooling layers, fully connected layers, and normalization layers are known collectively as hidden layers. It should also be noted that there may be any number of fully connected layers, and embodiments are thus not limited to the two depicted here.

Furthermore, back propagation is used in the neural network202. This means that parameters learned at each layer are not just passed to subsequent layers but also passed back up to prior layers. Thus, for example, fully connected layer302B passes parameters not just to segmentation layer304but also to fully connected layer302A, allowing fully connected layer302A to essentially retrain itself while the remainder of neural network202is being trained.

The following pseudocode may be used for an implementation using tensor train decomposition for segment modelling:

import tensorflow as tfclass TensorTrainLayer(tf.keras.layers.Layer):def——init——(self, num_outputs, core_names_list, core_dimensions, core_r):super(TensorTrainLayer, self).——init——( )self.num_outputs = num_outputsself.core_names_list = core_names_listself.core_dimensions = core_dimensionsself.core_r = core_rself.total_params = Nonedef build(self, input_shape):self.total_params = 0self.cores = [ ]for i in range(len(self.core_dimensions)):t_shape = [self.core_dimensions[i], input_shape[‘x’][−1] if i==0 elseself.core_r, self.core_r]weights = self.add_weight(“core_” + str(i), shape=t_shape,initializer=tf.keras.initializers.GlorotUniform)self.cores.append((self.core_names_list[i], weights))self.total_params += t_shape[0] * t_shape[1] * t_shape[2]self.first_core = self.cores[0][1] #TODO removeself.final_layer = self.add_weight(“final_layer”, shape=[self.core_r,self.num_outputs], initializer=tf.keras.initializers.GlorotUniform)self.total_params += self.core_r * self.num_outputsd_core_dim = [float(a) for a in self.core_dimensions]self.original_total_params = input_shape[‘x’][−1] * self.num_outputs *tf.reduce_prod(d_core_dim)@tf.functiondef call_test(self, inputs):# Expand dimensions so that core mat mul works correctlyx = tf.expand_dims(inputs[“x”], axis=1)my_core_slice = tf.gather(self.first_core, tf.ones([1024], dtype=tf.int32))x = tf.linalg.matmul(x, my_core_slice)x = tf.squeeze(tf.linalg.matmul(x, self.final_layer))return x@tf.functiondef call(self, inputs):# Expand dimensions so that core mat mul works correctlyx = tf.expand_dims(inputs[“x”], axis=1)for core_name, core in self.cores:# Gather my slice# my_core_slice = tf.gather(core, tf.ones([1024], dtype=tf.int32))my_core_slice = tf.gather(core, inputs[core_name])# print(core_name, x, my_core_slice)x = tf.linalg.matmul(x, my_core_slice)x = tf.squeeze(tf.linalg.matmul(x, self.final_layer))return xdef print_usage_summary(self):if self.total_params:print(“Original parameter size”, self.original_total_params)print(“New parameter size”, self.total_params)

FIG.4is a flow diagram illustrating a method400of training a neural network, in accordance with an example embodiment. At operation402, training data comprising information about one or more users of an online network and one or more content items of the online network is accessed. In some example embodiments, the training data further comprises data about which users in the training data interacted with which items in the training data.

At operation404, one or more segments of the training data are obtained. This may be obtained by, for example, receiving an identification of the segments of particular training data when the training data is accessed. Each segment defines a division of data along some grouping or combination of one or more characteristics, such as user experience level, geographic area, industry, job function, etc. Thus, for example, one segment may be defined as computer programmers with at least 2 years experience in the San Francisco Bay Area, while another segment may be defined as computer programmers with at least 2 years experience in the New York Metropolitan area.

Essentially the segment can be defined as a set of one or more common characteristics of data within the segment.

A loop is then begun for each of one or more tensor train layer in the neural network. A tensor train layer is a fully-connected layer that uses tensor train decomposition. At operation406, a matrix associated with the corresponding tensor train layer is converted to a tensor using tensor train decomposition. Each of a plurality of dimensions of the tensor corresponds to a property used to define a different segment of the training data. The converting may include crossing one or more categorical variables in the training data with the training data to output a dense vector and passing the dense vector in a layer of the neural network designed to approximate the matrix using a bijection. Then, at operation408, the corresponding tensor train layer is trained using the training data and the tensor. In some example embodiments, this involves multiplying a vector representing the training data by the tensor.

At operation410, it is determined if there are any more tensor-train layers. If so, then the method400repeats to operation406for the next tensor train layer. If not, then the method400ends.

FIG.5is a flow diagram illustrating a method500of evaluating input data using a trained neural network, in accordance with an example embodiment. At operation502, the input data is accessed. The input data may include, for example, information about a particular user and a particular content item being considered for display to the particular user in a user interface of an online network. At operation504, a segment for the input data is determined. This may be performed in a number of ways. In one example embodiment, the input data is labelled with the segment, and thus the determination involves recognizing that label. In other example embodiments, a separate machine learning model may be used to predict the segment.

A loop is then begun for each of one or more tensor train layers in the neural network. At operation506, the input data is transformed using the tensor train layer, based on the segment. At operation508, output of the tensor train data is generated by applying the tensor train layer to the transformed input.

At operation510, it is determined if there are any more tensor-train layers. If so, then the method500repeats to operation506for the next tensor train layer. If not, then the method500ends.

FIG.6is a block diagram600illustrating a software architecture602, which can be installed on any one or more of the devices described above.FIG.6is merely a non-limiting example of a software architecture, and it will be appreciated that many other architectures can be implemented to facilitate the functionality described herein. In various embodiments, the software architecture602is implemented by hardware such as a machine700ofFIG.7that includes processors710, memory730, and input/output (I/O) components750. In this example architecture, the software architecture602can be conceptualized as a stack of layers where each layer may provide a particular functionality. For example, the software architecture602includes layers such as an operating system604, libraries606, frameworks608, and applications610. Operationally, the applications610invoke API calls612through the software stack and receive messages614in response to the API calls612, consistent with some embodiments.

In various implementations, the operating system604manages hardware resources and provides common services. The operating system604includes, for example, a kernel620, services622, and drivers624. The kernel620acts as an abstraction layer between the hardware and the other software layers, consistent with some embodiments. For example, the kernel620provides memory management, processor management (e.g., scheduling), component management, networking, and security settings, among other functionality. The services622can provide other common services for the other software layers. The drivers624are responsible for controlling or interfacing with the underlying hardware, according to some embodiments. For instance, the drivers624can include display drivers, camera drivers, BLUETOOTH® or BLUETOOTH® Low Energy drivers, flash memory drivers, serial communication drivers (e.g., Universal Serial Bus (USB) drivers), Wi-Fi® drivers, audio drivers, power management drivers, and so forth.

In some embodiments, the libraries606provide a low-level common infrastructure utilized by the applications610. The libraries606can include system libraries630(e.g., C standard library) that can provide functions such as memory allocation functions, string manipulation functions, mathematic functions, and the like. In addition, the libraries606can include API libraries632such as media libraries (e.g., libraries to support presentation and manipulation of various media formats such as Moving Picture Experts Group-4 (MPEG4), Advanced Video Coding (H.264 or AVC), Moving Picture Experts Group Layer-3 (MP3), Advanced Audio Coding (AAC), Adaptive Multi-Rate (AMR) audio codec, Joint Photographic Experts Group (JPEG or JPG), or Portable Network Graphics (PNG)), graphics libraries (e.g., an OpenGL framework used to render in two dimensions (2D) and three dimensions (3D) in a graphic context on a display), database libraries (e.g., SQLite to provide various relational database functions), web libraries (e.g., WebKit to provide web browsing functionality), and the like. The libraries606can also include a wide variety of other libraries634to provide many other APIs to the applications610.

The frameworks608provide a high-level common infrastructure that can be utilized by the applications610, according to some embodiments. For example, the frameworks608provide various graphical user interface functions, high-level resource management, high-level location services, and so forth. The frameworks608can provide a broad spectrum of other APIs that can be utilized by the applications610, some of which may be specific to a particular operating system604or platform.

In an example embodiment, the applications610include a home application650, a contacts application652, a browser application654, a book reader application656, a location application658, a media application660, a messaging application662, a game application664, and a broad assortment of other applications, such as a third-party application666. According to some embodiments, the applications610are programs that execute functions defined in the programs. Various programming languages can be employed to create one or more of the applications610, structured in a variety of manners, such as object-oriented programming languages (e.g., Objective-C, Java, or C++) or procedural programming languages (e.g., C or assembly language). In a specific example, the third-party application666(e.g., an application developed using the ANDROID™ or IOS™ software development kit (SDK) by an entity other than the vendor of the particular platform) may be mobile software running on a mobile operating system such as IOS™, ANDROID™, WINDOWS® Phone, or another mobile operating system. In this example, the third-party application666can invoke the API calls612provided by the operating system604to facilitate functionality described herein.

FIG.7illustrates a diagrammatic representation of a machine700in the form of a computer system within which a set of instructions may be executed for causing the machine700to perform any one or more of the methodologies discussed herein, according to an example embodiment. Specifically,FIG.7shows a diagrammatic representation of the machine700in the example form of a computer system, within which instructions716(e.g., software, a program, an application610, an applet, an app, or other executable code) for causing the machine700to perform any one or more of the methodologies discussed herein may be executed. For example, the instructions716may cause the machine700to execute the method500ofFIG.5. Additionally, or alternatively, the instructions716may implementFIGS.1-5, and so forth. The instructions716transform the general, non-programmed machine700into a particular machine700programmed to carry out the described and illustrated functions in the manner described. In alternative embodiments, the machine700operates as a standalone device or may be coupled (e.g., networked) to other machines. In a networked deployment, the machine700may operate in the capacity of a server machine or a client machine in a server-client network environment, or as a peer machine in a peer-to-peer (or distributed) network environment. The machine700may comprise, but not be limited to, a server computer, a client computer, a PC, a tablet computer, a laptop computer, a netbook, a set-top box (STB), a portable digital assistant (PDA), an entertainment media system, a cellular telephone, a smartphone, a mobile device, a wearable device (e.g., a smart watch), a smart home device (e.g., a smart appliance), other smart devices, a web appliance, a network router, a network switch, a network bridge, or any machine capable of executing the instructions716, sequentially or otherwise, that specify actions to be taken by the machine700. Further, while only a single machine700is illustrated, the term “machine” shall also be taken to include a collection of machines700that individually or jointly execute the instructions716to perform any one or more of the methodologies discussed herein.

The machine700may include processors710, memory730, and I/O components750, which may be configured to communicate with each other such as via a bus702. In an example embodiment, the processors710(e.g., a central processing unit (CPU), a reduced instruction set computing (RISC) processor, a complex instruction set computing (CISC) processor, a graphics processing unit (GPU), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a radio-frequency integrated circuit (RFIC), another processor, or any suitable combination thereof) may include, for example, a processor712and a processor714that may execute the instructions716. The term “processor” is intended to include multi-core processors710that may comprise two or more independent processors712(sometimes referred to as “cores”) that may execute instructions716contemporaneously. AlthoughFIG.7shows multiple processors710, the machine700may include a single processor712with a single core, a single processor712with multiple cores (e.g., a multi-core processor), multiple processors710with a single core, multiple processors710with multiple cores, or any combination thereof.

The memory730may include a main memory732, a static memory734, and a storage unit736, all accessible to the processors710such as via the bus702. The main memory732, the static memory734, and the storage unit736store the instructions716embodying any one or more of the methodologies or functions described herein. The instructions716may also reside, completely or partially, within the main memory732, within the static memory734, within the storage unit736, within at least one of the processors710(e.g., within the processor's cache memory), or any suitable combination thereof, during execution thereof by the machine700.

The I/O components750may include a wide variety of components to receive input, provide output, produce output, transmit information, exchange information, capture measurements, and so on. The specific I/O components750that are included in a particular machine700will depend on the type of machine700. For example, portable machines such as mobile phones will likely include a touch input device or other such input mechanisms, while a headless server machine will likely not include such a touch input device. It will be appreciated that the I/O components750may include many other components that are not shown inFIG.7. The I/O components750are grouped according to functionality merely for simplifying the following discussion, and the grouping is in no way limiting. In various example embodiments, the I/O components750may include output components752and input components754. The output components752may include visual components (e.g., a display such as a plasma display panel (PDP), a light-emitting diode (LED) display, a liquid crystal display (LCD), a projector, or a cathode ray tube (CRT)), acoustic components (e.g., speakers), haptic components (e.g., a vibratory motor, resistance mechanisms), other signal generators, and so forth. The input components754may include alphanumeric input components (e.g., a keyboard, a touch screen configured to receive alphanumeric input, a photo-optical keyboard, or other alphanumeric input components), point-based input components (e.g., a mouse, a touchpad, a trackball, a joystick, a motion sensor, or another pointing instrument), tactile input components (e.g., a physical button, a touch screen that provides location and/or force of touches or touch gestures, or other tactile input components), audio input components (e.g., a microphone), and the like.

In further example embodiments, the I/O components750may include biometric components756, motion components758, environmental components760, or position components762, among a wide array of other components. For example, the biometric components756may include components to detect expressions (e.g., hand expressions, facial expressions, vocal expressions, body gestures, or eye tracking), measure biosignals (e.g., blood pressure, heart rate, body temperature, perspiration, or brain waves), identify a person (e.g., voice identification, retinal identification, facial identification, fingerprint identification, or electroencephalogram-based identification), and the like. The motion components758may include acceleration sensor components (e.g., accelerometer), gravitation sensor components, rotation sensor components (e.g., gyroscope), and so forth. The environmental components760may include, for example, illumination sensor components (e.g., photometer), temperature sensor components (e.g., one or more thermometers that detect ambient temperature), humidity sensor components, pressure sensor components (e.g., barometer), acoustic sensor components (e.g., one or more microphones that detect background noise), proximity sensor components (e.g., infrared sensors that detect nearby objects), gas sensors (e.g., gas detection sensors to detect concentrations of hazardous gases for safety or to measure pollutants in the atmosphere), or other components that may provide indications, measurements, or signals corresponding to a surrounding physical environment. The position components762may include location sensor components (e.g., a Global Positioning System (GPS) receiver component), altitude sensor components (e.g., altimeters or barometers that detect air pressure from which altitude may be derived), orientation sensor components (e.g., magnetometers), and the like.

Communication may be implemented using a wide variety of technologies. The I/O components750may include communication components764operable to couple the machine700to a network780or devices790via a coupling782and a coupling792, respectively. For example, the communication components764may include a network interface component or another suitable device to interface with the network780. In further examples, the communication components764may include wired communication components, wireless communication components, cellular communication components, near field communication (NFC) components, Bluetooth® components (e.g., Bluetooth® Low Energy), Wi-Fi® components, and other communication components to provide communication via other modalities. The devices790may be another machine or any of a wide variety of peripheral devices (e.g., a peripheral device coupled via a USB).

Moreover, the communication components764may detect identifiers or include components operable to detect identifiers. For example, the communication components764may include radio frequency identification (RFID) tag reader components, NFC smart tag detection components, optical reader components (e.g., an optical sensor to detect one-dimensional bar codes such as Universal Product Code (UPC) bar code, multi-dimensional bar codes such as Quick Response (QR) code, Aztec code, Data Matrix, Dataglyph, MaxiCode, PDF417, Ultra Code, UCC RSS-2D bar code, and other optical codes), or acoustic detection components (e.g., microphones to identify tagged audio signals). In addition, a variety of information may be derived via the communication components764, such as location via Internet Protocol (IP) geolocation, location via Wi-Fi® signal triangulation, location via detecting an NFC beacon signal that may indicate a particular location, and so forth.

Executable Instructions and Machine Storage Medium

The various memories (i.e.,730,732,734, and/or memory of the processor(s)710) and/or the storage unit736may store one or more sets of instructions716and data structures (e.g., software) embodying or utilized by any one or more of the methodologies or functions described herein. These instructions (e.g., the instructions716), when executed by the processor(s)710, cause various operations to implement the disclosed embodiments.

As used herein, the terms “machine-storage medium,” “device-storage medium,” and “computer-storage medium” mean the same thing and may be used interchangeably. The terms refer to a single or multiple storage devices and/or media (e.g., a centralized or distributed database, and/or associated caches and servers) that store executable instructions716and/or data. The terms shall accordingly be taken to include, but not be limited to, solid-state memories, and optical and magnetic media, including memory internal or external to the processors710. Specific examples of machine-storage media, computer-storage media, and/or device-storage media include non-volatile memory including, by way of example, semiconductor memory devices, e.g., erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), field-programmable gate array (FPGA), and flash memory devices; magnetic disks such as internal hard disks and removable disks; magneto-optical disks; and CD-ROM and DVD-ROM disks. The terms “machine-storage media,” “computer-storage media,” and “device-storage media” specifically exclude carrier waves, modulated data signals, and other such media, at least some of which are covered under the term “signal medium” discussed below.

Transmission Medium

In various example embodiments, one or more portions of the network780may be an ad hoc network, an intranet, an extranet, a VPN, a LAN, a WLAN, a WAN, a WWAN, a MAN, the Internet, a portion of the Internet, a portion of the PSTN, a plain old telephone service (POTS) network, a cellular telephone network, a wireless network, a Wi-Fi® network, another type of network, or a combination of two or more such networks. For example, the network780or a portion of the network780may include a wireless or cellular network, and the coupling782may be a Code Division Multiple Access (CDMA) connection, a Global System for Mobile communications (GSM) connection, or another type of cellular or wireless coupling. In this example, the coupling782may implement any of a variety of types of data transfer technology, such as Single Carrier Radio Transmission Technology (1×RTT), Evolution-Data Optimized (EVDO) technology, General Packet Radio Service (GPRS) technology, Enhanced Data rates for GSM Evolution (EDGE) technology, third Generation Partnership Project (3GPP) including 3G, fourth generation wireless (4G) networks, Universal Mobile Telecommunications System (UMTS), High-Speed Packet Access (HSPA), Worldwide Interoperability for Microwave Access (WiMAX), Long-Term Evolution (LTE) standard, others defined by various standard-setting organizations, other long-range protocols, or other data-transfer technology.

The instructions716may be transmitted or received over the network780using a transmission medium via a network interface device (e.g., a network interface component included in the communication components764) and utilizing any one of a number of well-known transfer protocols (e.g., HTTP). Similarly, the instructions716may be transmitted or received using a transmission medium via the coupling792(e.g., a peer-to-peer coupling) to the devices790. The terms “transmission medium” and “signal medium” mean the same thing and may be used interchangeably in this disclosure. The terms “transmission medium” and “signal medium” shall be taken to include any intangible medium that is capable of storing, encoding, or carrying the instructions716for execution by the machine700, and include digital or analog communications signals or other intangible media to facilitate communication of such software. Hence, the terms “transmission medium” and “signal medium” shall be taken to include any form of modulated data signal, carrier wave, and so forth. The term “modulated data signal” means a signal that has one or more of its characteristics set or changed in such a manner as to encode information in the signal.

Computer-Readable Medium

The terms “machine-readable medium,” “computer-readable medium,” and “device-readable medium” mean the same thing and may be used interchangeably in this disclosure. The terms are defined to include both machine-storage media and transmission media. Thus, the terms include both storage devices/media and carrier waves/modulated data signals.