Sex Differences in the Patterns and Predictors of Cognitive Function in HIV

Despite advancements in antiretroviral therapy, mild cognitive deficits persist in nearly half of people with HIV (PWH). The profile of impairment in HIV is highly variable with deficits observed in a range of cognitive domains. Despite evidence of greater cognitive impairment among women with HIV (WWH) vs. men with HIV (MWH), it is unclear how MWH and WWH differ in the type of cognitive impairment and in risk factors associated with cognitive impairment profiles. In a large and well-characterized sample of PWH, we used machine learning to identify profiles of cognitive functioning and their associated factors overall and within sex. Participants included 1,666 PWH (201 WWH; 1,465 MMH) from the HIV Neurobehavioral Research Program who completed a neuropsychological test battery at their baseline visits. Using demographically-adjusted T-scores from 13 test outcomes assessing motor skills, executive functioning, attention/working memory, episodic learning and memory, verbal fluency, and processing speed, we used Kohonen self-organizing maps to identify patterns of high-dimensional data by mapping participants to similar nodes based on T-scores (MCLUST R package). Random forest models were used to determine how sociodemographic (e.g., age, education), clinical (e.g., depressive symptoms, substance use disorder), and biological (e.g., HIV disease characteristics) factors differentially related to membership within a cognitive profile. All analyses were repeated within sex. Three cognitive profiles were identified overall and within each sex. Overall and within MWH, there were unimpaired and global weakness profiles. The third profile in the total sample demonstrated relatively weak auditory attention whereas in MWH showed relative strengths in attention and processing speed. Conversely, there was no unimpaired profile among WWH. Rather, WWH demonstrated separate profiles reflecting weakness in motor skills, a relative weakness in learning and delayed recall, and global weaknesses with spared recognition memory. Despite different cognitive profiles by sex, the most discriminative factors were similar between men and women and included reading level (cognitive reserve), current and nadir CD4 count, plasma HIV viral load, duration of HIV disease, age, depressive symptoms, and race/ethnicity. Findings fill a knowledge gap concerning sex differences in cognitive impairment in PWH and inform personalized risk reduction and therapeutic strategies.


INTRODUCTION
The Human Immunodeficiency Virus (HIV) enters the central nervous system (CNS) within days of initial infection (1), in many cases leading to neurological, cognitive, and behavioral complications. Cognitive deficits are a common feature of HIV/AIDS. While the incidence of HIV-associated dementia has considerably decreased in the era of modern ART suppressing viral replication, mild cognitive deficits with no change in everyday function persist in 24% [95% confidence interval (CI) = 20.3-26.8] of people with HIV (PWH) and mild cognitive deficits with mildly decreased everyday function persist in about 13.3% (95% CI = 10.6-16.3) of PWH (2). Although executive function and memory deficits are most common in PWH in the post-ART era, the characterization of cognitive impairment in HIV is highly variable with deficits observed in a range of cognitive domains (3). Previous studies using statistical clustering techniques have identified differing profiles of cognitive function among PWH with some profiles resembling global impairment across domains while other profiles resemble more domain-specific impairment, particularly in the domains of episodic memory and executive function (4)(5)(6)(7). Similarly, there is also substantial variability in the risk factors associated with cognitive deficits among PWH that range from biological (e.g., CD4 + T-cell count, HIV viral load, comorbid health conditions), demographic (e.g., age, sex, race/ethnicity) to psychosocial factors (e.g., low education, depression, substance use/dependence). The persistence of cognitive impairment in the era of modern ART among PWH and the variability in the profiles and risk factors associated with cognitive impairment suggests that non-HIV factors associated with aging, comorbid conditions (e.g., cardiovascular disease) and psychosocial risk factors (e.g., poverty, poor education) likely contribute to cognitive impairment given the high prevalence of these factors among PWH (8,9). With this in mind, we propose looking beyond the construct of HIV-associated neurocognitive disorders (HAND) to identify the underlying pathophysiology linked to cognitive impairment as HAND requires other comorbidities to be ruled out as primary contributing factors.
Biological sex is an important determinant of cognitive impairment among PWH. In a recent literature review of sex differences in cognitive impairment among PWH (10), seven cross-sectional (11)(12)(13)(14)(15)(16)(17) and one longitudinal analysis (18) identified sex differences on global measures of cognitive impairment among PWH. Additionally, six cross-sectional (13-15, 17, 19, 20) and one longitudinal analysis (21) also reported sex differences in domain-specific cognitive performance. The strongest available evidence of adequately-powered studies indicates that WWH show greater deficits than MWH in the domains of learning and memory followed by speed of information processing and motor functioning, with inconsistent findings in executive functioning (17,21).
The greater vulnerability of WWH to cognitive impairment may reflect sociodemographic differences between men and women with HIV. WWH tend to have a higher prevalence of psychosocial risk factors including poverty, low literacy levels, low educational attainment, substance abuse, poor mental health, and barriers to health care services (10,22) as compared to MWH. These psychosocial risk factors may have biological effects on the brain that lead to reduced cognitive reserve among WWH (23,24) as evidenced by findings of greater susceptibility of cognitive function to the effects of mental health factors (e.g., depression) among WWH vs. MWH (25). Additionally, biological factors such as sex steroid hormones (e.g., estrogen, testosterone) and female-specific hormonal milieus (e.g., pregnancy, menstrual cycle, menopause transition) may contribute to sex differences in cognitive test performance in PWH. However, it remains unclear how MWH and WWH may differ in the patterns of cognitive impairment and risk factors associated with these patterns of cognitive impairment. Previous reports of impairment profiles among PWH have identified them in combined samples of men and women (4-7), masking possible sex-specific patterns of cognitive impairment among PWH. Furthermore, although a number of studies reported sex differences in the presence and pattern of cognitive impairment (14,16,17) and greater cognitive decline compared to MWH (18), only one study (17) was adequately powered to address meaningful sex difference in global cognitive function (10). A well-powered examination of the patterns and determinants of cognitive impairment by sex, that also controls for other demographic differences between WWH and MWH (e.g., age, education, race/ethnicity), can help to clarify the contribution of sex to heterogeneity in cognitive impairment among PWH. Such an examination could also clarify the related psychosocial vs. biological factors and, thereby, optimize risk assessments and intervention strategies in both sexes.
Leveraging comprehensive neuropsychological (NP) data from the large-scale cohort of the HIV Neurobehavioral Research Program (HNRP) at the University of California-San Diego, we used novel machine learning methods to identify differing profiles of cognitive function in PWH and to evaluate how these profiles differ between women and men in sex-stratified analyses. Rather, than using traditional cognitive domain scores, we used each of the NP test outcomes given that prior studies indicate that the correlation of NP test scores does not map to traditional domain scores in PWH. Furthermore, we determined how sociodemographic (e.g., age, education, race/ethnicity), clinical (e.g., functional status, depression, substance use disorders) and biological (e.g., measures of HIV disease severity, ART use, cardiovascular comorbid conditions, Hepatitis C co-infection) factors related to cognitive profiles within women and men. Based on previous studies among PWH (4)(5)(6), we hypothesized that the machine learning approach would identify distinct subgroups of individuals with normal cognitive function, global cognitive impairment, and domainspecific cognitive impairment. We further hypothesized that groups with domain-specific cognitive impairment would differ by sex, with WWH showing more consistent memory and processing speed impairment than MWH. Finally, we expected that similar sociodemographic/clinical/biological determinants would distinguish cognitive profiles (e.g., age, education, race, HIV viral load) among WWH and MWH; however, in line with previous research (25), we expected that depressive symptoms would be more strongly associated with cognitive impairment profiles among WWH than MWH.

Participants
Participants included 1,666 PWH (201 WWH; 1,465 MWH) enrolled in various NIH-funded research studies at the University of California, San Diego's HNRP, https://hnrp.hivresearch.ucsd. edu/. Study assessment details have been published elsewhere (3). The UCSD Institutional Review Board approved the studies. Participants provided written informed consent and were compensated for their participation. Exclusion criteria for the parent studies included history of non-HIV-related neurological, medical, or psychiatric disorders that affect brain functioning (e.g., seizure, stroke, psychosis), learning disabilities, and a first language that was not English. Inclusion in the current study required completion of neuropsychological and neuromedical evaluations at the baseline study visit. Exclusion criteria for the current study included a positive urine toxicology test for illicit drugs (excluding marijuana) or Breathalyzer test for alcohol on the day of clinic visit on the day of study visit.

NP Test Evaluation
NP test performance was assessed through a comprehensive, standardized, battery of tests that measure seven domains of cognition, including complex motor skills, executive function, attention/working memory, episodic learning, episodic memory (delayed recall and recognition), verbal fluency, and information processing speed. Motor skills were assessed by the Grooved Pegboard (GPEG) Dominant and Non-dominant Hand tests (26). Executive functioning was assessed by the Trail Making Test (TMT)-Part B (27) and the Stroop Color and Word Test interference score (28). Attention/working memory was assessed by the Paced Auditory Serial Addition Task (PASAT-50) (29,30). Episodic learning was assessed by the Total Learning scores of the Hopkins Verbal Learning Test-Revised (HVLT-R) (31) and the Brief Visuospatial Memory Test-Revised (BVMT-R) (32). Episodic memory was assessed by the Delayed Recall and Recognition scores of the HVLT-R and BVMT-R. Verbal Fluency was assessed by the "FAS" Letter Fluency test (33). Information processing speed was assessed by the WAIS-III Digit Symbol Test (34), the TMT-Part A, and the Stroop Color and Word Test color naming score. Raw test scores were transformed into age-, education-, sex-, and race/ethnicity-adjusted T-scores based on normative samples of HIV-uninfected persons (35,36). The use of demographically-adjusted T-scores are intended to control for these demographic effects as they occur in the general population.

Factors Associated With NP Profiles
We examined sociodemographic, clinical, and biological factors associated with cognitive impairment in the literature and available with enough participants to be adequately powered in analyses. Sociodemographic factors included age, years of education, and race/ethnicity. Although these factors were used to create the T-scores, there can still be remaining demographic associations with cognition within clinical populations such as PWH. For example, there is considerable interest in the possibility of abnormal cognitive aging PWH; also, in general, older PWH tend to have had their infections longer, may have had longer periods without benefit of suppressive ART, and more history of worse immunosuppression. Clinical factors included functional status as indicated by the number of daily activities with decreased independence from the Instrumental Activities of Daily Living questionnaire (IADL) from the modified version of the Lawton and Brody Activities of Daily Living Questionnaire (37), reading level (a proxy for cognitive reserve) based on the Wide Range Achievement Test-4 Reading subtest (WRAT-4 Reading) (38), self-reported depressive symptoms on the Beck Depression Inventory versions I (BDI-I) or II (BDI-II) (39), and diagnosis of lifetime and current major depressive disorder (MDD) as well as lifetime alcohol, cannabis, or other (i.e., amphetamine, cocaine, hallucinogen, inhalant, sedative, opioid, and PCP) substance use disorder based on the Composite International Diagnostic Interview using DSM-IV criteria (CIDI version 2.1) (40). Biological factors included HIV disease variables such as current CD4 + T-cell count, lowest CD4 + T-cell count ever recorded (nadir CD4), plasma HIV viral load, estimated duration of HIV disease, current use of ART, current use of anticholinergic-based medications (e.g., urinary incontinence and chronic obstructive pulmonary disease medications), Hepatitis C co-infection, and the cardiovascular comorbid conditions of hypertension, hyperlipidemia, and diabetes.

Statistical Analyses
All 13 NP tests were used to find groups of similar cognitive profiles within each participant subset (MWH, WWH) and in the total sample using a pipeline that consisted of dimension reduction with Kohonen self-organizing maps (SOM) followed by clustering to identify profiles based on those reduced dimensions. SOM was implemented using the Kohonen package in R (41). SOM is an unsupervised machine learning technique used to identify patterns in high-dimensional data (numerous variables) by producing a two-dimensional representation consisting of multiple nodes where each node is a group of one or more individuals with similar cognitive profiles and the location of the nodes within the 2-D representation is also a metric of similarity. Unlike probabilistic models, each individual can only be assigned to one node. The SOM grid consisted of a 10 × 10 hexagonal grid of nodes and the number of clusters for the final profiling was selected by looping over models created from 3 to 20 clusters and selecting the number that had the best fit based on entropy. Similar nodes were then clustered (grouped together) using the MClust package (42). MClust is an R Software package used for model-based clustering using finite normal mixture modeling that provides functions for parameter estimation via the Expectation-Maximization algorithm with an assortment of covariance structures which vary in distribution (spherical, diagonal, or ellipsoidal), volumes (equal or variable), shape (equal of variable), and orientation (equal or variable, only for ellipsoidal distribution). This program identifies the best model based on entropy (a model fit statistic). Once the clustering of the nodes was completed, cluster profiles were assigned to the individuals associated with that node. By using SOM and MClust in sequence, we were able to achieve fine-tuned clustering based on patterns of performance in cognitive testing.
Factors predicting profile membership between each impaired and unimpaired profile in the overall sample and within each group (MWH, WWH) were explored by creating a predictive Random Forest (RF) model using the Caret (43) package in R and then extracting variable importance (44). RF is an ensemble machine learning model based on classification trees that results in powerful prediction models based on non-linear combinations of subsets of input variables. Prior to model creation, the Synthetic Minority Over-sampling Technique (SMOTE) with the DMwR (45) package was used to control for bias due to any imbalance in the number of cases. RF models were created using internal validation using a 10-fold resampling method repeated 5 times. Pre-processing before RF creation involved removing variables as predictors if they had low variance or if they had >50% missing data. Any missing data in the remaining variables was imputed using the Multivariate Imputation by Chained Equations (46) (MICE) package in R using random forest imputations. ROC confidence intervals were calculated using the pROC package in R with 2,000 stratified bootstrap replicates (95% CI). Variable importance of all variables included in the RF models was used as the outcome metric of the predictive power of each variable. Variable importance is a scaled number [0-100] that indicates how important that variable is to the final predicted outcome in that model. For each tree in the RF model, the out-of-bag portion of the data is recorded and repeated after permuting each predictor variable. The difference between the accuracy with and without each variable is averaged over all trees and then normalized by the standard error. For visualization, all variables were plotted by relative variable importance, and attention was given to the top 10 variables in each profile. Variable importance indicates how much that variable contributes to overall prediction accuracy, but as RF is non-linear model it does not indicate directionality.
While the analysis pipeline and packages used along with the parameter inputs are stated above, we have added our code into a Supplementary Material to facilitate rigor and reproducibility. Table 1 provides sociodemographic, behavioral, and clinical factors for 1,666 PWH (1,465 men; 201 women). On average, participants were 41.8 years of age [standard deviation (SD) = 9.8] with 13.3 years of education (SD = 2.7). Fifty-eight percent were White and 18% Black. Mental health comorbidities were common. Forty-eight percent had a lifetime, and 19% had a current, diagnosis of MDD. With respect to HIV-related clinical characteristics, 60% were on combination ART and 42% were virally suppressed. Compared to MWH, WWH were less educated, had lower WRAT-4 scores, were less likely to be white, and had a shorter duration of HIV disease (P's < 0.05). Additionally, WWH reported more IADL dependence and were more likely to have HCV co-infection compared to MWH (P's < 0.05). Table 2 provides NP test performance for the total sample and by sex. In the total sample, average performance on BVMT-R delayed recall, HVLT-R (total learning, delayed recall, recognition), GPEG-non-dominant, and PASAT had T-scores <45 or 0.5 standard deviations from the general population mean (T-score of 50). WWH performed worse than MWH on BVMT-R total learning on average (P = 0.01). However, WWH performed better on the recognition measures of the BVMT-R and HVLT-R (P's < 0.01). This was also the case examining percent impairment using a T-score cutoff of 40 (P's < 0.001).

Identification of Cognitive Profiles in the Total Sample
Profiles where the mean T-score on all cognitive outcomes was >45 and <55 were considered an "unimpaired average" profile. To describe the profiles, tests where the average Tscores of all participants in that cluster were <45 were considered weaknesses, and those where the average was <40 were considered impaired. An average >55 was considered a relative strength in the context of other domains being in the average range (>45 and <55).
Profiling of the 1,666 PWH resulted in three total groups using an ellipsoidal multivariate mixture model with equal orientation with an entropy of 0.982 ( Figure 1A).   Table 1 also provides Tscores and percent impairment on each task within each of the profiles for reference.

Identification of Cognitive Profiles in MWH and WWH Separately
Profiling of the 1,465 MWH also resulted in three groups using an ellipsoidal multivariate mixture model with equal orientation with an entropy of 0.993 ( Figure 1B).  and weaknesses on TMT-Part A&B, Letter Fluency, and Digit Symbol.
Profiling of the 201 WWH also resulted in three groups using an ellipsoidal multivariate mixture model with equal orientation with an entropy of 0.989 ( Figure 1C).

Predictors of Cognitive Profiles in the Total Sample
In RF models, the top 10 variables distinguishing each of the impaired profiles-Relatively weak auditory attention and episodic memory [Profile 2; receiver operating curve (ROC) = 0.94] and Global weaknesses (Profile 3; ROC = 0.95)-from the unimpaired profile (Profile 1) were the same and included: WRAT-4, age, duration of HIV disease, nadir CD4 counts, education, BDI-II, IADL dependence, log plasma viral load, and race/ethnicity ( Figure 3A). In each case, the impaired profiles or those with weaknesses (2 and 3) had lower WRAT-4 and higher BDI-II scores than the unimpaired profile (Profile 1) ( Table 3). The Relatively weak auditory attention and episodic memory profile (Profile 2) group also was less educated, more   Frontiers in Neurology | www.frontiersin.org 9 November 2020 | Volume 11 | Article 551921 likely to be Hispanic, and had a shorter duration of HIV disease compared to the unimpaired profile (Profile 1). However, the Global Weaknesses profile (Profile 3) was older, had more IADL dependence, a longer duration of HIV disease, and lower current and nadir CD4 counts as compared to the unimpaired profile.

MWH
In RF models in MWH, the top 10 variables distinguishing the Global weaknesses profile (Profile 3) and Relative strength in attention and processing speed (Profile 2) from the unimpaired profile (Profile 1) (ROC = 0.95 and ROC = 0.92, respectively) were the same and included: IADL dependence, WRAT-4, BDI-II, nadir CD4 count, duration of HIV disease, current CD4 count, education, age, log plasma viral load, and race ( Figure 3B). The Global weaknesses profile (Profile 3) was older, had higher IADL dependence, and BDI-II scores, longer duration of HIV disease, and lower current and nadir CD4 counts compared to the unimpaired profile (Profile 1) ( Table 4).
The Relative strength in attention and processing speed (Profile 2) was more likely to be White, had higher WRAT-4 and lower BDI-II scores, had higher current and nadir CD4 counts, and lower log plasma viral loads than the unimpaired profile (Profile 1).

WWH
In RF models in WWH, nine out of the top 10 variables distinguishing the Relative weaknesses in learning and memory profile (Profile 2) and Global weakness with spared verbal recognition (Profile 3) from the profile only demonstrating Weakness in motor function (Profile 1; ROC = 0.95 and ROC = 0.90, respectively) were the same and included: WRAT-4, age, log plasma viral load, BDI-II, current and nadir CD4 count, duration of HIV infection, IADL dependence, and education ( Figure 3C). The only unique variable distinguishing the profile demonstrating Relative weaknesses in learning and memory (Profile 2) from the profile demonstrating Weakness in motor function (Profile 1) was race. However, the unique variable distinguishing the profile demonstrating Global weaknesses with spared verbal recognition (Profile 3) from the profile demonstrating Weakness in motor function (Profile 1) was a current diagnosis of MDD. The Relative weaknesses in learning and memory profile (Profile 2) was older, less likely to be Hispanic, more likely to be non-Hispanic White, and had lower BDI-II scores compared the profile demonstrating Weakness in motor function (Profile 1) ( Table 5). However, the Global weaknesses with spared verbal recognition profile (Profile 3) was more likely to be non-Hispanic White, have lower WRAT-4 scores, had more IADL dependence and higher BDI-II scores, was more likely to have a current diagnosis of MDD, have higher log plasma viral loads, lower current and nadir CD4 counts, and a shorter duration of HIV disease compared to the profile demonstrating Weakness in motor function (Profile 1).

DISCUSSION
In this large-scale study using a novel pipeline combination of machine learning methods, we provide further evidence in support of heterogeneity in cognitive function among PWH.
Our results do not negate the heterogeneity in cognitive function in HIV-uninfected individuals but rather highlights the heterogeneity among PWH that can often be masked by a dichotomous HAND categorization. In the total sample, we identified an unimpaired profile, a profile of relatively weak auditory attention and episodic memory, and a global weakness profile. As expected, given the relative sample sizes, the cognitive patterns in the total sample were in greater alignment with those found among MWH compared to WWH. Similar to results in the overall sample, we identified an unimpaired profile and a global weakness profile in MWH; however, unlike the overall sample and inconsistent with hypotheses of domainspecific cognitive impairment profiles in both MWH and WWH, MWH demonstrated a profile with relative strengths in attention and processing speed. Conversely, there were no unimpaired, cognitive strength or global weakness profiles among WWH. Rather, as hypothesized WWH demonstrated cognitive profiles reflecting a global weakness (with spared verbal recognition) and domain-specific impairment including a weakness in learning and memory and motor skills. These findings suggest that sex and the sociodemographic factors associated with female sex within the HIV-infected population contribute to the heterogeneity in cognitive function among PWH. Studies examining cognitive function in combined samples of men and women may mask important sex differences in cognitive functioning among PWH, particularly in maledominant samples such as the current sample. These sex differences in cognitive profiles among PWH may result from biological sex differences and/or the psychosocial factors that tend to characterize WWH more than MWH (e.g., low education, poverty). Biological sex differences include those seen in the general population such as sex steroid hormones (e.g., estrogen, progesterone, testosterone), female-specific reproductive events (e.g., parity, reproductive span, hormone therapies) and genetic factors or previously-reported sex differences specifically in HIV disease characteristics unmeasured herein (e.g., size of viral reservoirs, CD4 cell count at seroconversion) (47,48). Regardless of the underlying mechanism, characterizing these sex differences in cognitive functioning among PWH can provide inroads to identifying mechanisms of cognitive dysfunction and optimizing risk assessments and diagnostic and therapeutic strategies for each sex. A notable sex difference in profiles was the lack of the unimpaired or cognitive strength profile among WWH that was observed among MWH. Our cognitive profile analyses are in line with prior studies that suggests that WWH are often but not always, more likely to demonstrate cognitive deficits than MWH (10). Our analysis suggests that the impairment manifests more often as domain-specific impairment (i.e., learning, memory, motor) in women than in men that may not be revealed in a more cross-domain summary measure like GDS or global Tscores. This female vulnerability to cognitive deficits is thought to reflect sociodemographic differences whereby low education and socioeconomic status and their associated psychosocial risk factors (e.g., depression, poverty, early-life trauma, barriers to health care, co-infections) are more prevalent among WWH vs. MWH (10,22,49). These psychosocial risk factors can have adverse effects on the brain that lower cognitive reserve (23,24,50,51), suggesting that interventions geared toward addressing these psychosocial factors should be a priority for WWH and/or for women who are at increased risk of HIV. In support of these studies, Sundermann et al. (17) found that the higher rates of cognitive impairment in WWH vs. MWH were eliminated after adjusting for the lower reading level (i.e., WRAT-4 score) that characterized WWH compared to MWH. Biological differences may also contribute to sex differences in the pattern and magnitude of cognitive impairment in PWH including disease characteristics, brain structure/function, sex steroid hormones and female-specific hormonal milieus (e.g., pregnancy, menstrual cycle, menopause transition). There is also evidence to suggest that WWH may be more cognitively susceptible than MWH to the effects of mental health factors (25).
As mentioned, only women demonstrated more domainspecific cognitive profiles including weakness in motor functioning and relative weakness in learning and memory. Similarly, previous studies report that learning, memory, and motor functioning are among the domains in which cognitive impairment is more common among WWH vs. MWH (10) and these differences persisted after adjusting for HIV RNA and CD4 counts (21). These sex differences in domain-specific impairment may reflect psychosocial factors (e.g., cognitive reserve, mental health), biological factors (sex steroid hormones, genetic), or interactions among them. Although women in general demonstrate relative advantages in verbal memory and fine motor function compared men (52)(53)(54)(55)(56)(57) likely due, at-least in part, to the effects of estrogen on the developing brain and the neuroprotective effects of circulating estradiol (58)(59)(60), the menopause transition has been associated with declines in verbal memory and motor function (61)(62)(63). The mean age of women in our study was 41 (SD = 9.6; 33% >45 years of age) suggesting that a portion of women may be experiencing cognitive deficits associated with reproductive aging. Germane to the learning/memory impairment in WWH, women are more vulnerable to the negative effects of stress hormones on hippocampal-dependent tests compared to men (64). This finding may be particularly relevant to the current sample considering the high prevalence of psychosocial stressors among WWH including childhood trauma and domestic violence (65).
Unlike MWH, WWH demonstrated a global impairment profile with spared verbal recognition. Consistently, previous findings regarding memory impairment among PWH found this impairment to be more dependent on frontal and subcortical structures with relatively normal memory retention but impaired memory retrieval (recall but not recognition deficits) (66)(67)(68). Even in the female-specific profile of relative weakness in learning and memory, recognition was less impaired compared to learning and recall. We can only speculate as to why the sparing of recognition in the global impairment profile was specific to WWH and to verbal vs. visual memory. It is possible that, in the context of cognitive impairment in HIV, the female advantage in verbal memory may be most salient for the least cognitivelytaxing memory component, recognition performance, and this advantage is not fully adjusted for in our demographicallycorrected T-scores.
Despite the heterogeneity in cognitive profiles by sex, the sociodemographic/clinical/biological factors associated with these cognitive profiles were similar for MWH and WWH suggesting that, although the same factors confer increased vulnerability to cognitive dysfunction, the adverse effects of these factors impact brain function differently in men and women. In both MWH and WWH, WRAT-4 had the greatest discriminative value of profile class followed by HIV disease variables (e.g., CD4 count, viral load and estimated duration of HIV disease), depressive symptoms, age, race/ethnicity and years of education. WRAT-4 scores have been consistently identified as an important determinant of cognitive function among PWH, with lower WRAT-4 scores conferring risk for cognitive impairment (17,69). WRAT-4 performance may be particularly salient in this population, given that reading level may reflect education quality, above and beyond years of education, especially in lower socioeconomic populations because of the many factors impacting education quality (e.g., ability to attend school, economic disadvantages in schools within low SES districts) (69). Additionally, reading level is associated with health outcomes including hospitalizations and outpatient doctor visits (70) and, thus, may be a proxy for biopsychosocial factors underlying general health (e.g., socioeconomic status, self-efficacy).
HIV disease variables were also strong determinants of cognitive profiles in both men and women. Aside from some instances of a shorter duration of HIV disease relating to more cognitive impairment in WWH and in the total sample, the more biologically-based HIV disease variables were associated with cognitive impairment in the expected direction; higher current and nadir CD4 count and lower viral load were protective against cognitive impairment. It is curious that the global weakness with spared verbal recognition profile in women was associated with more severe HIV-related variables (i.e., higher viral loads, lower current, and nadir CD4 counts) yet with shorter duration of HIV infection. We speculate that the shorter HIV infection in WWH may reflect CNS effects of untreated and/or earlycourse HIV infection. Alternatively, the self-reported shorter duration of infection may not have been accurate, to the extent that WWH lived longer with untested/undetected infections. Findings are consistent with a wealth of literature relating proxies of HIV disease burden and severity to cognitive function (71)(72)(73) and suggests that, even in the era of effective ART when viral suppression is common, HIV disease burden can have adverse effects on the brain possibly due to poor penetration of ARTs into the CNS, ART resistance, poor medication adherence (74), and/or the establishment of viral reservoirs in the CNS reservoir (75,76).
In line with hypotheses of mental health factors relating to cognitive impairment profiles more strongly in women, current diagnosis of MDD was a predictor of cognitive profiles only among WWH. Although the prevalence of a current or lifetime diagnosis of MDD did not differ between WWH and MWH, MDD was an important risk factor of demonstrating Global weaknesses with spared verbal recognition (Profile 2) compared to the profile demonstrating only Weakness in motor function (Profile 1). This finding aligns with our work demonstrating that MDD may have a greater impact in women compared to men (25). Our work indicates that HIV comorbid with depression affects certain cognitive domains including cognitive control, and that these effects are largest in women. Specifically, WWH with elevated depressive symptoms had 5 times the odds of impairment on Stroop Trial 3, a measure of behavioral inhibition, compared to HIV-uninfected depressed women, and 3 times the odds of impairment on that test compared to depressed MWH. In a recent meta-analysis, small to moderate deficits in declarative memory and cognitive control were documented not only in individuals with current MDD but also in individuals with remitted MDD, leading to the conclusion that these deficits occur independently of episodes of low mood in individuals with "active" MDD (77). Together these lines of work suggest that MDD would exacerbate (or co-occur with factors that cause) cognitive difficulties in PWH, particularly in the cognitive domains of declarative memory and cognitive control in WWH.
Our study has limitations. Although we were adequately powered within both WWH and MWH (10), the magnitude of power was discrepant by sex considering that women represented 20% of our sample. Larger-scale studies in WWH only are currently underway. The generalizability of our findings also warrant additional study as the profiles identified here may not represent the profiles among all PWH. Due to the unavailability of data, we were unable to explore certain psychosocial factors (e.g., early life trauma, perceived stress) as potential determinants of cognitive profiles. Our analyses were cross-sectional which allows us to identify determinants associated with cognitive profiles but precludes us from determining the temporal relationships between these factors and cognitive function. Although many of the related factors may be risk factors for cognitive impairment, reverse causality is possible with some of the factors resulting from cognitive impairment (e.g., depression, IADL). Additionally, interpretation of the machine learning results should be done with care as RF is an ensemble model that is inherently non-linear in nature. This means that the importance and predictive power of every variable is specified in the context of other variables. This can lead to situations where an important predictive variable in the RF model has no significant difference in the overall comparison but has dramatic differences when included with other variables in the model. As such, this model should be interpreted as hypothesis-generating and identifies variables in need of further investigation. Lastly, because our study was focused on sex differences in cognitive profiles within PWH, we did not include a HIV-seronegative comparison group. Thus, we cannot determine the degree to which HIV contributes to sex differences in cognitive profiles. However, the independent HIV-related predictors does suggest that HIV has a role. Despite these limitations, we selected RF over linear models such as lasso and ridge regression because RF models had more predictive power and higher accuracy in this data compared to the linear models, even linear models with tuning parameters such as ridge and lasso that can used for feature selection. The results from these models mirror the P-values for the univariate comparisons (see Tables 1-5), which is expected since analysis of variance and t-tests are also linear models. Moreover, RF models are more optimal for handling missing data, the inclusion of categorical predictor variables, and the use of categorical outcome measures which was the case in the present study. RF models also account for the complexity in the data that can arise from multicollinearity often seen in large feature sets.
In conclusion, our results also suggest that sex is a contributor to the heterogeneity in cognitive profiles among PWH and that cognitive findings from MWH or male-dominant samples cannot be wholly generalized to WWH. Whereas, MWH showed an unimpaired profile and even a cognitively advantageous profile, WWH only showed impairment profiles that included global and more domain-specific impairment, which supports previous findings of greater cognitive impairment in WWH than in MWH (10). Although the strongest determinants of cognitive profiles were similar in MWH and WWH including WRAT-4, HIV disease characteristics, age and depressive symptoms, the direction of these associations sometimes differed. This suggests that the effects of certain biological, clinical, or demographic factors on the brain and cognition may manifest differently in MWH and WWH and that sex may contribute to heterogeneity not only in cognitive profiles but in their determinants although studies with larger numbers of WWH are needed to more definitively test these hypotheses. It is important to detect these differing cognitive profiles and their associated risk/protective factors as this information can help to identify differing mechanisms contributing to cognitive impairment and whether these mechanisms are related to HIV disease, neurotoxic effects of ART medications, and/or comorbidities that are highly prevalent among PWH (e.g., depression, substance abuse, hyperlipidemia). Given the longer lifespan of PWH in the era of effective antiretroviral therapy, cognitive profiling will also inform aging-related effects on cognition in the context of HIV and perhaps early clinical indicators of age-related neurodegenerative disease. By identifying cognitive profiles and their underlying mechanisms, we can ultimately improve our ability to treat by tailoring and directing intervention strategies to those most likely to benefit. Overall, our results stress the importance of considering sex differences in studies of the pathogenesis, clinical presentation, and treatment of cognitive dysfunction in HIV.

DATA AVAILABILITY STATEMENT
The data analyzed in this study is subject to the following licenses/restrictions: data from our study are available upon request. Persons with HIV are highly stigmatized, and even in the presence of strong de-identification, the risk of re-identification is real. Protecting persons with HIV remains our top priority. The Data Access Committee whom imposed these restrictions and to whom data requests should be made is the HNRP Data Resource Committee. Requests to access these datasets should be directed to hnrpresource@ucsd.edu.

ETHICS STATEMENT
The studies involving human participants were reviewed and approved by the Institutional Review Board of the University of California, San Diego. The patients/participants provided their written informed consent to participate in this study.

AUTHOR CONTRIBUTIONS
ES aggregated the data. LR, RD, and EP conducted statistical analyses. LR and ES have primary responsibility for final content and wrote the paper. All authors contributed to the project conception, design, manuscript editing, statistical review, and read and approved the final manuscript.

FUNDING
This research was funded by the Johns Hopkins University NIMH Center for novel therapeutics for HIV-associated cognitive disorders (P30MH075773) and by NIH RF1AG061070. The HIV Neurobehavioral Research Center (HNRC) was supported by Center award P30MH062512 from NIMH.