This document proposes two methods, attribute-enhanced sparse coding and attribute-embedded inverted indexing, to improve large-scale content-based face image retrieval by leveraging automatically detected human attributes. The methods aim to construct semantic code words and provide efficient retrieval, significantly reducing the semantic gap between high-level queries and low-level features. Experimental results demonstrate up to 43.5% improvement in retrieval accuracy on public datasets compared to existing approaches.