It depends on what you mean by "built-in." JPEG doesn't have some probabilistic image model stored in it's guts, but the way the algorithm works (Chroma subsampling into DCT into non-uniform quantization into entropy coding) it only works with data that has certain mathematical properties assuming certain error models that natural images perceived by humans happen to possess. You may want to consider looking into perceptual measures of image reconstruction error.

As for the style thing, Google's search likely uses a neural net where one or more "neurons" triggers on things that have very high contrast and are primarily one color, which line drawings would be.