Stability analysis for topic models