The torus compactification as well as toroidal orbifold compactifications
is one of simplest compactifications.
The 2D torus has two independent one-cycles.
We have the degree of freedom to change bases of these cycles.
That is the \(SL(2, \mathbb {Z})\)  transformation, which is called as
the modular symmetry.
The modular group is the geometrical symmetry, and also
transforms zero-modes corresponding to quarks and leptons,
that is, the flavor symmetry.
(See for the modular symmetry in magnetized D-brane models [1]}, [2]}, [3]} and the classification of
its subgroup [4]}.)Recently, the modular flavor symmetries are studied extensively from
the phenomenological viewpoint [5]}.
When there are 4D models having non-trivial flavor symmetries,
the 4D CP symmetry can be enlarged to a generalized CP symmetry,
which includes outer automorphisms of flavor symmetries [6]}, [7]}, [8]}.
Such a generalized CP symmetry is also extended to
the modular symmetry on the torus compactification, where
CP symmetry is identified with the outer automorphism of \(SL(2, \mathbb {Z})\)  [9]}, [10]}.
