Title: Unsupervised inference for optimizing deep feedforward neural network architecture. Abstract: We propose an unsupervised inference algorithm to find optimal deep feedforward neural network architecture by modeling hierarchical representations of given data set. Our algorithm learns the optimal neural network architecture that represents a system that generates observed data, in a forward manner without backpropagation. We hypothesize that a neural network architecture, which models the hierarchical representations of given data, provides the optimal feedforward neural network architecture with competitive predictive performance in a supervised manner when compared with supervised-based neural network architecture optimization models. To prove the hypothesis, we evaluated the predictive performance with the feedforward neural network architectures with intensive experiments using various well-known benchmark data sets, such as SPECT, FMNIST, CIFAR-10, heart disease, German Credit, and Statlog heart data. Our algorithm requires much smaller search space for feasible computation than conventional supervised-based neural network architecture optimization methods. The proposed unsupervised inference approach can fully enjoy optimizing neural network architecture from small size of labeled data, when a huge unlabeled data is available. 