  Community Search (CS), a crucial task in network science, has attracted
considerable interest owing to its prowess in unveiling personalized
communities, thereby finding applications across diverse domains. Existing
research primarily focuses on traditional homogeneous networks, which cannot be
directly applied to heterogeneous information networks (HINs). However,
existing research also has some limitations. For instance, either they solely
focus on single-type or multi-type community search, which severely lacking
flexibility, or they require users to specify meta-paths or predefined
community structures, which poses significant challenges for users who are
unfamiliar with community search and HINs. In this paper, we propose an
innovative method, FCS-HGNN, that can flexibly identify either single-type or
multi-type communities in HINs based on user preferences. We propose the
heterogeneous information transformer to handle node heterogeneity, and the
edge-semantic attention mechanism to address edge heterogeneity. This not only
considers the varying contributions of edges when identifying different
communities, but also expertly circumvents the challenges presented by
meta-paths, thereby elegantly unifying the single-type and multi-type community
search problems. Moreover, to enhance the applicability on large-scale graphs,
we propose the neighbor sampling and depth-based heuristic search strategies,
resulting in LS-FCS-HGNN. This algorithm significantly improves training and
query efficiency while maintaining outstanding community effectiveness. We
conducted extensive experiments on five real-world large-scale HINs, and the
results demonstrated that the effectiveness and efficiency of our proposed
method, which significantly outperforms state-of-the-art methods.
