CTSketch: Compositional Tensor Sketching for Scalable Neurosymbolic Learning