Macro recall is an aggregate recall measure across categories or change types, giving equal weight to each group rather than letting large groups dominate the result. It is useful when evaluating whether an agent performs consistently across mixed security scenarios, especially when some categories are much easier than others.
Expanded Definition
Macro recall is a category-balanced evaluation measure that treats each class, scenario, or change type as equally important, rather than allowing a large or easy group to dominate the score. In NHI and agentic AI security, that makes it useful for judging whether an agent behaves reliably across mixed risk conditions such as benign prompts, permission changes, secret exposure, and tool misuse. It is closely related to class-averaged performance reporting in NIST SP 800-53 Rev 5 Security and Privacy Controls style governance, where coverage matters as much as aggregate success. Definitions vary across vendors because some teams compute macro recall over attack categories, while others use it over operational states or policy groups; the important point is that every group contributes equally to the final measure. In practice, this helps security teams avoid false confidence when a model looks strong overall but fails badly in a minority of high-risk scenarios. The most common misapplication is reporting a single high aggregate recall score from a skewed test set, which occurs when frequent safe cases hide repeated failures in rare but security-critical categories.
Examples and Use Cases
Implementing macro recall rigorously often introduces more testing and labeling overhead, requiring organisations to weigh fairness across categories against simpler reporting that may mask blind spots.
- Evaluating an AI agent that must refuse unsafe tool calls, where each abuse pattern is counted equally even if some patterns appear less often.
- Comparing detection performance across API key leakage, privilege escalation, and prompt injection scenarios to ensure one easy class does not inflate the result.
- Measuring an NHI control validation suite against different environments, such as development, staging, and production, when each environment presents distinct failure modes.
- Tracking whether an agent remains safe after permission changes, because a strong overall score can still hide poor recall on newly introduced access states.
For baseline NHI governance context, the Ultimate Guide to NHIs is useful because it frames why visibility, rotation, and offboarding create different security conditions that should not be collapsed into one metric. For implementation and test design, teams often pair macro recall with NIST SP 800-53 Rev 5 Security and Privacy Controls to keep evaluation tied to operational control coverage rather than raw model accuracy.
Why It Matters in NHI Security
Macro recall matters because NHI failures are rarely evenly distributed. A service account, token workflow, or autonomous agent may perform well in routine conditions while missing the exact cases that matter most: unusual permission sets, expired secrets, revoked access, or malformed tool requests. That is why NHIMG treats balanced evaluation as a governance issue, not just a testing preference. When security teams rely only on aggregate recall, they can miss category-specific gaps that later become incident paths. This is especially relevant in environments where Ultimate Guide to NHIs shows 80% of identity breaches involved compromised non-human identities such as service accounts and API keys, and where 71% of NHIs are not rotated within recommended time frames. Those conditions create uneven risk surfaces that macro recall is designed to expose. It also aligns with the control intent in NIST SP 800-53 Rev 5 Security and Privacy Controls, where security outcomes must be demonstrable across distinct control-relevant situations. Organisations typically encounter the need for macro recall only after a bypass, leakage, or privilege failure has been traced to a scenario their aggregate metric never highlighted.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
OWASP Agentic AI Top 10 and OWASP Non-Human Identity Top 10 address the attack and risk surface, while NIST CSF 2.0, NIST AI RMF and NIST SP 800-63 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP Agentic AI Top 10 | A2 | Balanced evaluation is needed to detect agent failures across varied abuse and safety scenarios. |
| OWASP Non-Human Identity Top 10 | NHI-10 | Macro recall helps validate NHI security controls across uneven identity and secret risk conditions. |
| NIST CSF 2.0 | GV.RM | Risk management requires performance evidence that covers all material scenarios, not only frequent ones. |
| NIST AI RMF | AI RMF emphasizes measuring performance and harms across diverse contexts and use conditions. | |
| NIST SP 800-63 | AAL2 | Assurance decisions depend on consistently strong outcomes across distinct authentication-related conditions. |
Measure each agent risk category equally so rare but dangerous failures are not hidden by common safe cases.