Early life adversity is associated with differences in cognition and mental health that can impact on daily functioning. This study uses a hybrid machine learning approach that combines random forest classification with hierarchical clustering to clarify whether there are cognitive differences between individuals who have experienced moderate-to-severe adversity relative to those have not experienced adversity, to explore whether different forms of adversity are associated with distinct cognitive alterations and whether these such alterations are related to mental health using data from the ABCD study (n=5,955). Cognitive measures spanning language, reasoning, memory, risk-taking, affective control, and reward-processing predicted whether a child had a history of adversity with reasonable accuracy (67%), and with good specificity and sensitivity (>70%). Two subgroups were identified within the adversity group and two within the no adversity group that were distinguished by cognitive ability (low vs high). There was no evidence for specific associations between the type of adverse exposure and cognitive profile. Worse cognition predicted lower levels of mental health in unexposed children. However, while children who experience adversity had elevated mental health difficulties, their mental health did not differ as a function of cognitive ability, thus providing novel insight into the heterogeneity of psychiatric risk.