Dependency-based anomaly detection