Skip to content

Hierarchical occlusion saliency engine#3

Merged
amrit110 merged 4 commits into
mainfrom
feat/saliency-engine
Jun 5, 2026
Merged

Hierarchical occlusion saliency engine#3
amrit110 merged 4 commits into
mainfrom
feat/saliency-engine

Conversation

@amrit110

@amrit110 amrit110 commented Jun 5, 2026

Copy link
Copy Markdown
Member

Summary

  • Implements SaliencyEngine: two-pass hierarchical occlusion that masks input context segments, re-runs the agent's decision call, and scores each segment by the drop in log-probability of the original decision
  • Pass 1 operates at segment level (system prompt, user message, retrieved docs); Pass 2 drills into the top-k segments at sentence level
  • Logprob-based continuous scoring with binary fallback when logprobs are unavailable
  • Core types: Segment, SaliencyScore, SaliencyResult

Test plan

  • 41 unit tests pass (uv run pytest tests/)
  • All pre-commit checks pass (ruff, mypy, typos)
  • CI: code_checks and unit_tests workflows added
  • Run examples/demo_saliency.py against the Vector proxy to verify end-to-end output

amrit110 added 4 commits June 5, 2026 08:10
- SaliencyEngine: two-pass hierarchical occlusion (segment then sentence
  level) with logprob-drop scoring and binary fallback
- Core types: Segment, SaliencyScore, SaliencyResult
- 41 unit tests, all passing, no network calls
- CI: code_checks and unit_tests workflows, pre-commit config
- pyproject.toml: full ruff/mypy/pytest/uv setup matching helix conventions
- DESIGN.md: updated to reflect actual architecture and drop structured reasoning
- README and working example script
@amrit110 amrit110 merged commit 16552a3 into main Jun 5, 2026
5 checks passed
@amrit110 amrit110 deleted the feat/saliency-engine branch June 5, 2026 12:15
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.

1 participant