In the present paper, we develop a new method of longitudinal analysis of bibliographic data in order to explore international mobility of researchers from the former USSR through their publication activity. Firstly, by means of name recognition algorithm using machine learning, we extracted from Web of Science a dataset of publications of more than three thousand of the most active computer scientists from the former Soviet Union. Then, the information on individuals' scientific production is presented in the form of a sequence of states which summarizes the affiliation location for all articles published by a certain author in a given period. We use Optimal Matching algorithm to measure the degree of difference (which, in the sequence analysis, is called distance) between the sequences of individual researchers' activity. The distance between sequences is analyzed by means of hierarchical clustering, which permits us to group computer scientists from the former USSR in several classes according to publication activity patterns. Not surprisingly, ex-soviet researchers having permanent affiliation in their home country are cited less than those who have permanent foreign affiliation. However, those who switch affiliations from former USSR to foreign or the other way round and publish in internationalized groups have one of the highest levels of citation per article among newcomers in discipline. Our research shows that scientific mobility of successful authors can be not only unidirectional, but can take form of a complex go-and-return pattern, the claim which relativizes the "brain drain" paradigm in the analysis of migration of highly qualified specialists from the former URSS. On the methodological level, we propose a new method for analyzing scientific activity which takes into account its longitudinal dynamics. This method can be used for research questions going far beyond the scope of migration studies.