Theory and Computation for Modern Probabilistic Models