  Object recognition and viewpoint estimation lie at the heart of visual
understanding. Recent works suggest that convolutional neural networks (CNNs)
fail to generalize to out-of-distribution (OOD) category-viewpoint
combinations, ie. combinations not seen during training. In this paper, we
investigate when and how such OOD generalization may be possible by evaluating
CNNs trained to classify both object category and 3D viewpoint on OOD
combinations, and identifying the neural mechanisms that facilitate such OOD
generalization. We show that increasing the number of in-distribution
combinations (ie. data diversity) substantially improves generalization to OOD
combinations, even with the same amount of training data. We compare learning
category and viewpoint in separate and shared network architectures, and
observe starkly different trends on in-distribution and OOD combinations, ie.
while shared networks are helpful in-distribution, separate networks
significantly outperform shared ones at OOD combinations. Finally, we
demonstrate that such OOD generalization is facilitated by the neural mechanism
of specialization, ie. the emergence of two types of neurons -- neurons
selective to category and invariant to viewpoint, and vice versa.
