Proposal: DecayDeltaScorer — a turn-over-turn rate-of-change scorer for multi-turn attacks
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 38/100
Hướng nghiên cứu
Bắt đầu bằng cách đọc memory_interface.py, đặc biệt là get_scores() và get_conversation_messages(), sau đó so sánh các mẫu wrapping của FloatScaleScorer, MessageFloatScaleScorer và FloatScaleThresholdScorer. Xác định xem các lượt trước có nên được chấm điểm lại hay các score đã được lưu bền vững nên được truy xuất theo ID của từng message-piece, đồng thời xác định hành vi mong đợi đối với các delta giữa những lượt liên tiếp trước khi triển khai.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Motivation
PyRIT has strong multi-turn attack orchestration (including Crescendo) and a ConversationScorer that evaluates conversation context by re-scoring the accumulated history. However, I haven't found a scorer that explicitly captures the rate of risk change between turns without repeatedly evaluating the full conversation.
I also searched the repository for related concepts such as delta, rate_of_change, turning_point, and decay across pyrit/score and pyrit/executor, but didn't find an existing equivalent. Happy to be pointed to an existing implementation if I've missed one.
Proposed approach
I'd like to propose a DecayDeltaScorer, implementing FloatScaleScorer / MessageFloatScaleScorer and following the wrapping pattern used by FloatScaleThresholdScorer.
Rather than thresholding the wrapped scorer's output, it would calculate the change in score between consecutive turns:
Δ(t) = S(t) − S(t−1)
where S(t) is the wrapped scorer's score for the current turn and S(t−1) is its score for the previous turn in the same conversation.
The goal is for this to be a deterministic, lightweight complement to ConversationScorer, rather than a replacement:
ConversationScorer: "How risky is the conversation at this point?"DecayDeltaScorer: "How quickly is the risk changing?"
This could be particularly useful for gradual, multi-turn escalation such as Crescendo attacks, where individual turns may remain below a detection threshold while the overall trajectory is consistently increasing.
Implementation question
This is the main reason I'm opening an issue before submitting a PR.
I traced get_scores() in memory_interface.py. It supports filtering by score type/category/timestamp/scorer identifier, but I don't see a direct conversation-level filter for retrieving the wrapped scorer's previous score.
Two possible approaches I see are:
- Re-score previous turns retrieved through
get_conversation_messages(). - Retrieve persisted scores using the message-piece IDs associated with the conversation.
I'd appreciate guidance on which approach better fits PyRIT's existing architecture and performance expectations before I proceed with an implementation.
Background
This proposal is motivated by my research into trajectory-level detection of gradual multi-turn attacks. In particular, I've observed cases where per-turn monitoring provides little or no pre-critical signal, while monitoring the trajectory reveals a consistent increase in risk.
I'm happy to share additional methodology or benchmark details if they would be useful for evaluating the proposed scoring approach.
If the approach fits PyRIT's scoring architecture, I'd be happy to follow up with a PR.
- Ngôn ngữ chính
- Python
- Star
- 4.5k
- Fork
- 896
- Merge trung bình
- 3 ngày 5 giờ
- Pull request đã merge (30 ngày)
- 200
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của microsoft/PyRIT
-
BUG HarmBench loader drops ContextString, so contextual behaviors are sent without their context Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
Tất cả issue của microsoft/PyRIT
Issue tương tự
-
bug priority:low
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
CyberAgent/psd2svg#436 ·
-
area/install-update comp/cli comp/desktop P3 sweeper:risk-compatibility type/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
NousResearch/hermes-agent#122386 · 1 bình luận ·
-
ai-generated
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
vllm-project/production-stack#1105 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100