BackgroundNeuroinflammation affects brain tissue integrity in multiple sclerosis (MS) and may have a role in major depressive disorder (MDD). Whether advanced magnetic resonance imaging characteristics of the gray-to-white matter border serve as proxy of neuroinflammatory activity in MDD and MS remain unknown. MethodsWe included 684 participants (132 MDD patients with recurrent depressive episodes (RDE), 70 MDD patients with a single depressive episode (SDE), 222 MS patients without depressive symptoms (nMS), 58 MS patients with depressive symptoms (dMS), and 202 healthy controls (HC)). 3 T-T1w MRI-derived gray-to-white matter contrast (GWc) was used to reconstruct and characterize connectivity alterations of GWc-covariance networks by means of modularity, clustering coefficient, and degree. A cross-validated support vector machine was used to test the ability of GWc to stratify groups according to their depression symptoms, measured with BDI, at the single-subject level in MS and MDD independently. FindingsMS and MDD patients showed increased modularity (ANOVA partial-η2 = 0.3) and clustering (partial-η2 = 0.1) compared to HC. In the subgroups, a linear trend analysis attested a gradient of modularity increases in the form: HC, dMS, nMS, SDE, and RDE (ANOVA partial-η2 = 0.28, p < 0.001) while this trend was less evident for clustering coefficient. Reduced morphological integrity (GWc) was seen in patients with increased depressive symptoms (partial-η2 = 0.42, P < 0.001) and was associated with depression scores across patient groups (r = -0.2, P < 0.001). Depressive symptoms in MS were robustly classified (88 %). ConclusionsSimilar structural network alterations in MDD and MS exist, suggesting possible common inflammatory events like demyelination, neuroinflammation that are caught by GWc analyses. These alterations may vary depending on the severity of symptoms and in the case of MS may elucidate the occurrence of comorbid depression.