Abstract We propose Facial Trait Code (FTC) to encode human facial images for facial analysis. Extracted from an exhaustive set of local patches cropped from a large stack of faces, the facial traits and the associated trait patterns can accurately capture the appearance of a given face. The extraction has two phases. The first phase is composed of clustering and boosting upon a training set of faces with neural expression, even illumination, and frontal pose. The second phase focuses on the extraction of the facial trait patterns from the faces with variations in expression, illumination, and poses. With two different metrics for characterizing the facial trait patterns, the FTC can take either hard or probabilistic codewords. The former offers a concise representation to a face; the latter enables codeword matching with superb accuracy. The proposed FTC can be applied to face identification and verification, expression recognition, gender recognition, and face synthesis. For the application to face identification and verification, a face is encoded as a codeword, and this codeword is matched against known codewords. Experiments reveal that the FTC outperforms many face recognition algorithms, including a couple considered as the most potential ones in recent years. For the application of FTC to expression recognition, the external patterns that encode the variation among facial images caused by different facial expressions are identified, and the pattern-to-expression probabilities are learned. The facial traits are best for discrimination of different individuals. Besides facial traits, we also select the gender traits that are effective in discriminating different genders and use them for gender recognition. The FTC decoding can be task-oriented. We propose the decoding scheme for face synthesis and demonstrate it can synthesize random, life-like faces effectively. Short Bio Ping-Han Lee received his B.Sc. and M.Sc. from Naval Architecture and Ocean Engineering at National Taiwan University in 2000 and 2002, respectively. He received his Ph.D. from the Graduate Institute of Computer Science and Information Engineering at National Taiwan University in 2010. His research interests include face recognition, video surveillance, computer vision and image processing.