  Understanding user intentions is essential for improving product
recommendations, navigation suggestions, and query reformulations. However,
user intentions can be intricate, involving multiple sessions and attribute
requirements connected by logical operators such as And, Or, and Not. For
instance, a user may search for Nike or Adidas running shoes across various
sessions, with a preference for purple. In another example, a user may have
purchased a mattress in a previous session and is now looking for a matching
bed frame without intending to buy another mattress. Existing research on
session understanding has not adequately addressed making product or attribute
recommendations for such complex intentions. In this paper, we present the task
of logical session complex query answering (LS-CQA), where sessions are treated
as hyperedges of items, and we frame the problem of complex intention
understanding as an LS-CQA task on an aggregated hypergraph of sessions, items,
and attributes. This is a unique complex query answering task with sessions as
ordered hyperedges. We also introduce a new model, the Logical Session Graph
Transformer (LSGT), which captures interactions among items across different
sessions and their logical connections using a transformer structure. We
analyze the expressiveness of LSGT and prove the permutation invariance of the
inputs for the logical operators. By evaluating LSGT on three datasets, we
demonstrate that it achieves state-of-the-art results.
