4. In a regular tetrahedron $ABCD$, points $M$ and $P$ are the midpoints of $AD$ and $CD$ respectively, and points $N$ and $Q$ are the centers of $\triangle BCD$ and $\triangle ABC$ respectively. Then the cosine of the angle between the lines $MN$ and $PQ$ is
4. $\frac{1}{18}$.

As shown in Figure 6, let the edge length of the regular tetrahedron $ABCD$ be 1, and let $M$ and $P$ be the midpoints of $AD$ and $CD$ respectively. $N$ and $Q$ are the centers of $\triangle BCD$ and $\triangle ABC$ respectively. Take the midpoint $F$ of $BC$, and connect $AF$ and $DF$. Then $AF = DF = \frac{\sqrt{3}}{2}$, and points $Q$ and $N$ lie on $AF$ and $DF$ respectively. In the plane $ADF$, construct $QE \parallel NM$ intersecting $AD$ at $E$. $\angle PQE$ (or its supplementary angle) is the angle between $MN$ and $PQ$.

Connect $PE$ and $NQ$. Since $\frac{FN}{FD} = \frac{FQ}{FA} = \frac{1}{3}$, then $NQ \parallel AD$. Therefore, quadrilateral $MNQE$ is a parallelogram, and $ME = NQ = \frac{1}{3}$, $DE = \frac{1}{2} + \frac{1}{3} = \frac{5}{6}$.

Connect $AN$, then $AN \perp$ plane $BCD$. In the right triangle $\triangle AND$, $MN = \frac{1}{2}$. Similarly, $PQ = \frac{1}{2}$. In $\triangle DPE$, $EP^2 = DE^2 + DP^2 - 2DP \cdot DE \cos 60^\circ = \frac{19}{36}$. In $\triangle PQE$, $\cos \angle PQE = \frac{EQ^2 + PQ^2 - EP^2}{2EQ \cdot PQ} = -\frac{1}{18} < 0$. Therefore, the cosine value of the angle between the lines $MN$ and $PQ$ is $\frac{1}{18}$.