IntroductionPsychological inflexibility (PI) has been associated with anxiety symptoms, while resilience serves as a protective factor; however, their roles and interrelationship remain poorly understood. We investigated the role of PI on anxiety-related symptoms while assessing the mediating role of resilience and testing the moderating effect of sex and psychiatric history.MethodsFrom April to July 2021, an online protocol employing self-reported measures assessed PI (Acceptance and Action Questionnaire), resilience dimensions (Resilience Scale for Adults), and anxiety-related symptoms (Generalized Anxiety Disorder (GAD) Scale; Depression, Anxiety, and Stress Scales). A model generation approach, using machine-learning and robust mediation-based models, was applied to investigate the relationships between these constructs.ResultsIn a sample of 313 adults (72.20% females; 39.29 ± 11.81 years), Random Forest analysis indicated PI and the resilience dimensions perception of self (R-PS) and planned future (R-PF) as the strongest predictors of anxiety-related symptoms. PI showed a positive direct association with GAD, anxiety, and stress (respectively β = 0.28, β = 0.07, β = 0.20, p ≤ 0.001). Significant indirect associations emerged: PI–Stress regarding R-PS (β = 0.08, p = 0.004), PI–Anxiety regarding R-PF (β = 0.03; p = 0.03), PI–GAD (β = 0.08, p = 0.001) and PI–Stress (β = 0.11, p < 0.001) regarding R-PS and R-PF together.DiscussionThese findings highlight the importance of PI and resilience as interconnected processes underlying mental health outcomes. Additionally, they suggest that psychological intervention programs targeting PI, along with resilience, could foster healthier strategies for coping with anxiety-related symptoms.

