Differentiable Structure Learning for General Binary Data