  Community detection techniques are useful for social media platforms to
discover tightly connected groups of users who share common interests. However,
this functionality often comes at the expense of potentially exposing
individuals to privacy breaches by inadvertently revealing their tastes or
preferences. Therefore, some users may wish to preserve their anonymity and opt
out of community detection for various reasons, such as affiliation with
political or religious organizations, without leaving the platform. In this
study, we address the challenge of community membership hiding, which involves
strategically altering the structural properties of a network graph to prevent
one or more nodes from being identified by a given community detection
algorithm. We tackle this problem by formulating it as a constrained
counterfactual graph objective, and we solve it via deep reinforcement
learning. Extensive experiments demonstrate that our method outperforms
existing baselines, striking the best balance between accuracy and cost.
