Let $A$ denote the Steenrod algebra at the prime 2 and let $k = \mathbb Z_2.$ An open problem of homotopy theory is to determine a minimal set of $A$-generators for the polynomial ring $P_q = k[x_1, \ldots, x_q] = H^{*}(k^{q}, k)$ on $q$ generators $x_1, \ldots, x_q$ with $|x_i|= 1.$ Equivalently, one can write down explicitly a basis for the graded vector space $Q^{\otimes q} := k\otimes_{A} P_q$ in each non-negative degree $n.$ This is the content of the classical "hit problem" of Frank Peterson. Based on this problem, we are interested in the $q$-th algebraic transfer $Tr_q^{A}$ of W. Singer \cite{W.S1}, which is one of the useful tools for describing mod-2 cohomology of the algebra $A.$ This transfer is a linear map from the space of $GL_q(k)$-coinvariant $k\otimes _{GL_q(k)} P((P_q)_n^{*})$ of $Q^{\otimes q}$ to the $k$-cohomology group of the Steenrod algebra, ${\rm Ext}_{A}^{q, q+n}(k, k).$ Here $GL_q(k)$ is the general linear group of degree $q$ over the field $k,$ and $P((P_q)_n^{*})$ is the primitive part of $(P_q)^{*}_n$ under the action of $A.$ The present paper is to investigate this algebraic transfer for the cohomological degree $q = 4.$ More specifically, basing the techniques of the hit problem of four variables, we explicitly determine the structure of $k\otimes _{GL_4(k)} P((P_4)_{n}^{*})$ in some generic degrees $n.$ Applying these results and a representation of the rank 4 transfer over the lambda algebra, we show that $Tr_4^{A}$ is an isomorphism in respective degrees. Also, we give some conjectures on the dimensions of $k\otimes_{GL_q(k)} ((P_4)_n^{*})$ for the remaining degrees $n.$ As a consequence, Singer's conjecture for the algebraic transfer is true in the rank 4 case. This study and our previous results \cite{D.P11, D.P12} have been provided a panorama of the behavior of $Tr_4^{A}.$