Skip to content

Conversation

@n28div
Copy link
Collaborator

@n28div n28div commented Mar 13, 2025

This PR addresses some major changes in cirkit. The main change is the implementation of conditional circuits. This changes parameters to include an additional batch dimension. The change should be as transparent to users as possible. Additionally, the PR includes a routing for backward evaluation of the circuit, which is then used for MAP and sampling queries on the circuit, both with and without evidence.

A functional query on symbolic circuit has been introduced to externally parameterise them. It replaces tensor parameters within a parameter's graph. For now, the query is restricted to work on symbolic circuit that have not been previously transformed, but I suppose the check can be safely removed, I just did not test it thoroughly.

Here is a non-exhaustive list of other changes:

  • adding metadata into symbolic layers to allow injection of attributes when a circuit is built starting from another defined source (e.g., logic circuits)
  • more efficient construction of logic circuits
  • definition of a functional transformation over symbolic circuit that allows the use of gate functions to parametrise a set of layers specified by the user
  • extension of the input layers and tensor parameters to support batched parameters, this allows gate function to parametrize a circuit based on the batch size in the input
  • example notebook on semantic loss, semantic probabilistic layer, MAP, sampling

Some features are still not implemented for all layers (for instance, layer maximizations and sampling might be broken on some specific layers). A more comprehensive test suite would help into pinpointing those.

loreloc and others added 30 commits December 4, 2024 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants