Patent attributes
During operation, a system obtains a graph that includes a set of nodes representing users in an online network and a set of edges representing relationships or interactions between pairs of the nodes. Next, the system selects egos containing a subset of the users that are representative of a distribution of an attribute across the users. The system then generates clusters of users, such that each cluster contains an ego and alters selected from the ego's connections in the graph. The system further divides the clusters between a treatment group and a control group, exposes alters in the treatment group to a treatment variant of an A/B test, and exposes alters in the control group to a control variant of the A/B test. Finally, the system outputs a result of the A/B test.