Abstract We present a Phenotype-Embedding theorem and prove that the virus fitness can be calculated under the Encoder-Decoder framework. Building on the Phenotype-Embedding theorem and a modified Transformer model, we obtain a calculable quantitative relationship between “immune escape” mutations and the virus fitness and plot a genotype-fitness landscape in the embedded space. Using only the sequence data of the SARS-CoV-2 spike protein, we accurately calculated the virus fitness and the basic reproduction number (R 0 ). In addition, our model can simulate viral neutral evolution and spatio-temporal selection, decipher the effects of epistasis and recombination, and more accurately predict viral mutations associated with immune escape. Our work provides a theoretical framework for constructing genotype-phenotype landscapes and a paradigm for the interpretability of deep learning in studying virus evolution. One-Sentence Summary Computing virus immune escape mutations and the basic reproduction number (R 0 ) in embedding space to construct genotype-fitness landscapes.