Project 02

semantic_loss_toy

A small-scale implementation used to examine how logical validity can be expressed directly as probability mass over satisfying worlds.

Core question

How can a valid output structure become a differentiable objective without introducing a teacher model?

Suggested code order

Begin with the constraint definition, then inspect the loss computation, and finally trace how the loss enters the trainer.

Mechanism to watch

A key mechanism is that optimization is not over the most likely class alone; it is over the total probability mass assigned to worlds that satisfy the logical constraint.