Back to AI Research

AI Research

Capability Sheaves for Compositional Agent-Harness... | AI Research

Key Takeaways

  • Capability Sheaves for Compositional Agent-Harness Repair: Controlled Quotients and a Real-Repository Stress Test introduces a mathematical framework using s...
  • Agent harnesses combine retrieval, routing, state, provenance, and verification, but locally successful components may disagree on shared state.
  • We model this failure with a finite \emph{capability sheaf}: stalks encode typed behavior signatures, restriction maps retain shared fields, and accepted runs are useful global sections.
  • An exact finite constraint-satisfaction problem (CSP) defines acceptance, while a linearized relative cohomology class provides a diagnostic and search feature.
  • A controlled experiment over 20 task clusters introduces hidden interior mediators whose raw states are nuisance variables.
Paper AbstractExpand

Agent harnesses combine retrieval, routing, state, provenance, and verification, but locally successful components may disagree on shared state. We model this failure with a finite \emph{capability sheaf}: stalks encode typed behavior signatures, restriction maps retain shared fields, and accepted runs are useful global sections. An exact finite constraint-satisfaction problem (CSP) defines acceptance, while a linearized relative cohomology class provides a diagnostic and search feature. A controlled experiment over 20 task clusters introduces hidden interior mediators whose raw states are nuisance variables. Quotienting their coboundaries reduces the candidate budget from 2,000 to 1,000 per cluster; aligning the hidden state removes the gap. Exact CSP matches the quotient, so the result demonstrates invariance to stale representatives, not superiority over exact reasoning. We then test the method on a discovery split from the SWE-bench Multilingual pool of PatchFuseBench: 160 issues from 20 repositories, 875 real candidate patches, 2,579 source-aware edit atoms, and 153 newly executed patches. A first pool-level construction is constant because $[b-Dx]=[b]$ in $\operatorname{coker}D$ and therefore cannot rank configurations. A candidate-indexed repair is nontrivial on 848/875 candidates and varies within 120/160 issues. It resolves 118 issues versus 116 for a matched noncohomological selector, but the difference is not supported across repositories (exact sign-flip $p=0.75$). A leave-one-repository-out abstention gate reaches 127/160, tying the strong anchor and exceeding its matched gate by one issue ($p=1.0$). The discovery gate therefore fails and the confirmatory split remains sealed. The study supports the controlled invariance mechanism and an identifiability correction, but not a real-world cohomological advantage.

Capability Sheaves for Compositional Agent-Harness Repair: Controlled Quotients and a Real-Repository Stress Test introduces a mathematical framework using sheaf theory to diagnose and repair failures in AI agent harnesses. The research addresses the common issue where individual components of an agent—such as retrieval, routing, and verification—function correctly in isolation but fail to produce a coherent, executable result when combined.

Modeling Agent Failures as Sheaves

The paper models an agent harness as a "capability sheaf," where different requirements (localization, contract, ordering, preservation, and verification) are assigned to vertices in a graph. Each vertex contains a "stalk" of typed behavior signatures, and restriction maps define how these components share information.
A candidate harness is considered successful only if it satisfies a global section—a set of local behaviors that agree on all shared fields. The author uses an exact constraint-satisfaction problem (CSP) to define this feasibility and employs linearized relative cohomology as a diagnostic tool to identify where components fail to "glue" together.

Controlled Experiments and Quotienting

To test the method, the author conducted a controlled experiment involving 20 task clusters. The study introduced "hidden interior mediators"—nuisance variables that complicate the state of the system. By applying a quotient to these mediators, the researcher was able to remove the influence of these variables, reducing the candidate search budget from 2,000 to 1,000 per cluster.
The results showed that the quotienting method successfully aligned with the exact CSP, confirming that the approach provides invariance to stale representatives. However, the author notes that this does not prove the method is superior to exact reasoning; rather, it demonstrates that the cohomological approach can effectively handle hidden state complexity.

Real-Repository Stress Test

The method was further evaluated on a discovery split from the SWE-bench Multilingual pool of PatchFuseBench, covering 160 issues across 20 repositories. The study tested 875 candidate patches and 2,579 edit atoms.
The findings indicate that while the cohomological approach was nontrivial on 848 of the 875 candidates, it did not provide a statistically significant advantage over noncohomological selectors. Specifically, the repair method resolved 118 issues compared to 116 for the baseline, a difference that was not supported across repositories (p=0.75). A "leave-one-repository-out" test resulted in the method tying with the baseline anchor.

Limitations and Conclusions

The author concludes that while the study supports the proposed controlled invariance mechanism and an identifiability correction, it does not demonstrate a real-world cohomological advantage for patch repair. The paper explicitly states that the discovery gate failed and the confirmatory split remains sealed. The research serves as a boundary marker for the method, showing that while the mathematical framework is sound for diagnosing local-to-global failures, it does not currently outperform standard exact search methods in real-world repository repair tasks.

Comments (0)

No comments yet

Be the first to share your thoughts!