Skip to content

Speeding Up Hypotheses Merging in Multi-Trace Inference#119

Merged
Essoz merged 1 commit intomainfrom
fix_multi_trace_inference_stuck
Mar 25, 2025
Merged

Speeding Up Hypotheses Merging in Multi-Trace Inference#119
Essoz merged 1 commit intomainfrom
fix_multi_trace_inference_stuck

Conversation

@Essoz
Copy link
Copy Markdown
Collaborator

@Essoz Essoz commented Mar 25, 2025

We used to do a O(n) look-up to find hypotheses that specifies the same invariants (these hypotheses are generated from different traces). The found hypotheses will be merged by merging the list corresponding positive_examples and negative_examples.

This design causes significant slow down when multi-trace inference is performed at a very large-scale (e.g. on 5+ traces from transformers examples) and cause the inference to halt.

This PR makes the look-up and merging process constant. Prior to this PR, with around 5K hypotheses, find and merge one hypothesis will take ~1.3s. After this PR, merging all 5K hypotheses finishes instantly.

@Essoz Essoz self-assigned this Mar 25, 2025
@Essoz Essoz added the enhancement New feature or request label Mar 25, 2025
@Essoz Essoz merged commit 9789957 into main Mar 25, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant