To characterize sexual behavioral heterogeneity among persons recently diagnosed with HIV and sexual behavioral changes thereafter, we used unsupervised and supervised machine learning algorithms on 20 years of baseline and follow-up data from the Swiss HIV Cohort Study (SHCS). We sought to identify behavioral clusters near diagnosis and to assess long-term time trends in changes in sexual behavior across them. We then compared these trends between men who have sex with men (MSM) and heterosexual (HET) persons living with HIV (PLWH).
Hierarchical principal component analysis inferred sexual behavior clusters based on combinations of variables on sexual behavior, non-sex related behavior and socio-demographics at baseline. A random forest classifier evaluated the role of these factors in cluster formation. We then assessed cluster specific time-trends in the search for differences between MSM and HET.
Analyses included 3,903 PLWH registered in the SHCS between 1999 and 2021 less than 6 months after HIV diagnosis who identified themselves as MSM (n=1,839) or HET (n=2,064). At registration, 44% of MSM and 56% of HET reported stable partnership while 78% MSM and 22% HET reported occasional partnership without significant changes during 20 years of follow-up. Overall, consistent condom use decreased considerably in both MSM and HET with stable partner (60% to 25% in MSM and 63 to 25% in HET; Figure 1A). Consistent condom use with occasional partner also declined for both (70% to 38% in MSM and 83% to 50% in HET). Our clustering algorithm identified 5 distinct behavioral clusters (C1-C5; Figure 1B). Sex with stable partner, condom use with stable partner and HIV status of stable partner where the most important features for this cluster formation. Trajectories of consistent condom use during follow-up with stable partner differed among clusters but were similar between MSM and HET except for clusters C1 and C4 comprising 15% of the study population (Figure 1C).
In 20 years of follow-up after HIV diagnosis, MSM and HET PLWH had similar, decreasing trends in condom use with stable and occasional partners. Algorithmically defined behavioral grouping soon after HIV diagnosis was only marginally sensitive to sexual preference. Moreover, differences between MSM and HET in sexual behavior time-trends after HIV-diagnosis other than occasional partnership were limited to a small fraction of the population.