We introduce and start the study of a bialgebra of graphs, which we call the 4-bialgebra, and of the dual bialgebra of 4-invariants. The 4-bialgebra is similar to the ring of graphs introduced by W. T. Tutte in 1946, but its structure is more complicated. The roots of the definition are in low dimensional topology, namely, in the recent theory of Vassiliev knot invariants. In particular, 4-invariants of graphs determine Vassiliev invariants of knots. The relation between the two notions is discussed.