Introduction

Obsessive compulsive disorder (OCD) manifests itself in the form of recurrent obsessive thoughts or compulsive behaviors, which are uncontrollable.These symptoms seriously affect people’s lives and work, causing them a great deal of distress and pain. The current lifetime prevalence of OCD worldwide is estimated to be between 0.8 and 3.0%, making it a global burden1.

A large number of studies have demonstrated cognitive deficits in patients with OCD. Perna et al. found that patients with OCD had impaired spatial working memory and performed poorly on spatial storage capacity. It is suggested that impairment of the executive component may be a key factor in the poor spatial working memory of patients2. Benzina et al. found extensive neuropsychological dysfunction in OCD, manifested in most cognitive domains (memory, attention, Information processing speed, verbal fluency)3. In a review, Pauls et al. noted that frontal-subcortical circuits are implicated in the pathophysiology and neuropsychological deficits of OCD, particularly in executive function4. In addition to significant executive dysfunction, A large analysis of task-state functional neuroimaging data points to OCD exhibiting ventral prefrontal hyperactivation during processing such as negative emotions5. Cognitive deficits in OCD may be related to frontal-striatal dysfunction4,6, and abnormal activity in brain regions affects the metabolism of neurotransmitters (serotonin, dopamine, glutamate)7,8, the synthesis and degradation of which are closely linked to the involvement of one-carbon metabolism9,10. Currently, several studies have found that many psychiatric symptoms may be related to vitamin B12, folate and homocysteine levels in one-carbon metabolism11. It has been suggested that homocysteine has neurotoxic effects and may be involved in psychiatric disorders through activation or inhibition of N-glutamate receptors, thereby affecting cognitive function12,13. More scholars believe that elevated homocysteine, an intermediate in methionine metabolism, is a direct reflection of impaired methionine cycling, which leads to reduced methylation levels in vivo, resulting in impaired synthesis of neurotransmitters such as 5-hydroxytryptophan, dopamine, norepinephrine and glutamate in the brain14,15. Neurotransmitter imbalances in turn affect the regulation of mood, memory and attentional control8,16. The role of vitamin B12 as a coenzyme of methionine synthase in one-carbon metabolism contributes to the methylation of proteins, neurotransmitters and nerve membrane phospholipids15, and folate acts as a methyl donor, both of which are involved in one-carbon metabolism, assisting in the conversion of HCY to methionine, which helps to reduce HCY levels and maintain normal methylation processes and neurotransmitter synthesis17. Therefore, we suggest that one-carbon metabolic pathways and methylation processes may play a major role in the onset of neuropsychiatric symptoms18 as well as in the development of obsessive-compulsive disorder19. Some current studies have found significant differences in HCY levels in OCD patients compared to healthy controls, and relatively low levels of vitamin B12 and folate in OCD patients20,21, but few studies have explored the relationship between homocysteine, vitamin B12 and folate levels and cognitive functioning in OCD. Therefore, the aim of the present study was to investigate the relationship between serum homocysteine, folate and vitamin B12 levels in drug-naive OCD patients and their cognitive functioning.

Methods

Participants

This was a case-control study of 50 patients (28 males and 22 females) with drug-naive obsessive-compulsive disorder. Their age range was 18–50 years with a mean age of 29.16 ± 11.18 years. The mean length of education was 14.72 ± 2.56. The OCD group was recruited from February 2023 to April 2024 from psychiatric outpatient clinics and neurology outpatient referrals at the General Hospital of Ningxia Medical University. Fifty healthy subjects matched for age, sex and education level were included as study subjects. All potentially normal people with non-OCD were recruited by advertising in Ningxia.

The diagnosis of OCD was based on a number of aspects, including interviews with trained psychiatrists; face-to-face clinical observations of participants’ performance by psychiatrists; participants’ medical histories provided by close family members; and the use of the U.S. Diagnostic and Statistical Manual of Mental Disorders (DSM-5) and Yale-Brown Obsessive-Compulsive Scale(Y-BOCS). Participants in the control group did not meet current diagnostic criteria. The purpose and steps of the study were explained to each participant and informed consent was obtained before enrollment in the study. The study was approved by the Medical Research Ethics Review Committee of the General Hospital of Ningxia Medical University (KYLL-2023-0127).

Inclusion criteria

(i) Age 18–50 years old; (ii)Meet the diagnostic criteria of Diagnostic and Statistical Manual of Mental Disorders, Fifth Edition (DSM-V) OCD; (iii)Perform Yale-Brown Obsessive-Compulsive Scale (Y-BOCS) scores; (iv)First time onset of symptoms, no history of psychiatric medication; and no oral folate or vitamin B12 at the time of enrollment; (v)Educated and capable of completing Cognitive Functioning Scale.

Exclusion criteria

(i) Suffering from mental illness (schizophrenia, depressive disorder, panic disorder, bipolar disorder, etc.) and serious physical illness; (ii) History of cranial and cerebral organic disease; or cognitive decline caused by clear organic disease, dementia, etc. (iii) Alcohol dependence or other psychoactive substance dependence; (iv) Dementia and other mental retardation cannot cooperate with the completion of the test; (v) Participation in the poor enthusiasm; (vi) Other serious physical diseases such as heart, lung, liver and kidney function damage; (vii) Being on any type of medication.

All of the people enrolled in the group completed the following data collection

General information of the enrolled members was collected, including age, gender, and education level. Anxiety and depression were assessed by the Hamilton Anxiety Scale(HAMA) and the Hamilton Depression Scale(HAMD), and cognitive function was assessed by The MATRICS Consensus Cognitive Battery (MCCB)22 scales. The above scales were assessed by two trained psychiatrists and the consistency test was greater than 0.8.

Severity of Obsessive-Compulsive Disorder: The Yale-Brown Obsessive-Compulsive Scale (Y-BOCS) was used to assess the clinical severity of OCD symptoms. The use of the Y-BOCS to assess OCD has good reliability and construct validity23.

Some subscales of the MATRICS Consensus Cognitive Battery (MCCB) were selected for the assessment of cognitive functions22.

(i)Information processing speed: verbal fluency (Fluency), symbol coding (BACS), and trial making test (TMT).Among them, the Trail Making Test (TMT) includes two parts, A and B. The TMT(A + B) in the study was the sum of the number of seconds in both Part A and Part B.(ii) Working Memory: Spatial Working Memory: Wechsler Memory Scale-Third Edition (WMS-III); (iii) Alertness/Attention: Continuous Processing Test -Identical Pairs(CPT-IP); (iv)Verbal Learning: Hopkins Verbal Learning Test-Revised(HVLT-R); (v)Visual Learning: Brief Visuospatial Memory Test-Revised(BVMT-R); (vi)Social Cognitive Functioning: The Mood Management Test: Mayer-Salovey-Caruso Emotional Intelligence Test (MSCEIT).

Laboratory investigations

All the enrolled subjects chose the same day, the morning 8:30 − 9:00 uniform collection, fasting extraction of venous blood 5 ml, 3000 r/min centrifugation 20 min, separation of plasma and serum, placed in -20 ℃ refrigerator storage. The serum was taken and tested, and the specimens were free of lipemia and hemolysis. The levels of folate and vitamin B12 were determined by electrochemiluminescence method, and the serum HCY level was determined by enzyme circulation method.Chemical immunoluminescence is based on the principle of specific antigen-antibody binding, whereby an antibody or antigen labelled with a chemiluminescent substrate binds to a target molecule (folate or vitamin B12) in the sample, forming an immune complex24. Enzyme cycle assays use a series of enzymatic reactions to convert homocysteine into a detectable product25.

Statistical analysis

Pre-coded data was entered into the computer using‘Microsoft Office Excel Software’ program (2011) for Windows. Data was then transferred to the Statistical Pack-age of Social Science Software program, version 25 (IBM SPSS Statistics for Windows, Version 25.0. Armonk, NY: IBM Corp) for statistical analysis. Measurement data were expressed as (x ± s) and t-test was used between groups, and count data were expressed as number of cases (%) and χ2 test was used. Non-parametric test Kruskal-Wallis H test was used for variance disagreement, and the correlation between serum folate, vitamin B12 and HCY levels and general condition and cognition of OCD was expressed by Spearman’s correlation coefficient (r-value), and the difference was considered to be statistically significant at P < 0.05.Significance mediated effects tests were performed in SPSS using the PROCESS Model 4 plug-in program with bootstrap sampling set up, bias corrected 5000 times, and an effective confidence interval (CI) of 95%.

Results

Comparison of general demographic information

The mean age of the drug-naive OCD was 29.16 ± 11.18 years and the health control(HC) was 28.28 ± 6.13 years. The patient and control groups were 56% and 44% male in the sex ratio, respectively. There was no significant difference in socio-demographic data between the two groups (p>0.05). OCD patients reported mild anxiety and depression levels (HAMA, 13.35 ± 3.04, HAMD,11.07 ± 2.13, p < 0.05) (Table 1).

Table 1 Comparison of general demographic information.

Comparison of hematologic indicators and cognitive assessment scale scores between patient and control groups

Serum HCY was significantly higher, folate and vitamin B12 levels were significantly lower in the OCD than in the HC(P<0.05).

Cognitive functioning was significantly lower in the OCD than in the HC, mainly in terms of prolonged information processing speed (p < 0.001), impaired social cognitive functioning (p < 0.001), inattentiveness (p = 0.03), deficits in working memory (p = 0.012), and reduced visuospatial memory and verbal learning (p = 0.009) (Table 2).

Table 2 Comparison of hematologic indicators and cognitive assessment scale scores between OCD and HC.

Correlation of serum HCY, folate, and vitamin B12 levels with clinical cognitive assessment in the drug-naive obsessive-compulsive disorder group

Yale Brown Obsessive-Compulsive Scale (Y-BOCS) scores were positively correlated with serum HCY levels (p = 0.017 r = 0.67). This suggests that serum HCY levels increase as the degree of obsessive-compulsive symptoms increases (Fig. 1). Y-BOCS scores were negatively correlated with serum folate levels (p = 0.014 r=-0.34).This suggests that serum folate levels decrease as the degree of obsessive-compulsive symptoms increases (Fig. 2).

HCY levels were positively correlated with the time spent on the TMT(A + B) (p < 0.01 r = 0.883), HCY levels were negatively correlated with verbal learning ability and total scores on the MSCEIT of social cognition (p < 0.01 r=-0.907), ( p < 0.01 r=-0.566 ).This suggests that information processing speed, verbal learning ability and social cognitive functioning are more severely impaired as HCY levels rise. Folate levels were negatively correlated with the time spent on the TMT(A + B) (p < 0.01 r=-0.665), and folate levels were positively correlated with verbal learning ability and total scores on the MSCEIT of social cognition (p < 0.01 r = 0.612),( p < 0.01 r = 0.964).This suggests that as serum folate levels decrease, impaired information processing speed, verbal learning ability and social cognitive functioning worsen. No significant correlation between serum vitamin B12 levels and cognitive function assessment scale total score (p>0.05).There was a positive correlation between Y-BOCS scores and the time spent on the TMT(A + B)(P<0.01 r = 0.525).Y-BOCS scores negatively correlated with verbal learning ability (P<0.01 r = 0.505) Y-BOCS scores negatively correlated with social cogni on (P<0.01 r=-0.39).This suggests that the more severe the obsessive-compulsive symptoms, the more impaired the speed of information processing, verbal learning ability and social cognitive functioning (Table 3; Fig. 3).

Fig. 1
figure 1

Correlation between degree of obsessive-compulsive symptoms and HCY levels.

Fig. 2
figure 2

Correlation between degree of obsessive-compulsive symptoms and floate levels.

Table 3 Correlation analysis.
Fig. 3
figure 3

Correlation analysis.

Relationship of obsessive-compulsive symptoms to serum HCY, folate, and cognitive function in drug-naive obsessive-compulsive disorder

From the above correlation analysis, it can be seen that there are significant correlations between serum homocysteine and folate levels, OCD severity, and cognitive function. In order to explore the inner mechanism of the significant negative effect of OCD on cognitive function impairment, serum homocysteine and folate levels were further introduced as mediator variables into the structural equation modeling in the study. By using Process 15.0 Model 4 in SPSS software to conduct the test of mediating effects, bias corrected 5000 times, the mediating roles of serum homocysteine and folate levels in the relationship between the degree of obsessive-compulsive symptoms and cognitive function were verified and analyzed according to the method of Bootstrap (Table 4). We found that serum HCY levels mediated the relationship between Y-BCOS scores and verbal learning ability. This suggests that altered serum HCY levels may be a potential factor linking obsessive-compulsive symptoms and impaired verbal learning ability. Obsessive-compulsive symptoms predicted impaired verbal learning ability through partial mediation of HCY levels (direct effect: c’= 0.12, p = 0.0193, indirect effect: a*b= -0.43, 95% CI [-0.58 to -0.28]). Serum folate levels mediated the relationship between Y-BOCS scores and verbal learning ability. Obsessive-compulsive symptoms also impaired language learning ability as predicted by partial mediation of folate levels (direct effect: c’ = -0.20, p = 0.0051, indirect effect: a*b = -0.11, 95% CI: [-0.21 ~ -0.03]) (Fig. 4).

Table 4 Direct effect, indirect effect and total effect of intermediation models.
Fig. 4
figure 4

intermediary model. Note*p < 0.05,**p < 0.01; a, b, c variables’ value represented the standard coefficient. c′ : direct effect of X on Y, c: the direct effect of X on Y without considering the mediating variable.

From Table 4, it can be seen that both homocysteine and folate levels partially mediated in the Y-BOCS scores and HVLT-R, so we performed a multiple mediation effect modeling test (Table 5).

Table 5 Multiple mediating effects: Y-BOCS-HCY, Floate-HVLT-R.

The 95% Bias-corrected confidence interval for the mediator variable, folate, was [-0.11,0.01], and the interval contained zeros, indicating that the two-mediator model was not valid.

Discussion

In the study, we conducted a novel investigation into the correlation between serum homocysteine, folate and vitamin B12 levels and cognitive dysfunction in patients with drug-naive OCD, and provided new evidence suggesting that serum HCY negatively mediated the relationship between obsessive-compulsive symptoms and verbal learning, the higher the HCY level the greater the impairment of verbal learning by obsessive-compulsive symptoms, while folate positively mediated the relationship between obsessive-compulsive symptoms and verbal learning, the higher the level of folate, the less the impairment of verbal learning by obsessive-compulsive symptoms. Our findings indicate that patients with drug-naive OCD have elevated HCY and decreased folate with cognitive impairments particularly evident in areas such as attention/Alertness, Working Memory, Verbal and Visual Learning and Information Processing Speed. Serum HCY levels were positively correlated with both Y-BOCS scores and time taken on the Trail Making Test, while they showed a negative correlation with verbal learning ability and emotional management. Conversely, folate levels were negatively correlated with Y-BOCS scores and time on the Trail Making Test, and positively correlated with verbal learning ability and emotional management.Both serum homocysteine and folate each partially mediate the relationship between obsessive-compulsive symptoms and verbal learning disabilities.

Our study found elevated HCY levels and reduced folate levels, but no vitamin B12 deficiency in patients with drug-naive OCD, which is consistent with the findings of Atmaca et al.20,21,26,27. We also found that the group of OCD patients showed deficits in attention, memory, and learning ability, which is consistent with previous findings28,29,30. This may be due to the fact that the maintenance of obsessive-compulsive thoughts and behaviours in patients with OCD is associated with over-activation of the cortico-striato-thalamo-cortical (CSTC) circuit4,5,6,31 and abnormal activity in the CSTC circuit affects the efficiency of information processing, attention, and memory, etc., and leads to cognitive dysfunction5,7. At the same time, over-activation of the CSTC circuit, which is a neural pathway connecting prefrontal lobe, basal ganglia, and thalamus, leads to Abnormal neurotransmitter (serotonin and glutamate) transmission between the prefrontal lobe and basal ganglia, exacerbating abnormal dopamine release6. Disorders of serotonin, dopamine and glutamate can indirectly affect HCY and folate levels32. Neurotransmitter synthesis and metabolism rely on folate, a key cofactor in one-carbon metabolism. During neurotransmitter synthesis, folate is overconsumed, reducing its availability for HCY metabolism and leading to HCY accumulation. Moreover, disorders of neurotransmitters cause an increase in the need for methylation, which affecting the remethylation metabolism of HCY, causing HCY levels to rise33.

There have been a number of studies with opposite results where the OCD group was found to have normal folate levels and a vitamin B12 deficiency34,35. This may be due to differences in dietary structure and lifestyle habits36,37, differences in gastrointestinal absorption function, differences in metabolic efficiency in different study populations, such as the possible presence of polymorphisms in the MTHFR or TCN2 genes in some patients38,39, which affects the metabolism and utilisation of vitamin B12 and folate, a combination of which cannot be standardized.Our study found varying degrees of cognitive impairment in OCD, whereas the opposite result appeared in some studies, which concluded that there was no difference in cognitive functioning between OCD and controls40. The inconsistency in the findings of cognitive impairment in the OCD population may also be attributed to several factors; the OCD populations in different studies differed considerably in terms of symptom severity, duration of illness, and co-morbidities (e.g., depression, anxiety), which can lead to significant memory impairment when co-morbidities of anxiety or depression are present41. The effects of medications42 or chronic alcohol consumption43 these can also affect cognitive function. Chronic diseases and hormonal changes are known to affect cognitive function44,45. However, our study deliberately excluded patients with depression, anxiety disorders, schizophrenia, or a history of alcohol or psychoactive substance dependence, as well as patients with chronic or organic diseases. Our study sample also controlled for age, gender, and education level, allowing the results to be interpreted solely in terms of OCD.

We found that higher Y-BOCS scores were associated with higher HCY levels, and lower Y-BOCS scores were associated with higher folate levels, which were negatively correlated with homocysteine levels, which is consistent with previous results20,21,46. It suggests that low homocysteine and high folate levels may have a positive effect on OCD, possibly because high HCY levels competitively consume more folate, which affects the metabolism of key neurotransmitters such as dopamine and serotonin9, and low levels of serotonin and dopamine lead to increased emotional instability and obsessive-compulsive thinking in OCD patients16, which in turn exacerbates obsessive-compulsive symptoms.We found that HCY levels were positively correlated with time on the connectivity test and negatively correlated with verbal learning ability and total emotion management scores, suggesting that high HCY levels are associated with cognitive deficits12,14, including slower information processing, reduced verbal learning ability and lower social cognition. It has been suggested that high HCY levels are associated with reduced grey and white matter volumes in certain brain regions, particularly with structural changes in areas related to executive function (e.g., prefrontal cortex and basal ganglia)47. These brain regions have an important role in OCD, and HCY-induced structural damage may lead to difficulties in regulating mood and learning memory. We found that folate levels were negatively correlated with the Trail Making Test, and folate levels were positively correlated with verbal learning ability and social cognitive scores. This suggests that high folate levels may play a protective role in cognitive functioning in OCD, as folate balances HCY metabolism and reduces the cognitive damage caused by high HCY17, and folate promotes the synthesis of neurotransmitters (serotonin and dopamine), which can help to improve learning memory, attention and mood, and protect against cognitive decline15, and it is involved in the normal methylation reaction to maintain normal brain function17. Therefore, the present study concluded that high HCY levels exacerbated the impairment of verbal learning ability in OCD, whereas high folate levels reduced the impairment of verbal learning ability in OCD.

The study has several limitations: our sample size was small with only 50 drug-naive OCD patients, which may limit the generalizability of the findings. Future studies should consider a larger sample size. The study design was cross-sectional, assessing only the drug-naive OCD population without follow-up on treatment effects or cognitive improvements. Further research with longitudinal follow-up would enhance data reliability. Homocysteine, folate, and vitamin B12 levels, along with cognitive deficits, are likely influenced by confounding factors such as dietary habits and lifestyle, which were not collected in this study unfortunately.Although further research is needed to investigate whether HCY can be used as a biomarker for obsessive-compulsive symptoms, and more clinical trials are needed to validate the therapeutic approach of lowering HCY levels, this approach may provide a new direction for adjunctive treatment of OCD, especially for patients with refractory OCD. Future studies could also combine genetic approaches to explore the relationship between HCY metabolism-related genes and OCD, and investigate the effects of gene-environment interactions on HCY levels and OCD symptoms. The effects of HCY on specific circuits and neurotransmitter systems in the brain of OCD patients can also be further investigated by combining structural and functional imaging techniques.

Conclusions

The present study provides evidence to demonstrate the relationship between serum homocysteine, folate and vitamin B12 and cognitive deficits in drug-naive patients with OCD. It is suggested that degree of obsessive-compulsive symptoms, high homocysteine levels and folate deficiency interact to exacerbate memory and learning impairments in patients with OCD. Our study suggests that serum homocysteine and folate levels mediate the impairment of cognitive function by obsessive-compulsive symptoms. It is suggested that serum homocysteine and folate may influence cognitive function through neurotransmitter metabolism in brain regions. We should take this into account when choosing treatment strategies in the clinic.