Patent attributes
Method for encoding a query graph into a sequence representation includes receiving a set of m×n path queries representing a query graph, the query graph having a plurality of nodes including m root nodes and n leaf nodes, wherein m and n are integer values, each of the m×n path queries beginning with a root node and ending with a leaf node, and encoding positions of each node and each edge between nodes within each of the m×n path queries independently, wherein the encoded positions include a positional order within each path query. The positional encodings may include no positional ordering between different path queries. The query graph may include one or more missing entities and each token representing one of the one or more missing entities may be masked to produce a masked sequential query, which may be fed to a transformer encoder.