Local features, such as local binary patterns (LBP), have shown better performance than global feature in the problem of face recognition. However, the methods to extract the local features are usually given as fixed, and also neglect the class labels of the training samples. In this paper, we propose a novel algorithm to learn a discriminate local feature from the small patches of the face image to boost the face recognition. The pixels of each image patch and its neighboring patches are both used to construct the local feature. The pixel vector of each patch is mapped to new subspaces by a transformation matrix, and mapped pixel vectors the neighboring patches are also combined to obtain the local feature vector. The subspace mapping parameter and the neighboring patch combination parameter are learned to minimize the distances of local features between the same person, and at the same time to maximize that between different persons. We perform experiments on some benchmark face image database to show the advantage of the proposed method.