linkedin / detext

DeText: A Deep Neural Text Understanding Framework for Ranking and Classification Tasks
BSD 2-Clause "Simplified" License
1.26k stars 133 forks source link

Doc/usr projection #11

Closed xwli-chelsea closed 4 years ago

xwli-chelsea commented 4 years ago

Description

Doc or usr representations are computed separately and the interaction features are calculated based on the individual doc/usr fields. Eg., if we have 1 query, n usr fields and m doc fields , the the size of cosine similarity features is (1+n)*m.

This PR adds the support for projecting the usr embeddings and doc embeddings into 1 usr embeddings and 1 doc embeddings. The resulting cosine similarity features have size (1+1)*1=2 for the previous example. This could potentially reduce the resource needed for pre-computation/similarity score calculation during online serving--we only need to store 1 usr embedding and 1 doc embedding instead of (n+m) embeddings.

Fixes # (issue) N/A

Type of change

Please delete options that are not relevant.

List all changes

Please list all changes in the commit.

Testing

Test Configuration:

Checklist