"Brain signatures" as objective measures of acute pain have been characterized with functional magnetic resonance image and machine learning technology. As compared to acute pain, chronic pain leads to greater socioeconomic burden. However, measures for chronic pain remain subjective and suboptimal, and the brain signatures for chronic pain are largely unknown. Chronic migraine and fibromyalgia are two prototypes primary chronic pain disorders with high disability and intractability with prevalence of around 2% for both diseases. These two chronic pain disorders have shared clinical presentations (abnormal pain sensitivity, mood and sleep disorders), pathophysiology (central sensitization) and medical treatment (anti-depressants), despite different body parts are involved (head vs. whole body). The present integrated project aims to characterize both common and disease-specific brain signatures of chronic pain by investigating these two chronic pain disorders. Our findings may shed some light on the key mechanisms of pain chronification, and may pave the way for the optimization of diagnosis and prognostication, as well as formulation of personalized medicine in chronic pain, so as to improve life quality of these patients and to reduce socioeconomic loss.