Source-linked AI summary
Measuring Cross-Task Behavioral Consistency in Language Model Agents
Amritesh Banerjee, Pranil Raichura
TL;DR
Outcome metrics show whether language model agents succeed, but not whether they behave consistently. This paper introduces BCM and finds that cross-task and within-task consistency are distinct, potentially diverging dimensions.
Problem
Outcome metrics such as success rate measure task resolution but provide limited evidence about how consistently agents behave across executions.
Method
BCM represents each execution trace with success-predictive feature attributions and computes their mean pairwise similarity within an agent system.
Results
Cross-task and within-task consistency are distinct axes that can diverge, while consistency also separates from success rate across evaluated agent systems.
Takeaways & Limitations
BCM provides a process-level reliability signal that complements outcome metrics by exposing behavioral consistency differences they leave invisible.
Takeaways & Limitations
BCM’s robustness to alternative predictors, attribution methods, feature sets, and similarity measures remains untested.
Abstract
from arXiv · showhide
Agent evaluation relies almost entirely on outcome metrics such as success rate, which capture whether an agent succeeds but not how consistently it behaves. We argue that behavioral consistency across tasks is a distinct and measurable property, and we introduce the Behavioral Consistency Metric (BCM) to quantify it. BCM trains a model to predict task success from behavioral features of agent execution traces, derives a per-trajectory feature-attribution vector, and measures the mean pairwise similarity of these vectors within an agent system. Across roughly 9,000 trajectories from six language model agents on software engineering tasks, our central finding is that cross-task and within-task consistency are distinct axes that can diverge: some systems are locally reproducible, behaving similarly on repeated attempts at one task, yet globally fragmented, with no stable strategy across different tasks, while others are consistent at both scales. Prior work measures only same-task reproducibility and so cannot observe this separation. We further find that consistency is not reducible to success rate, since systems with comparable success can differ sharply in consistency, and that the frontier-versus-open-source consistency gap persists under a within-task control that holds task difficulty constant. We position BCM as a process-level reliability signal that complements outcome metrics, and we are explicit about the conditions under which it is meaningful.
1 Introduction
The paper argues that behavioral consistency across tasks is a distinct, underexamined reliability property that outcome metrics such as success rate cannot capture. It introduces BCM, which uses execution-trace features and attribution vectors to measure this property and reveals that cross-task and within-task consistency can diverge.
- Motivation: Outcome metrics such as success rate and pass@k record task resolution but not how agents reach their results.These metrics efficiently rank systems but omit behavioral information from long action sequences.
- Motivation: Agents with identical success rates can differ decisively in behavioral stability, affecting whether their behavior is recognizable, anticipatable, and trustworthy.One agent may use a stable approach while another reaches comparable performance through scattered strategies.
- Motivation: Cross-task behavioral consistency is distinct from success rate and from prior measures of same-task reproducibility.The paper treats consistency across different tasks as a separate, underexamined property measurable from execution traces.
- Method: BCM extracts structural trajectory features, predicts task success from them, and represents each trajectory with an attribution vector for measuring behavioral similarity.Features include step count, error frequency, and action allocation across searching, viewing, and editing.
- Findings: Roughly 9,000 trajectories from six agent systems show that cross-task and within-task consistency are distinct, can diverge, and remain separate from success rate.The study also finds that the frontier-versus-open-source consistency gap survives a within-task control holding task difficulty constant.
2 Related Work
Prior work shows that outcome metrics alone miss important behavioral patterns, while existing consistency measures focus almost exclusively on repeated runs of the same task. This work instead studies cross-task strategic coherence using success-predictor attribution vectors, distinguishing it from within-task reproducibility.
- Beyond outcome metrics for agents: Outcome metrics alone are insufficient for characterizing agent behavior, motivating trajectory analyses of patterns distinguishing successful from failed coding-agent runs.Examples include redundant exploration, premature fixes, and the balance between information gathering and editing.
- Consistency and reliability of agents: Existing consistency research almost exclusively asks whether agents reproduce behavior or outcomes across repeated runs of the same task.Prior work measures divergence across repeated same-task runs and includes outcome-consistency metrics.
- Consistency and reliability of agents: Cross-task strategic coherence and within-task consistency are distinct properties: an agent can be consistent within one task yet fragmented across different tasks.Prior findings that same-task consistency tracks accuracy therefore do not answer the cross-task question posed here.
- Attribution vectors as behavioral representations: The method represents each trajectory with a success-predictor feature-attribution vector and compares trajectories through vector similarity.Feature-attribution vectors have also been used to cluster or compare behavior in policy and reinforcement-learning analyses.
3 Method
The method represents agent execution trajectories with 12 behavioral features, uses an out-of-fold success predictor and TreeSHAP to derive behavioral signatures, and compares them with global and within-task BCM analyses.
- Trajectory representation: Each trajectory is mapped to a 12-dimensional structural feature vector summarizing execution depth, action length, navigation, editing, testing, diversity, repetition, errors, and transitions.The features are designed to be computable across agent architectures from ordered action sequences.
- Behavioral signatures: TreeSHAP values computed under the same out-of-fold scheme produce each trajectory’s ϕi ∈R12 attribution vector, used as its behavioral signature.Held-out attribution avoids explanations from a model trained on the explained trajectory.
- Consistency metric: BCM is the mean pairwise cosine similarity of valid attribution vectors, excluding near-zero vectors and remaining undefined when fewer than two valid vectors exist.The metric averages the strict upper triangle of the pairwise similarity matrix.
- Analysis groupings: Global BCM groups all trajectories by agent system, whereas within-task BCM computes per-instance scores for SWE-bench tasks with at least three trajectories and averages eligible instances.Uncertainty is estimated by non-parametric bootstrap over 1,000 iterations.
- Success prediction: The success predictor is a LightGBM classifier evaluated with five-fold stratified cross-validation on 9,191 trajectories, achieving a mean cross-validated AUC-ROC of 0.690.Out-of-fold predictions ensure each trajectory is scored by a model that did not train on it.
4 Experimental Setup
The experiments compare behavioral consistency with success globally, control for task difficulty through repeated attempts on identical instances, and stratify tasks by observed resolution rates.
- Experimental axes: The setup evaluates global cross-task BCM against success rate, then recomputes BCM within-task on repeated attempts at identical instances.The within-task control holds task difficulty constant.
- Difficulty stratification: Tasks are stratified into easy, medium, and hard terciles according to resolution rate.The hard tercile contains tasks left unsolved under every observed execution and is interpreted as observed-unsolvable, not independently measured difficulty.
5 Results
Results show that BCM distinguishes global cross-task consistency from within-task reproducibility, with attribution-space consistency separating frontier and open-source systems even after controlling for task difficulty. Consistency also varies independently of success rate and task difficulty, supporting BCM as a distinct process-level signal.
- Global cross-task consistency: Global BCM separates proprietary API systems (0.77–0.83) from open-source Llama SWE-agents (0.065–0.086), a more-than-order-of-magnitude gap.The comparison is confounded with agent scaffold, so it is interpreted as evidence that consistency and success are separable properties rather than a sweeping dissociation.
- Global cross-task consistency: GPT-4o and SWE-agent Llama-405B achieve comparable task success yet differ in cross-task consistency by more than an order of magnitude.This demonstrates that consistency is not reducible to success rate.
- Representation dependence: Standardized-raw BCM collapses to 0.28–0.54 without frontier-versus-open ordering, whereas attribution-space BCM spans 0.07 to 0.83.The gap is therefore visible in the attribution representation rather than the standardized raw features.
- Within-task control: Within-task consistency remains higher for frontier systems after fixing task difficulty, with Claude 3.5 Sonnet at 0.807 and Llama systems between 0.305 and 0.348.Because repeated attempts use identical task instances, the ordering indicates behavioral variation rather than differing task mixes; attribution to openness remains confounded by the shared SWE-agent scaffold.
- Within-task versus cross-task consistency: Llama-405B rises from global BCM 0.071 to within-task BCM 0.348, showing that local reproducibility can coexist with global cross-task instability.The other open-source Llama systems show the same pattern, establishing that cross-task and within-task consistency are distinct properties.
- Task difficulty: Difficulty effects differ by system: frontier consistency stays roughly stable across terciles, while Llama-405B increases and Llama-70B decreases on harder tasks.These findings are interpreted cautiously because the hard-task bin is subject to limitations noted elsewhere.
6 Discussion
The discussion presents behavioral consistency as a distinct process-level property that complements success rate, with cross-task and within-task consistency separating reproducible local behavior from transferable global strategy. BCM is currently diagnostic rather than predictive, while early-run reliability monitoring remains a hypothesis for future work.
- BCM measures whether an agent reaches goals the same way each time, complementing success rate rather than competing with it.The distinction is most informative when success rates are held roughly fixed while consistency varies.
- Cross-task and within-task consistency are distinct: an agent can behave reproducibly on repeated attempts yet lack a transferable strategy across tasks.Same-task reproducibility cannot capture this separation.
- BCM is diagnostic rather than predictive because it characterizes behavior after runs are complete.Using partial-run signals to anticipate outcomes is framed as a hypothesis requiring comparison with length-based and other obvious baselines.
7 Limitations
BCM measures consistency in success-predictive structural trajectory signatures, not semantic strategies directly. Its estimates and comparisons are subject to sampling, selection, harness, domain, and validation limitations.
- Measurement scope: BCM is a proxy for behavioral consistency based on twelve structural features, not a direct measure of semantic strategy.The features include step counts, edits, errors, and repetition, but do not capture whether an agent formed the right hypothesis or made relevant edits.
- Measurement scope: BCM can partly reflect base-model sampling variation rather than stable behavioral differences.The representation is inherited from a single success predictor.
- Estimation and comparison limits: Within-task estimates may over-represent repeatedly attempted tasks because they condition on instances with at least three attempts.This conditioning affects the interpretation of within-task consistency estimates.
- Estimation and comparison limits: The open-versus-closed comparison is confounded by the harness, while validation covers one task domain, six configurations, and one benchmark family.Generalization is therefore unestablished.
8 Conclusion
The paper introduces the Behavioral Consistency Metric (BCM) to measure cross-task behavioral consistency from execution traces, showing that consistency is a distinct reliability dimension beyond success rate. Across six software-engineering systems, cross-task and within-task consistency can diverge, and the frontier-versus-open-source gap persists under within-task control.
- 8 Conclusion: BCM makes cross-task behavioral consistency measurable from agent execution traces.It is introduced as a process-level metric for behavioral consistency.
- 8 Conclusion: Across six systems on software engineering tasks, cross-task and within-task consistency emerge as distinct axes that can diverge.The conclusion identifies these as separate dimensions of agent behavior.
- 8 Conclusion: The frontier-versus-open-source consistency gap survives a within-task control.The control holds task context constant while preserving the observed gap.
- 8 Conclusion: Consistency is separable from success rate, revealing a reliability dimension that outcome metrics alone leave invisible.The metric therefore complements, rather than replaces, outcome-based evaluation.