Both labeled and unlabeled data have been widely used in electroencephalographic (EEG)-based brain-computer interface (BCI). However, labeled EEG samples are generally scarce and expensive to collect, while unlabeled samples are considered to be abundant in real applications. Although the semi-supervised learning (SSL) allows us to utilize both labeled and unlabeled data to improve the classification performance as against supervised algorithms, it has been reported that unlabeled data occasionally undermine the performance of SSL in some cases. To overcome this challenge, we propose a collaborative representation-based semi-supervised extreme learning machine (CR-SSELM) algorithm to evaluate the risk of unlabeled samples by a new safety-control mechanism. Specifically, the ELM model is firstly used to predict unlabeled samples and then the collaborative representation (CR) approach is employed to reconstruct the unlabeled samples according to the obtained prediction results, from which the risk degree of unlabeled sample is defined. A risk-based regularization term is then constructed accordingly and embedded into the objective function of the SS-ELM. Experiments conducted on benchmark and EEG datasets demonstrate that the proposed method outperforms the ELM and SS-ELM algorithm. Moreover, the proposed CR-SSELM even offers the best performance while SS-ELM yields worse performance compared with its supervised counterpart (ELM). Graphical abstract This paper proposes a collaborative representation-based semi-supervised extreme learning machine (CR-SSELM) algorithm to evaluate the risk of unlabeled samples by a new safety-control mechanism. It is aim to solve the safety problem of SS-ELM method that SS-ELM yields worse performance than ELM. With the help of safety mechanism, the performance of our method is still better than supervised ELM method.