  For a set theoretical solution of the Yang-Baxter equation $(X,\sigma)$, we
define a d.g. bialgebra $B=B(X,\sigma)$, containing the semigroup algebra
$A=k\{X\}/\langle xy=zt : \sigma(x,y)=(z,t)\rangle$, such that $k\otimes_A
B\otimes_Ak$ and $\mathrm{Hom}_{A-A}(B,k)$ are respectively the homology and
cohomology complexes computing biquandle homology and cohomology defined in
\cite{CJKS} and other generalizations of cohomology of rack-quanlde case (for
example defined in \cite{CES}). This algebraic structure allow us to show the
existence of an associative product in the cohomology of biquandles, and a
comparison map with Hochschild (co)homology of the algebra $A$.
