Skip to content

Remove trivial affects generalization rules#84

Merged
maximusunc merged 1 commit into
BioPack-team:mainfrom
cbizon:codex/1182
May 12, 2026
Merged

Remove trivial affects generalization rules#84
maximusunc merged 1 commit into
BioPack-team:mainfrom
cbizon:codex/1182

Conversation

@cbizon
Copy link
Copy Markdown
Contributor

@cbizon cbizon commented May 12, 2026

Summary

  • Remove four AMIE rules where activity or abundance affects edges imply the broader activity_or_abundance affects edge.
  • Prevent ARAGORN from synthesizing redundant inferred prediction edges when direct source edges already satisfy the broader query edge.
  • Leave the remaining multi-edge AMIE rules unchanged.

Issue

The removed rules are logically true but trivial: the more specific qualifier set on the left-hand side already implies the broader activity_or_abundance qualifier set on the right-hand side. Underlying data-source edges with activity or abundance can be bound directly to an activity_or_abundance query edge, so Shepherd should not create an additional inferred edge supported only by those direct edges.

This fixes https://github.com/NCATSTranslator/Feedback/issues/1182.

Testing

  • jq '[.[] | length] | add' workers/aragorn_lookup/rules_with_types_cleaned_finalized.json
  • jq '[.. | objects | .Rule? // empty | select(. == "?a increased_activity_biolink:affects ?b => ?a increased_activity_or_abundance_biolink:affects ?b" or . == "?a increased_abundance_biolink:affects ?b => ?a increased_activity_or_abundance_biolink:affects ?b" or . == "?a decreased_activity_biolink:affects ?b => ?a decreased_activity_or_abundance_biolink:affects ?b" or . == "?a decreased_abundance_biolink:affects ?b => ?a decreased_activity_or_abundance_biolink:affects ?b")] | length' workers/aragorn_lookup/rules_with_types_cleaned_finalized.json
  • uv run --with-requirements test-requirements.txt pytest tests/unit/aragorn/test_aragorn_lookup.py tests/unit/test_merge_message_helpers.py

- Remove four AMIE rules where activity or abundance directly imply activity_or_abundance.

- Avoid synthesizing redundant inferred ARAGORN edges when direct source edges can bind to the broader query edge.

- Fixes NCATSTranslator/Feedback#1182.
@maximusunc maximusunc self-requested a review May 12, 2026 18:13
@codecov
Copy link
Copy Markdown

codecov Bot commented May 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 56.45%. Comparing base (51c0931) to head (4d02146).
⚠️ Report is 12 commits behind head on main.
see 24 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 371b0ec...4d02146. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Collaborator

@maximusunc maximusunc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@maximusunc maximusunc merged commit 2fccccb into BioPack-team:main May 12, 2026
2 checks passed
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