Bearings are one of the main components of rotating machinery, and their failure is one of the most common cause of mechanical failure. Therefore, many fault detection methods based on artificial intelligence, such as machine learning and deep learning, have been proposed. Particularly, with recent advances in deep learning, many anomaly detection methods based on deep neural networks (DNN) have been proposed. DNNs provide high-performance recognition and are easy to implement; however, optimizing DNNs require large annotated datasets. Additionally, the annotation of time-series data, such as abnormal vibration signals, is time consuming. To solve these problems, we proposed a method to automatically extract features from abnormal vibration signals from the time-series data. In this research, we propose a new DNN training method and fault detection method inspired by multi-instance learning. Additionally, we propose a new loss function for optimizing the DNN model that identifies anomalies from a time-series data. Furthermore, to evaluate the feasibility of automatic feature extraction from vibration signal data using the proposed method, we conducted experiments to determine whether anomalies could be detected, identified, and localized in published datasets.