Skip to content

Add abstractions for filtering backward model proposals#151

Merged
kmaziarz merged 13 commits intomainfrom
kmaziarz/filtered-search
Apr 28, 2026
Merged

Add abstractions for filtering backward model proposals#151
kmaziarz merged 13 commits intomainfrom
kmaziarz/filtered-search

Conversation

@kmaziarz
Copy link
Copy Markdown
Contributor

One important missing feature of syntheseus is support for filtering backward model proposals during search, for example by using a forward model or a feasibility model. This PR proposes some initial abstractions to do that, notably ReactionFilterModel to encapsulate all logic that filters proposed reaction steps. Given that filter and scoring models would also benefit from caching, I first extracted the caching-related logic from ReactionModel into a shared base class.

After we agree on these abstractions, the next step will be to add hooks into the search CLI to then enable basic forms of filtering during search, and log more statistics related to filtering itself (e.g. acceptance rates and fraction of time spent on filter model vs backward).

This PR is split into logical commits for easier reviewing.

@kmaziarz kmaziarz force-pushed the kmaziarz/filtered-search branch from a3d8798 to 178480b Compare April 27, 2026 14:07
@kmaziarz kmaziarz requested a review from fiberleif April 27, 2026 18:18
@kmaziarz kmaziarz force-pushed the kmaziarz/filtered-search branch from 6e9196f to 652048f Compare April 27, 2026 18:26
Comment thread syntheseus/reaction_prediction/filters/forward.py
@kmaziarz kmaziarz force-pushed the kmaziarz/filtered-search branch from 652048f to 9dac9df Compare April 27, 2026 19:03
@kmaziarz kmaziarz force-pushed the kmaziarz/filtered-search branch from f81d6bf to 62be321 Compare April 28, 2026 00:29
@kmaziarz kmaziarz enabled auto-merge (squash) April 28, 2026 13:21
@kmaziarz kmaziarz merged commit 84733c1 into main Apr 28, 2026
10 checks passed
@kmaziarz kmaziarz deleted the kmaziarz/filtered-search branch April 28, 2026 13:35
@AustinT
Copy link
Copy Markdown
Collaborator

AustinT commented Apr 30, 2026

@kmaziarz sorry for silence from me- last week was quite busy. I don't have time to look in detail now but the feature makes sense, thanks for adding!

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.

3 participants