The automatic segmentation of cardiac magnetic resonance images poses many challenges arising from the large variation between different anatomies, scanners and acquisition protocols. In this paper, we address these challenges with a global graph search method and a novel spectral embedding of the images. Firstly, we propose the use of an approximate graph search approach to initialize patch correspondences between the image to be segmented and a database of labelled atlases, Then, we propose an innovative spectral embedding using a multi-layered graph of the images in order to capture global shape properties. Finally, we estimate the patch correspondences based on a joint spectral representation of the image and atlases. We evaluated the proposed approach using 155 images from the recent MICCAI SATA segmentation challenge and demonstrated that the proposed algorithm significantly outperforms current state-of-the-art methods on both training and test sets.