Binary classification as a 2-class classification problem I want to create a dog-classifier, which outputs the probability of an image containing a dog.

I have two approaches in mind -


Binary classifier (1-class), which just outputs the probability of the image containing a dog. This seems reasonable to me.
2-class classifier with two classes denoting "dog" and "not-dog". But my problem with this approach is that the neural network has to learn the "not-dog" class as well, which is impossible since it has no pattern and is different in each training example. 


Would the second approach be less effective than the first? Or even work at all?

Thank you.
tl;dr

The two approaches you mention are equally effective.

Why?

First of all, I'll assume you're referring to a neural-network-type model. You should note that Convolutional Neural Networks are discriminative models, meaning that they are trained to find the differences between two classes (e.g. dog and not-dog). 


  Would the second approach be less effective than the first?


Just to disprove this claim, consider the following. You have a 2-output classification network; let's name the outputs dog and not-dog. Now imagine, as you say, that the network can only identify dog patterns. All it would have to do was to give a positive weight to those patterns for the dog class and a negative weight for the not-dog class. In this sense the not-dog class would be trained as the opposite of the dog class, which would not make it less effective than a single-output binary classifier.

Even if the not-dog class could not be trained and remained constant, due to the fact that we're using a softmax activation, predictions would be generated just by the relative difference between the dog output and the constant not-dog output. This is exactly like having a single-output binary classifier.