Categorical diagnoses from the Diagnostic and Statistical Manual of Mental Disorders (DSM) or International Classification of Diseases (ICD) manuals are increasingly found to be incongruent with emerging neuroscientific evidence that points towards shared neurobiological dysfunction underlying attention deficit/hyperactivity disorder and autism spectrum disorder. Using resting-state functional magnetic resonance imaging data, functional connectivity of the default mode network, the dorsal attention and salience network was studied in 1305 typically developing and diagnosed participants. A transdiagnostic hierarchical Bayesian modeling framework combining Indian Buffet Processes and Latent Dirichlet Allocation was proposed to address the urgent need for objective brain-derived measures that can acknowledge shared brain network dysfunction in both disorders. We identified three main variation factors characterized by distinct coupling patterns of the temporoparietal cortices in the default mode network with the dorsal attention and salience network. The brain-derived factors were demonstrated to effectively capture the underlying neural dysfunction shared in both disorders more accurately, and to enable more reliable diagnoses of neurobiological dysfunction. The brain-derived phenotypes alone allowed for a classification accuracy reflecting an underlying neuropathology of 67.33\% (+/-3.07) in new individuals, which significantly outperformed the 46.73\% (+/-3.97) accuracy of categorical diagnoses. Our results provide initial evidence that shared neural dysfunction in ADHD and ASD can be derived from conventional brain recordings in a data-led fashion. Our work is encouraging to pursue a translational endeavor to find and further study brain-derived phenotypes, which could potentially be used to improve clinical decision-making and optimize treatment in the future.