One of the major limitations of HMM-based models is the inability to cope with topology: When applied to a visible observation (VO) sequence, HMM-based techniques have difficulty predicting the n-dimensional shape formed by the symbols of the VO sequence. To fulfill this need, we propose a novel paradigm named “topological hidden Markov models” (THMM’s) that classifies VO sequences by embedding the nodes of an HMM state transition graph in a Euclidean space. We have applied the concept of THMM’s to: (i) predict the ASCII class assigned to a handwritten numeral, and (ii) map a protein primary structure to its 3D fold. The results show that the concept of second level THMM’s outperforms the SHMM’s and the SVM classifiers.