Introduction

The growing frequency and high mortality of malignant tumors imposed a significant burden on people all over the world [1]. Over the past few decades, healthcare professionals have tirelessly sought effective and safe strategies for cancer prevention, albeit with limited success. Metformin, a widely prescribed medication for managing type 2 diabetes, has garnered increasing interest for its potential anti-tumorigenic properties [2]. An increasing number of clinical studies attempted to reveal the efficacy of metformin on different types of cancer, but the controversial conclusions left the issue unsolved [3,4,5]. Biases induced by confounders which were hard to avoid in observational studies might be responsible for this.

Scientists were also interested in the biological pathways of metformin in cancer treatment. Apart from its well-documented benefits in improving glucose metabolism, recent years have witnessed extensive investigations into metformin's molecular mechanisms against various malignancies. These mechanisms include the reduction of leukocyte–endothelium interactions, modulation of oxidative stress, and the regulation of AMP-activated protein kinase (AMPK) [6, 7]. However, researches related to the genetic effect of metformin use on the risk of cancers were not complete yet.

Contrary to conventional observational research, Mendelian Randomization analysis (MR) provided a cost- and time-saving approach with high efficiency to investigate the genetically predicted causal relationships [8]. As Dr. Tobin stated, MR is also known as 'Mendelian deconfounding' since it attempts to present estimates of causal effects that are free of biases caused by confounding [9]. Robust-associated genetic variants were selected to explore the genetic association between exposures and outcomes. Genetic variations in the MR method are equal to lifetime changes caused by exposure and reflect the long-term implications of the alteration on certain illnesses [10]. In our study, two-sample MR was used to unveil the causal relationship between metformin use and 26 common types of cancer. Additionally, we supplemented our analysis with a two-step MR to identify potential mediators and assess their contribution to the genetic causal effect. Ultimately, we conducted a comprehensive review of previous clinical studies to enhance our understanding of the association between metformin use and cancer.

Materials and methods

Study design

The overview of the study design is demonstrated in Fig. 1. As shown in Fig. 1a, the MR analysis requires three basic assumptions to be met: (1) instrumental variables (IVs) are strongly correlated to exposure; (2) IVs are independent of any potential confounders; and (3) IVs only affect the outcome through exposure. Two distinct genetic datasets should be integrated into a single MR study, which is the fundamental prerequisite of two-sample MR.

Fig. 1
figure 1

Overview of the study design. A We firstly applied two-sample MR analyses to figure out the genetic effect of metformin use on 26 prevalent cancers with five robust methods. B Two-step MR analysis and MVMR were further conducted to figure out the potential mediator who mediate the protective genetic effect of metformin on HER-positive breast cancer

To determine the mediating factors in the genetic causal relationship, two-step MR was performed as illustrated in Fig. 1b. In the first step, single-nucleotide polymorphisms (SNPs) to genetically predict metformin use were incorporated to evaluate the causal relationship of metformin use on 22 potential mediators (e.g. BMI, CRP, and testosterone levels) in the univariable MR method. And SNPs robustly related to mediators were used to calculate the causal association of mediators and cancer outcome(s) [11]. It should be noted that the genetic information utilized in this study is freely accessible to researchers around the world and is therefore not subject to additional ethical review or informed consent.

Selection of instrumental variants (IVs) of metformin use

Genetic variants of metformin use in European ancestry were obtained from the UK Biobank dataset (8392 cases/328,767 controls). The following inclusion criteria guided our selection of the IVs: (1) SNPs should have a genome-wide significance level (P < 5×10–8), which strongly indicates genetic association with exposure. (2) Genetic variants with linkage disequilibrium (LD) (r2 > 0.001) were excluded. The LD between SNPs was assessed to clump the independence of SNPs; (3) The F-statistics (beta2/se2) > 10. SNPs with F-statistics less than 10 may have inferior statistical power. Additional file 1: Table S1 summarizes the IVs of metformin use involved in this work.

Selection of cancer outcomes

The genetic information associated with the following types of malignant tumors was obtained from the FinnGen consortium: colorectal cancer (3022 cases/215,770 controls), stomach cancer (633 cases/218159 controls), pancreas cancer (605 cases/218187 controls), oral pharynx cancer (126 cases/218666 controls), oesophagus cancer (212 cases/218560 controls), bone and articular cartilage cancer (119 cases/218673 controls), kidney cancer (971 cases/217,821 controls), melanoma (98 cases/218694 controls), non-melanoma skin cancer (10,382 cases/208410 controls), thyroid gland cancer (989 cases/217803 controls), overall breast cancer (8401 cases/115178 controls), HER-negative breast cancer (3092 cases/99267 controls), HER-positive breast cancer (4263 cases/99267 controls), lung cancer (1681 cases, 217,111 controls), non-small cell lung cancer (NSCLC) (1627 cases/217165 controls) and small cell lung cancer (SCLC) (179 cases/218613 controls). The genetic information of other cancers was gotten from UKB: colon cancer (2226 cases/358968 controls), rectum cancer (1085 cases/461925 controls), liver cancer (168 cases/372016 controls), small intestine cancer (156 cases/337003 controls), bladder cancer (1554 cases/359640 controls), overall skin cancer (1436 cases/461497 controls). Only the European population was incorporated into this study, and no sample overlap in this MR study.

Statistical analyses

Two-sample Mendelian randomization

Two-sample MR studies were conducted using TwoSampleMR package (version 0.5.6) and R software (version 4.2.1) [12]. A total of five different approaches were used. The inverse variance weighting (IVW) method, which evaluates the causal influence of genetically predicted exposures on outcomes by weighted regression of SNP-specific Wald ratios, acted as the major approach. To examine the consistency and heterogeneity of our findings, four additional assessment techniques—weighted median, MR Egger, simple model, and weighted model—were performed [13,14,15]. When the variable in MR has an impact on illness independent of its impact on exposure, this is known as horizontal pleiotropy. To avoid the biases of horizontal pleiotropy, MR-PRESSO method was performed to identify the outliers with MRPRESSO package (version 1.0) [16]. Pleiotropy was tested by leave-one-out analysis and MR-Egger intercept method [17, 18]. Heterogeneity was evaluated by Cochran's Q-statistic, and any MR results with heterogeneity were excluded.

Median analysis

The genetic information of potential mediators was downloaded from publicly accessible GWAS consortia, and relevant GWAS identifiers or available references were listed in Table 2. Two-step MR analysis was applied to figure out if the potential mediator attributed any mediating effect between exposure and outcome [11]. Of note, the mediator has to meet the premise of a continuous variable [19]. In the first step, genetic variants of exposure (metformin use) were obtained to determine the causal effect of exposure on potential mediators. After that, genetic variants of mediators were also acquired to assess the causal role of mediators on outcomes (cancers) in the second step. Beta 1 and beta 2 were calculated in step one and step two respectively (Fig. 1b). Potential mediator which presented supporting evidence in two-step MR would be included in the median analysis. Multivariable MR (MVMR) analysis was performed on metformin use-TT level-HER(+) breast cancer. The mediation effect was obtained by multiplying beta1 by beta 2.

Comparison with clinical studies

To further confirm our findings, we reviewed the prevention and treatment effects of metformin on breast cancer in previous clinical studies. Phrase II, Phrase III randomized clinical trials (RCT), prospective studies and retrospective studies that published on Pubmed, Medline and Embase were included.

Results

Selected genetic instrumental variants (IVs)

We meticulously followed the aforementioned criteria when selecting the IVs. As a consequence, 26 independent SNPs were selected out of the total amount of 10,894,596 SNPs, acting as the IVs of metformin use. Detailed information could be found in Additional file 1: Table S1. F-statistics, which were also presented in the supplementary document, showed no evidence of weak instrumental bias.

Assessment of the genetic causal effect of metformin on cancers

Two-sample MR results

The brief results of two-sample MR analyses of metformin use on 26 prevalent cancers were listed in Table 1. IVW results presented the genetically predicted protective effect of metformin use on HER-positive breast cancer (Beta: − 4.0982; OR: 0.0166 (95% CI: 0.0008, 0.3376); P value: 0.0077). The scatter plots and funnel plots were illustrated in Additional file 1: Fig. S1. The leave-one-out analysis showed no pleiotropy in the MR result (Additional file 1: Fig. S2). And no significant genetic relationship existed between metformin use and other types of cancers.

Table 1 Two-sample Mendelian randomization results for genetic effect of metformin use on 26 common cancers

Median analysis results

The following 20 probable mediators were investigated to figure out whether MR is shown to be causally related to both the effect of metformin use on them (step one) and the mediators' effects on HER-positive breast cancer (step two): inflammation-related factors (white blood cell counts and C-reactive protein), body shape-related index (BMI, weight, waist circumference, body fat percentage, visceral adipose tissue volume, and abdominal subcutaneous adipose tissue volume), metabolism-related biomarkers (HbA1c, fasting insulin, and fasting glucose) and sex hormone-related biomarkers (SHBG, estradiol, total testosterone levels, and bioavailable testosterone levels). As shown in Table 2, we determined that metformin treatment had a causal influence on HDL cholesterol, LDL cholesterol, SHBG, total testosterone, bioavailable testosterone, estradiol, and fasting glucose levels. MR analyses were further conducted to evaluate the causal effect of the seven mediators above on HER-positive breast cancer (Table 3). Significant causal associations was exhibited in total testosterone levels (Beta: 0.4058, 95% CI: 0.0562 to 0.7556, P value: 0.0229). Hence, total testosterone (TT) levels was selected for mediation effect calculation (Additional file 1: Figs. S3–S10).

Table 2 Genetic causal effect of metformin use on potential mediators
Table 3 Genetic causal effect of potential mediators on HER-positive breast cancer

In the MVMR of metformin-TT-HER(+) breast cancer, the direct effect of metformin on HER(+) breast cancer was OR 0.0992 (95% CI: 0.0038 to 2.5986, P value: 0.1655) after being adjusted by TT levels, and the direct effect of TT on HER(+) breast cancer was OR 1.5964 (95% CI: 1.1334 to 2.2486, P value: 0.0074) after being adjusted by metformin use (Additional file 1: Table S2). The mediation effect of TT levels was 24.52%.

Review of previous clinical studies

With the help of the three databases mentioned above, we listed the literature reviews of clinical studies concerning metformin use on breast cancer in Table 4, both therapeutic and preventive effect were reviewed here.

Table 4 Literature review of clinical studies concerning metformin use on breast cancer

Discussion

In addition to its well-established role in reducing persistently high plasma glucose and insulin levels, metformin stands out as a promising candidate for the prevention and treatment of malignant tumors. Recent years have witnessed the promising efficacy of metformin in the management of several types of cancer. However, clinical outcomes have been inconsistent [5, 20, 21]. To optimize the anti-tumor effect of metformin, researchers have focused on the underlying mechanisms for decades. As previously mentioned, numerous pathways and mediating molecules connecting metformin to its effects on cancer have come to light. These include the activation of AMPK-related pathways [22, 23], the promotion of apoptotic cell death in cancer cells [24, 25], and the inhibition of mitochondrial metabolism [26, 27]. These mechanistic studies have shed light on the pivotal role of metformin in cancer therapy and the regulatory pathways involved. Their findings hold significant promise for advancing future clinical management and pharmaceutical development in the field of cancer treatment.

There is a growing focus on investigating the genetic aspects of metformin's role in cancer treatment. In this study, we employed MR analysis to uncover the genetically predicted connections between metformin usage and the risk of common cancers. Unlike traditional clinical studies, MR analysis offers several advantages. It helps eliminate the influence of irrelevant confounding factors and environmental exposures, mitigates the impact of reverse causality, and enhances the strength of evidence for causal inference [28]. As a result, MR analysis stands as a relatively reliable and cost-effective method, leveraging global genome databases to advance our understanding of the relationship between metformin and cancer risk.

Several MR studies have demonstrated the genetic influence of metformin on a variety of diseases. For instance, Zhou et al.'s MR analysis examined the relationship between metformin use and lung cancer risk, finding no genetic causality between the two, a result consistent with our own findings [29]. Modest genetic associations were also reported in the context of breast cancer and prostate cancer [30]. Notably, the MR study on breast cancer encompassed overall, estrogen receptor (ER)-positive, and ER-negative subtypes, yielding results congruent with our research. Beyond cancers, the causal role of metformin on other diseases has been assessed as well. Zhang et al. reported the protective causal relationship between metformin targets and osteoarthritis, highlighting AMPK and GDF-15 as promising targets for osteoarthritis treatment [31]. However, GDF-15 as a therapeutic target of metformin might increase the risk of gallstone disorders [32]. Given metformin's multiple drug targets, which cannot be simplified into one or two specific targets, the accuracy of drug target MR analysis for explaining its therapeutic effects may be limited.

The relationship between sex hormone levels and breast cancer is indeed intricate and has been the focus of extensive research. A comprehensive review study, encompassing 44 breast cancer research studies, revealed that the risk of breast cancer increased with the use of oral contraceptives [33]. Furthermore, this risk was positively correlated with the duration of oral contraceptive use, shedding light on the association between estrogen and progestogen and the prevalence of breast cancer [34]. Testosterone, another sex hormone, also plays a significant role in the development of breast cancer. Evidence from a case–control analysis within the European Prospective Investigation into Cancer and Nutrition cohort established a link between elevated blood testosterone concentrations and an increased incidence of breast cancer (OR: 1.73, 95% CI: 1.16 to 2.57; P value: 0.01) among premenopausal individuals [35]. Similar findings have been reported by researchers from various countries [36,37,38]. Moreover, two-sample MR studies conducted by UK scientists underscored the potential impact of sex steroid hormones on breast cancer risk, These studies pointed out that testosterone and bioavailable testosterone could elevate the risk of both overall and estrogen receptor-positive (ER-positive) breast cancer [39, 40]. These findings align closely with our own research, solidifying the notion of a robust association between testosterone levels and breast cancer risk.

Remarkably, our current study unveiled a novel finding, demonstrating that metformin has the potential to reduce the risk of HER-positive (HER+) breast cancer, and this reduction is partially mediated through its impact on total testosterone levels. The testosterone reduction effect of metformin has been observed in previous reports [41, 42]. Some clinical trials have administrated metformin on non-diabetic breast cancer women, ending with a significant reduction of both insulin and testosterone levels [43, 44]. Furthermore, metformin primarily lowered estradiol levels by diminishing testosterone levels, and these hormonal alterations may hold relevance in certain clinical contexts. This underscores the multifaceted effects of metformin on hormonal regulation and its potential implications in breast cancer prevention and treatment.

Our study boasts several notable strengths. To our knowledge, this is the first study figuring out the genetic effect of metformin use on multiple prevalent cancer risks. And the mediators on the genetic pathway were clarified, and their mediating effects were calculated. Moreover, the genetic information incorporated in this study is giant, which increases the credibility of the conclusion.

While our study presents valuable insights, it's important to acknowledge its limitations. First, to ascertain the consistency of genetic background, this MR analysis only concluded European populations, which could not be extended to other ethnicities. Second, MR analysis of tumors with a small number of instances was less accurate (fewer than 1000). For the validation analysis, more genetic data from large samples need to be added. The association between metformin use and other malignancies cannot be determined at this time; however, this will be clarified in follow-up research.

Conclusion

The current MR study revealed that metformin use could genetically shield individuals from HER-positive breast cancer, which was mediated by total testosterone levels. Further investigation is required to determine whether metformin-induced changes in total testosterone levels could potentially serve as a predictor or biomarker in HER-positive breast cancer development and progression.