Scalable Semidefinite Relaxation for Maximum A Posterior Estimation