Learning Minimal Abstractions