Enhancing Anomaly Detection with Flexible Distribution Models