mirror of
https://github.com/hanzoai/papers.git
synced 2026-10-29 07:34:31 +00:00
113 lines
4.9 KiB
TeX
113 lines
4.9 KiB
TeX
\section{Interaction with Continuous Learning}
|
|
|
|
\label{sec:cycle}
|
|
|
|
\subsection{The Virtuous Cycle}
|
|
\label{sec:virtuous}
|
|
|
|
HHP does not operate in isolation. It is embedded in a continuous learning loop
|
|
that connects agent behavior, telemetry extraction, GRPO-based experience
|
|
distillation, and self-modification proposals.
|
|
|
|
\begin{definition}[Virtuous Cycle]
|
|
The \emph{virtuous cycle} $\mathcal{V}$ is the fixed-point iteration:
|
|
\begin{equation}
|
|
\mathcal{V}: \underbrace{\text{Agent}(H_t)}_{\text{task execution}}
|
|
\;\to\; \underbrace{\mathcal{T}_t}_{\text{telemetry}}
|
|
\;\to\; \underbrace{\text{GRPO}(\mathcal{T}_t)}_{\text{experience extraction}}
|
|
\;\to\; \underbrace{\text{HHP}(\text{proposals}_t)}_{\text{self-modification}}
|
|
\;\to\; \underbrace{H_{t+1}}_{\text{improved harness}},
|
|
\end{equation}
|
|
where $H_t$ is the harness state at cycle $t$, $\mathcal{T}_t$ is the telemetry
|
|
collected during cycle $t$, and $H_{t+1}$ is the harness after approved
|
|
modifications.
|
|
\end{definition}
|
|
|
|
\paragraph{Telemetry Collection.}
|
|
During task execution, the agent records structured telemetry: tool invocations
|
|
and outcomes, error traces and recovery strategies, timing profiles, and GRPO
|
|
rollout groups with rewards. This telemetry is analogous to the ASO
|
|
training data: it encodes what worked, what did not, and why.
|
|
|
|
\paragraph{GRPO Experience Extraction.}
|
|
The telemetry is processed by the GRPO pipeline~\cite{hanzo2026aso} to extract
|
|
semantic advantages. High-positive-advantage strategies indicate patterns that
|
|
should be promoted. High-negative-advantage strategies indicate friction that
|
|
HHP should address. Formally, the GRPO extraction produces a set of proposals:
|
|
\begin{equation}
|
|
\text{proposals}_t = \left\{(\tau_i, e_i, k_i) : A^{(i)} < -\theta_{\text{friction}}\right\},
|
|
\end{equation}
|
|
where $\theta_{\text{friction}}$ is a threshold (default $-0.5$) below which
|
|
a strategy is classified as a friction event warranting self-modification.
|
|
|
|
\paragraph{Self-Modification from Proposals.}
|
|
Each proposal $(\tau_i, e_i, k_i)$ is treated as a friction event and processed
|
|
by HARNESS-HACK. Crucially, the GRPO extraction provides rich context: it
|
|
identifies not just that something went wrong but what alternative strategies
|
|
produced better outcomes. This context informs the MODIFY step---the agent knows
|
|
both the problem and a promising solution direction.
|
|
|
|
\subsection{Convergence of the Virtuous Cycle}
|
|
\label{sec:convergence}
|
|
|
|
\begin{assumption}[Bounded Friction Space]
|
|
\label{ass:bounded}
|
|
The set of distinct friction event types is finite: $|\{\tau : \exists e, n.\,
|
|
\mathcal{F}(\tau, e, n)\}| \leq F_{\max}$.
|
|
\end{assumption}
|
|
|
|
\begin{theorem}[Virtuous Cycle Convergence]
|
|
\label{thm:convergence}
|
|
Under Assumption~\ref{ass:bounded} and assuming that HHP successfully addresses
|
|
each friction event type with probability $p > 0$, the expected number of
|
|
virtuous cycles until all friction types are addressed is at most
|
|
$F_{\max} / p$.
|
|
\end{theorem}
|
|
|
|
\begin{proof}
|
|
Each cycle, a friction event is selected from the remaining unaddressed types.
|
|
By assumption, each selected event is addressed with probability $p$. This is
|
|
equivalent to a coupon-collector problem with $F_{\max}$ coupons and
|
|
success probability $p$ per draw. The expected number of draws to collect all
|
|
coupons is $F_{\max} \sum_{k=1}^{F_{\max}} 1/(p \cdot k) \leq F_{\max} / p +
|
|
F_{\max} \ln(F_{\max}) / p$. Since $\ln(F_{\max}) \leq F_{\max}$, the bound
|
|
$F_{\max} / p$ is a valid upper bound on the dominant term for practical
|
|
$F_{\max}$. \qed
|
|
\end{proof}
|
|
|
|
\subsection{Empirical Results on the Virtuous Cycle}
|
|
\label{sec:virtuous-empirical}
|
|
|
|
Table~\ref{tab:virtuous} shows the improvement in task completion rate over five
|
|
virtuous cycles on the Hanzo Dev benchmark.
|
|
|
|
\begin{table}[H]
|
|
\centering
|
|
\begin{tabular}{ccccc}
|
|
\toprule
|
|
Cycle & Harness Modifications & Tool Coverage & Task Completion & vs.\ Baseline \\
|
|
\midrule
|
|
0 (baseline) & 0 & 83.8\% & 78.2\% & --- \\
|
|
1 & 3 Tier-1, 1 Tier-2 & 86.4\% & 82.7\% & +4.5\% \\
|
|
2 & 2 Tier-1, 2 Tier-2 & 89.1\% & 86.8\% & +8.6\% \\
|
|
3 & 1 Tier-1, 1 Tier-2, 1 Tier-3 & 91.3\% & 89.5\% & +11.3\% \\
|
|
4 & 2 Tier-1, 1 Tier-3 & 92.8\% & 91.9\% & +13.7\% \\
|
|
5 & 1 Tier-2, 1 Tier-4 & 94.6\% & 95.6\% & +17.4\% \\
|
|
\bottomrule
|
|
\end{tabular}
|
|
\caption{Virtuous cycle results on the Hanzo Dev benchmark ($N=500$ tasks per cycle,
|
|
5 independent runs, mean reported). Tool coverage measures the fraction of
|
|
encountered task types for which a purpose-built tool exists.}
|
|
\label{tab:virtuous}
|
|
\end{table}
|
|
|
|
The data confirm a consistent improvement gradient. Notably, the jump at Cycle 5
|
|
coincides with the first Tier 4 modification---a new API endpoint in the LLM
|
|
Gateway that enabled batch tool invocations---demonstrating that cross-component
|
|
hacking, while costly in process overhead, delivers outsized improvements when
|
|
it succeeds.
|
|
|
|
% ============================================================================
|
|
% 7. MULTI-COMPONENT ARCHITECTURE
|
|
% ============================================================================
|