SYSTEM AND METHOD FOR GEOGRAPHICAL DISTANCE-BASED DEEP REPRESENTATION AND LEARNING THEREOF FOR USER LOCATION PREDICTION
The present teaching relates to method, system, medium, and implementations for characterizing data. A location feature is first received. A distance-aware embedding for the received location feature is obtained, where the distance-aware embedding for the location feature is learned based on distances between different pairs of locations. A representation of the location feature is then generated based on the embedding for location related predictions.
1 . A method implemented on at least one processor, a memory, and a communication platform for characterizing data, comprising:
receiving a location feature;
obtaining an embedding related to the location feature with distance-awareness, wherein the embedding for the location feature is learned based on distances between different pairs of locations;
generating a representation of the location feature based on the embedding, wherein the representation of the location feature using the embedding is to be used for location related predictions.
2 . The method of claim 1 , wherein the location feature includes one of a zip code and an IP address.
3 . The method of claim 2 , wherein
the zip code has a fixed vocabulary; and
the IP address has an open vocabulary.
4 . The method of claim 2 , wherein the location feature is linked to a coordinate of a center of a region associated with the location feature.
5 . The method of claim 4 , wherein the embedding for the location feature is trained via machine learning based on a training data batch having a plurality of location features, wherein the machine learning comprises:
determining the coordinate associated with each of the location features included in the training data batch;
determining a pair-wise distance of each of pairs of location features in the training data batch based on the coordinates of the location features of the pair to generate a distance matrix;
initializing an embedding for each of the location features in the training data batch;
estimating a similarity between each of pairs of embeddings of the location features in the training data batch;
computing a loss based on the pair-wise distances of pairs of location features in the distance matrix and the similarities of embeddings of corresponding pairs of location features;
adjusting values of the embeddings of the location features by minimizing the loss; and
repeating steps of estimating, computing, and adjusting until a pre-determined condition with respect to the loss is met.
6 . The method of claim 5 , wherein when the location feature corresponds to a zip code,
the embedding is retrieved from a storage for previously trained embeddings for zip codes; and
the step of initializing is performed by assigning random numbers as values of each of the embeddings for the location features in the training data batch.
7 . The method of claim 5 , wherein when the location feature corresponds to an IP address having a plurality of digits, the step of initializing comprises:
devising a one hot vector for each of the plurality of digits to generate a corresponding plurality of one hot vectors;
feeding each of the plurality of one hot vectors to a corresponding layer of a multilayer neural network, respectively, wherein each of the plurality of layers generates, as an output, a linear combination of an input along with an activation function, the input is a concatenation of a one hot vector of a corresponding digit with an output from a previous layer;
outputting, at the last layer of the multilayer neural network, an output vector as the embedding for the location feature.
8 . Machine readable and non-transitory medium having information recorded thereon for characterizing data, where the information, when read by the machine, causes the machine to perform the following steps:
receiving a location feature;
obtaining an embedding related to the location feature with distance-awareness, wherein the embedding for the location feature is learned based on distances between different pairs of locations;
generating a representation of the location feature based on the embedding, wherein the representation of the location feature using the embedding is to be used for location related predictions.
9 . The medium of claim 8 , wherein the location feature includes one of a zip code and an IP address.
10 . The medium of claim 9 , wherein
the zip code has a fixed vocabulary; and
the IP address has an open vocabulary.
11 . The medium of claim 9 , wherein the location feature is linked to a coordinate of a center of a region associated with the location feature.
12 . The medium of claim 11 , wherein the embedding for the location feature is trained via machine learning based on a training data batch having a plurality of location features, wherein the machine learning comprises:
determining the coordinate associated with each of the location features included in the training data batch;
determining a pair-wise distance of each of pairs of location features in the training data batch based on the coordinates of the location features of the pair to generate a distance matrix;
initializing an embedding for each of the location features in the training data batch;
estimating a similarity between each of pairs of embeddings of the location features in the training data batch;
computing a loss based on the pair-wise distances of pairs of location features in the distance matrix and the similarities of embeddings of corresponding pairs of location features;
adjusting values of the embeddings of the location features by minimizing the loss; and
repeating steps of estimating, computing, and adjusting until a pre-determined condition with respect to the loss is met.
13 . The medium of claim 12 , wherein when the location feature corresponds to a zip code,
the embedding is retrieved from a storage for previously trained embeddings for zip codes; and
the step of initializing is performed by assigning random numbers as values of each of the embeddings for the location features in the training data batch.
14 . The medium of claim 12 , wherein when the location feature corresponds to an IP address having a plurality of digits, the step of initializing comprises:
devising a one hot vector for each of the plurality of digits to generate a corresponding plurality of one hot vectors;
feeding each of the plurality of one hot vectors to a corresponding layer of a multilayer neural network, respectively, wherein each of the plurality of layers generates, as an output, a linear combination of an input along with an activation function, the input is a concatenation of a one hot vector of a corresponding digit with an output from a previous layer;
outputting, at the last layer of the multilayer neural network, an output vector as the embedding for the location feature.
15 . A system for characterizing data, comprising:
location feature determiner configured for receiving a location feature; and
a location representation generator configured for
obtaining an embedding related to the location feature with distance-awareness, wherein the embedding for the location feature is learned based on distances between different pairs of locations, and
generating a representation of the location feature based on the embedding, wherein the representation of the location feature using the embedding is to be used for location related predictions.
16 . The system of claim 15 , wherein the location feature includes one of a zip code and an IP address.
17 . The system of claim 16 , wherein
the zip code has a fixed vocabulary; and
the IP address has an open vocabulary.
18 . The system of claim 16 , wherein the location feature is linked to a coordinate of a center of a region associated with the location feature.
19 . The system of claim 18 , wherein the embedding for the location feature is trained via machine learning based on a training data batch having a plurality of location features, wherein the machine learning comprises:
determining the coordinate associated with each of the location features included in the training data batch;
determining a pair-wise distance of each of pairs of location features in the training data batch based on the coordinates of the location features of the pair to generate a distance matrix;
initializing an embedding for each of the location features in the training data batch;
estimating a similarity between each of pairs of embeddings of the location features in the training data batch;
computing a loss based on the pair-wise distances of pairs of location features in the distance matrix and the similarities of embeddings of corresponding pairs of location features;
adjusting values of the embeddings of the location features by minimizing the loss; and
repeating steps of estimating, computing, and adjusting until a pre-determined condition with respect to the loss is met.
20 . The system of claim 19 , wherein when the location feature corresponds to an IP address having a plurality of digits, the step of initializing comprises:
devising a one hot vector for each of the plurality of digits to generate a corresponding plurality of one hot vectors;
feeding each of the plurality of one hot vectors to a corresponding layer of a multilayer neural network, respectively, wherein each of the plurality of layers generates, as an output, a linear combination of an input along with an activation function, the input is a concatenation of a one hot vector of a corresponding digit with an output from a previous layer;
outputting, at the last layer of the multilayer neural network, an output vector as the embedding for the location feature.