Noise-Immune Digital Circuit Design Based on Probabilistic Models