Introduction

According to statistics, the global population of individuals aged 65 and above is projected to increase from 771 million in 2022 to 1.6 billion in 2050. This implies a significant rise in population aging, with the number of elderly individuals equaling the number of children under 12 by 2050 [1]. Furthermore, there has been a 117% increase in the global number of people with dementia between 1990 and 2016 [2], and it is estimated that the prevalence of dementia will triple worldwide by 2050 [3]. Aging not only brings about the disease itself but also cognitive impairment and neurodegenerative pathology [4], resulting in a substantial burden of cognitive impairment on society. Pharmacological treatments aimed at slowing the progression of cognitive impairment or improving dementia symptoms have shown limited effectiveness. Therefore, there is an urgent need to explore alternative approaches to enhance or decelerate the progression of dementia disease.

Physical activity (PA) is a cost-effective and non-invasive behavior that has been proven to enhance cognition through various mechanisms, including modulation of inflammatory factors, increased cerebral blood flow, inhibition of Tau phosphorylation, improved hippocampal function, and reduced risk of cardiovascular disease [5,6,7]. Since physical activity is a part of daily life and work, it is important to explore the relationship between physical activity and cognition, especially in older adults. However, limited research has been conducted on the influence of physical activity in people's daily lives and work on cognitive function. Therefore, exploring the relationship between physical activity and cognition, which is closely related to the life and work of elderly people, is helpful to understand the impact of exercise-related intervention on cognitive impairment, and expand the research results of simple leisure sports on cognition.

Depression is a prevalent disorder that is projected to become the leading disease burden globally by 2030 [8]. It significantly impairs patients' psychosocial functioning and diminishes their overall quality of life. Long-term depression can have negative effects on cognitive function and increase the risk of dementia [9]. Additionally, patients with mild cognitive impairment, especially in the elderly, are more prone to developing depression [10]. Some studies suggest that the interaction between these two conditions may be associated with inflammatory factors. On one hand, elevated levels of inflammatory factors can lead to an increase in free radicals, which can impair nerve function and result in neuronal loss, ultimately affecting cognitive function. On the other hand, it can also disrupt monoaminergic signals, leading to the development of depression [11, 12]. Previous studies have indicated a significant correlation between depression and cognitive impairment [13]. However, these studies often have small sample sizes and some only focus on the relationship between mild cognitive impairment and depression, limiting their generalizability. To address these limitations, we conducted a study using a large sample size to investigate the relationship between depression and cognitive function.

In order to investigate the relationship between physical activity, depression and cognitive function, we analyzed the data from the National Health and Nutrition Examination Survey (NHANES) conducted between 2011 and 2014. The NHANES utilized a questionnaire to gather comprehensive information about participants' physical activity, including the duration and frequency of their involvement in various exercise programs. Additionally, NHANES conducted a thorough evaluation of cognitive function and depression in the elderly population. This assessment helps in gaining a deeper understanding of the correlation between physical activity, depressive symptoms, and cognitive impairment. The purpose of this study is to provide clues for the prevention and treatment of cognitive impairment and depression.

Method

Study design and sample collection

The National Health and Nutrition Examination Survey is a cross-sectional survey conducted in the United States. It uses a stratified multistage random sampling design to obtain a representative sample [14]. For this study, data from the NHANES 2011–2012 and 2013–2014 cycles were used, which included a total of 38,898 participants. Participants who did not complete the Cognitive Functioning Survey (n = 35,888) and those with incomplete baseline information (n = 297) were excluded. This resulted in a final sample of 2,713 participants, all of whom were aged 60 years or older, as the survey only assessed cognition in participants aged ≥ 60 years. The study procedures were approved by the ethical review committee of the National Center for Health Statistics, and written informed consent was obtained from all participants.

Physical activity

Physical activity was assessed using the Global Physical Activity questionnaire (GPAQ) [15]. Participants were asked about the frequency and duration of their engagement in vigorous or moderate work-related activities, walking or bicycle, and vigorous or moderate recreational physical activities on a weekly basis. Each activity was assigned a Metabolic Equivalent of Task (MET) score based on NHANES guidelines (Vigorous work activity was assigned 8 points, moderate work activity was assigned 4 points, walk or bicycle was assigned 4 points, vigorous recreational physical activities were assigned 8 points, and moderate recreational physical activities were assigned 4 points). Total physical activity was calculated by multiplying the number of days a participant participated in each activity per week by the number of minutes spent on each activity by the metabolic volume task score for each activity. A high level of PA was defined as a total PA of 600 MET·min/week or above, while a low level of PA was defined as a total PA below 600 MET·min/week, in accordance with the US PA guidelines [16]. Moreover, the participants were categorized into three groups based on the type of physical activity they engaged in: work-related physical activity (group A), physical activity during walking or bicycle (group B), and recreational physical activity (group C), with the aim of examining differences in Cognitive scores among the three groups.

Depressive symptoms

Depressive symptoms were evaluated using the Patient Health Questionnaire (PHQ-9) [17]. This questionnaire consists of nine primary questions, each scored from 0 to 3, resulting in a total score ranging from 0 to 27. The severity of depression was categorized based on the total score as follows: no depressive symptoms (0 to 4), mild depression (5 to 9), moderate depression (10 to 14), and severe depression (≥ 15).

Cognitive function

The objective evaluation of cognitive function assessed by NHANES in 2011–2014 primarily included the Consortium to Establish a Registry for Alzheimer's disease Word Learning subtest (CERAD-WL). This subtest consisted of Immediate Recall test (IRT), delayed recall test (DRT), Animal Fluency Test (AFT), and Digit Symbol Substitution Test (DSST). The DSST is a module of the Wechsler Adult Intelligence Scale III (WAIS-III) known for its high sensitivity [18]. The test is conducted using a form that pairs nine numbers with symbols at the top. Participants are given 2 min to match the numbers with the corresponding symbols, earning one point for each correct match. A higher score indicates better cognitive functioning [19]. Immediate Recall test and Delayed Recall test are assessed using CERAD-WL. For the IRT, participants are instructed to read aloud 10 unrelated words, one at a time, as they are presented. Immediately after the presentation of the words, participants recall as many words as possible. Each word is worth 1 point, and the test is performed three time. The maximum number of correct responses is 30 for the 3 trials. Similarly, DRT is performed only once after completion of DSST and AFT (approximately 8–10 min from the start of the Immediate Recall test), with a maximum score of 10 [20]. The AFT is primarily used to assess executive function, and participants are asked to name as many animals as possible in one minute, with one point for each animal [21]. The DSST was used as an objective assessment of cognition in this study. Cognitive impairment was defined as a DSST score below the lowest quartile. At the same time, DSST, IRT, DRT and AFT were used to evaluate the differences in cognitive function of different types of physical activity between the three groups.

Covariates

Demographic covariates, such as gender, age, race, and educational attainment, were considered in this study. Information was primarily collected through household questionnaire interviews. Educational attainment was categorized into three groups: less than high school education, high school education, and more than high school education. Other covariates taken into account were BMI, hypertension, diabetes, coronary heart disease, stroke, smoking, and sleep duration. BMI was determined by a professional technician using height and weight measurements [BMI = weight/height2 (Kg/m2)]. Hypertension was defined as a systolic blood pressure ≥ 140 mmHg or diastolic blood pressure ≥ 90 mmHg [22]. Participants with normal blood pressure were considered to have hypertension if they were prescribed antihypertensive medication. Smoking was determined based on the question ' Have you smoked at least 100 cigarettes in your entire life?' Diabetes was defined as either a physician-diagnosed condition or current use of glucose-lowering medication. Sleep duration was self-reported by the participants through a questionnaire that asked, ' How much sleep do you usually get at night on weekdays or workdays?' Based on the participants' responses, sleep duration was categorized into three groups: short sleep (< 7 h), normal sleep (7–9 h) and long sleep (> 9 h), with the reference group being those who slept for 7–9 h [23].

Statistical analysis

Baseline information was presented as mean ± standard deviation for measurement data and relative number percentages [N (%)] for enumeration data. Differences between groups were assessed using One-way ANOVA for measurement data and chi-square test for enumeration data. One-way and multi-way logistic regression analyses were conducted to investigate the relationship between physical activity and depression as well as cognitive function. One-way ANOVA was utilized to examine the differences in Cognitive scores among the three groups with different types of physical activity. Pairwise comparisons were conducted, and the Bonferroni correction was applied to mitigate the risk of type I error. Spearman correlation analysis was performed to investigate the correlation between depressive symptoms on specific domains of cognitive function. All statistical analyses were performed using the StataMP-64 statistical package. The significance level was set at 0.05 for all analyses.

Results

Characteristics of the study population

A total of 2713 participants were included in the study. The participants had a mean age of 69.32 ± 6.74 years (mean ± SD) and a mean BMI of 29.01 ± 6.29 kg/m2 (mean ± SD) (Table 1). Among the participants, 24.3% had cognitive impairment, 50.8% had low level physical activity, and 3.4% suffered from Severe depression. We found that the cognitive impairment group had a higher proportion of individuals with low-level PA (60.4% vs 39.6%). Additionally, women had a significantly higher DSST score (mean ± SD: 48.77 ± 17.69 scores) compared to men (mean ± SD: 43.86 ± 16.12 scores, P < 0.001).

Table 1 Baseline characteristics of the participants by cognition

Physical activity and cognitive impairment

Objective cognitive function was significantly lower in participants with low levels of physical activity (mean ± SD: 43.95 ± 16.90 scores) compared to those with high levels of PA (mean ± SD: 48.84 ± 16.99 scores), p < 0.001, according to independent sample t-tests. Univariate logistic regression analyses, prior to adjusting for covariates, indicated that older adults, being male, widowed, low education level, and excessive sleep duration (≥ 9 h) were significantly associated with the risk of cognitive impairment (Table 2). Participants with cognitive impairment were also found to have a higher likelihood of comorbid stroke, depression, and hypertension. The logistic regression analysis was further adjusted for relevant covariates individually, and the results are presented in Fig. 1. Prior to accounting for covariates, there was a significant association between total physical activity and cognition (OR = 0.597, 95% CI: 0.500–0.714, P < 0.001). Even after adjusting for various factors such as demographics, social factors, BMI, sleep duration, coronary heart disease, hypertension, stroke, and diabetes status, the correlations remained significant (OR = 0.789, 95% CI: 0.632–0.986, P = 0.037). The logistic model obtained from these adjustments was statistically significant, χ2 = 873.48, P < 0.001. Furthermore, the model successfully classified 81.9% of the study subjects, indicating that higher levels of PA were associated with a lower risk of cognitive impairment. The results of the one-way ANOVA showed statistically significant differences in cognitive scores based on the type of physical activity. There was no statistically significant difference in IRT scores between group A and group C (P = 0.075). Additionally, there was no significant difference in DRT scores between group A and group B (P = 0.296), as well as between group A and group C (P = 0.080). However, the statistical analysis revealed significant pairwise comparisons of DSST and AFT scores among the three physical activity groups (P < 0.001) (Fig. 2). The mean and standard deviation of cognitive scores for these groups can be accessed in the Supplementary data (Table S1).

Table 2 Univariate and multivariate logistic regression analyses of risk variables for association with cognitive impairment
Fig. 1
figure 1

The odds ratio for cognitive impairment was assessed using different models. Model 1: Adjusted for demographics (age, gender, and ethnicity). Model 2: Social factors were further adjusted, including education level, marital status and depression. Model 3: Further adjust BMI and sleep duration. Model 4: Further adjustments for hypertension, diabetes, coronary heart disease and stroke. The error bars represent the odds ratio with a 95% confidence interval

Fig. 2
figure 2

Violin plots of cognitive function scores for three groups of types of physical activity. The dotted line in the middle represents the median, and the dotted lines at both ends represent the IQR (25th and 75th percentiles). Significance was calculated by One-way ANOVA. DSST = Digit Symbol Substitution Test; IRT = Immediate Recall test; DRT = Delayed Recall test; AFT = Animal Fluency Test; Group A = work-related physical activity; Group B = physical activity during walking or bicycle; Group C = recreational physical activity

Depressive symptoms and cognitive impairment

In the unadjusted model, participants with mild depression had a 53.8% increased risk of cognitive impairment compared to those without depressive symptoms [OR = 1.538, 95% CI: 1.210 ~ 1.955, P < 0.001]. Similarly, participants with moderate depression had a 141.2% increased risk of cognitive impairment [OR = 2.412, 95% CI: 1.710 ~ 3.402, P < 0.001]. Participants with severe depression, the risk of cognitive impairment was increased by 248.2% [OR = 3.482, 95% CI: 2.278 ~ 5.324, P < 0.001]. After adjusting for confounding factors, the odds ratios were 1.847 (1.370 ~ 2.492), 2.213 (1.423 ~ 3.442), and 2.598 (1.535 ~ 4.395) (P < 0.001). These findings suggest that depressive symptoms are a significant risk factor for cognitive impairment. Moreover, the severity of depression is positively associated with the risk of developing cognitive impairment. Figure 3 presents the results of logistic regression analysis before and after adjusting for covariates. The depression score showed a significant correlation with DSST, IRT, and AFT scores, but it did not show a significant correlation with DRT (P = 0.171) (Figure S1).

Fig. 3
figure 3

Univariate and multivariate logistic regression analyses of depressive symptoms. Error bars depict OR 95% CI

Discussion

This study utilized nationally representative data from NHANES 2011–2014 to investigate the relationship between physical activity and depressive symptoms as well as cognitive function. We further examined the impact of different types of exercise on cognitive function within three distinct groups. The inclusion of a large sample size and rigorous quality control measures in our analysis enhances the reliability of our findings. Controlling for various factors on an individual basis, we found a significant correlation between physical activity level and cognitive function. Specifically, individuals with high levels of physical activity exhibited a reduced risk of cognitive impairment, while the severity of depressive symptoms was positively associated with the risk of cognitive impairment.

Cognitive impairment refers to varying degrees of cognitive impairment caused by various factors, affecting one or more cognitive domains and potentially impacting the patient's social functioning to different extents [24]. Previous studies have demonstrated a gradual decline in cognitive function starting from early adulthood [25]. This decline is primarily linked to various factors such as altered neuronal epigenetics, vascular dysfunction, lipid dysregulation, abnormal neuronal autophagy, and mitochondrial metabolic dysfunction [2]. Our study observed a higher prevalence of hypertension and stroke among participants with cognitive impairment. Based on the findings of previous studies, it is believed that the presence of cognitive impairment in hypertensive patients can be attributed to the disruption of microcirculatory structures in the brain caused by hypertension. This disruption in turn affects the blood–brain barrier and leads to the development of neuroinflammation [26]. On the other hand, stroke is characterized by abnormal cognitive function resulting from oxidative stress caused by white matter lesions, infarction, or vascular rupture, as well as dysfunction of the blood–brain barrier [27].

Previous randomized controlled trials have examined the correlation between physical activity and cognitive function. Sanders et al. [28] found that high-intensity PA did not enhance cognitive function. However, their study had limitations such as a small sample size, short follow-up time, and poor participant compliance, which may have underestimated the impact of physical activity on cognition. In contrast, our multifactorial logistic regression analysis indicated a negative association between high PA levels and the risk of cognitive impairment. In addition to previous studies, our research considers several key factors that contribute to the improvement of cognitive function through physical activity. These factors include the inhibition of muscle atrophy, improvement of frailty, maintenance of insulin sensitivity, enhancement of mitochondrial activity, improvement of cardiovascular function, increase of cardiorespiratory function, enhancement of synaptic plasticity, increase of brain volume and gray matter volume, and improvement of brain-derived neurotrophic factor levels [29,30,31]. These factors collectively help reduce or delay the onset of cognitive impairment. Our findings from a one-way ANOVA reveal that the recreational physical activity group had higher cognitive scores compared to the work-involved physical activity group and the commuting or travel modality-involved physical activity group. Specifically, the recreational physical activity group demonstrated better immediate memory and executive function scores. It suggests that while physical activity can improve cognitive function, there are differences in the effects of different types of physical activity on cognitive function. We believe that the high cognitive scores in the recreational physical activity group can be attributed to the involvement of various aspects such as physical flexibility, balance, endurance, and resistance training. This not only enhances skeletal muscle strength but also fully engages the 'central control system' of the brain to regulate body coordination [32, 33]. Additionally, participants in the recreational physical activity group may be more motivated to continue exercising due to their interest in the chosen form of exercise, leading to longer persistence. Based on our research, we highly recommend that the elderly population consider increasing their physical activity, particularly engaging in recreational physical activities that align with their personal interests and hobbies. Activities like playing badminton and participating in aerobics can be excellent options. It is important for older adults to strive for higher levels of physical activity within a range that is considered acceptable.

In our study investigating the relationship between depression and cognitive impairment, it was found that the risk of cognitive impairment increased as the severity of depression increased. Specifically, severely depressed patients had a 2.598 times higher risk of developing cognitive impairment compared to individuals without depressive symptoms. This finding is consistent with the results of Bennett et al. [34], who also found a correlation between depressive symptoms and cognitive impairment. Furthermore, the study concluded that experiencing depressive symptoms early in life is a risk factor for cognitive impairment, while depression in later life may be an early symptom of cognitive impairment. The combination of inflammation and chronic stress triggers the production of pro-inflammatory cytokines, which in turn activates microglia, causes damage to white matter, and leads to neuronal loss. These cytokines also decrease the level of neurotrophin, thereby reducing dendrite formation and resulting in cognitive abnormalities [35]. Furthermore, dysfunction in the frontal parietal cortex can stimulate the limbic system, heightening the individual's perception and sustained attention towards negative stimuli, ultimately leading to depression. Simultaneously, excessive stimulation of the limbic system can hinder higher cortical functions, impairing the ability to receive and process external information normally, thus causing cognitive impairment [36]. A subsequent study conducted by Alexopoulos et al. [37] demonstrated that depression in individuals with cognitive impairment differs from depression in those with normal cognitive function. This is evident from the reduced effectiveness of certain antidepressants in patients with both cognitive impairment and depression. It is possible that cognitive impairment diminishes the impact of specific selective serotonin reuptake inhibitors. Interestingly, there are relevant studies showing that longer exposure to natural daylight is associated with a decrease in depressive symptoms. This is because natural daylight helps regulate circadian rhythms, leading to an improvement in mood [38]. Therefore, we would recommend increasing outdoor physical activity in the elderly population to reduce the risk of cognitive impairment. This can be achieved by improving depressive symptoms through exposure to outdoor daylight, instead of solely relying on medications. Additionally, increasing outdoor exercise can also contribute to improved cognition.

Previous studies have indicated that sleep duration may have an impact on cognitive function [39]. However, our study revealed comparable results only in the univariate regression analysis, without any statistically significant differences when relevant factors were taken into account. Several factors contributed to this outcome: (1) the grouping of sleep duration varied inconsistently across different studies; (2) different studies adjusted for different confounding variables; and (3) the studies involved participants from different age groups.

The study has certain limitations. Firstly, since it was a cross-sectional study, physical activity levels were collected through self-reports, which may introduce reporting bias. However, it is important to note that the items investigated were directly relevant to the patients' lives, reducing the likelihood of recall bias. Secondly, participants who were unwilling to cooperate or unable to complete cognitive function tests, as well as those with insufficient underlying information, were excluded from the study. This exclusion may have resulted in an underestimation of the risk of cognitive impairment. Additionally, we did not evaluate the severity of cognitive impairment, making it unclear how PA levels may differ in their effects on mild and severe cognitive impairment. Further research is required to improve guidance for patients.

Conclusion

The findings of this study suggest that older adults who engage in high levels of physical activity are at a decreased risk of developing cognitive impairment. Additionally, there is a positive correlation between the severity of depressive symptoms and the risk of cognitive impairment. Based on these results, it is recommended that older adults consider increasing their physical activity levels, particularly through recreational physical activities. Furthermore, maintaining a positive mood and reducing depression may also help in reducing the risk of cognitive impairment or delaying its progression.