Files
papers/hanzo-aso/sections/07-cost-analysis.tex

75 lines
2.7 KiB
TeX

\section{Cost Analysis}
\label{sec:cost}
\subsection{ASO Adaptation Cost}
The total cost of ASO adaptation for a new domain consists of:
\begin{table}[h]
\centering
\begin{tabular}{lrr}
\toprule
Component & API Calls & Cost (USD) \\
\midrule
TF-GRPO rollouts ($G=4$, $K=3$ iterations) & 12 & \$8.40 \\
Semantic advantage extraction & 3 & \$2.10 \\
Prior distillation \& validation & 6 & \$4.20 \\
Test execution (local compute) & -- & \$1.50 \\
Storage (1-bit priors, IPFS) & -- & \$0.10 \\
\midrule
\textbf{Total ASO adaptation} & \textbf{21} & \textbf{\$16.30} \\
\bottomrule
\end{tabular}
\caption{Cost breakdown for ASO adaptation to a new domain (typical 500-issue
benchmark). API costs assume Claude 3.5 Sonnet at \$0.003/1K input,
\$0.015/1K output tokens.}
\label{tab:aso-cost}
\end{table}
With overhead for retries and edge cases, the total cost is approximately
\textbf{\$18} per domain adaptation.
\subsection{Comparison with Alternatives}
\begin{table}[H]
\centering
\begin{tabular}{lccccc}
\toprule
Method & Cost & GPU Hours & Time & Risk & Reusable \\
\midrule
Full fine-tuning & \$50K--100K+ & 500--2000 & 1--4 weeks & High & No \\
RLHF & \$30K--80K & 200--1000 & 1--3 weeks & High & No \\
LoRA/QLoRA & \$10K--30K & 50--200 & 2--7 days & Medium & Partial \\
Prompt engineering & \$0--50 & 0 & Hours & Low & Yes \\
RAG & \$100--500 & 0 & Hours--days & Low & Yes \\
\textbf{ASO} & \textbf{\$18} & \textbf{0} & \textbf{2--4 hours} & \textbf{Low} & \textbf{Yes} \\
\bottomrule
\end{tabular}
\caption{Comparison of adaptation methods. Cost includes compute, API calls,
and human supervision. ``Risk'' refers to catastrophic forgetting or model
degradation. ``Reusable'' indicates whether adaptation transfers across tasks.}
\label{tab:cost-comparison}
\end{table}
\subsection{Cost-Performance Frontier}
ASO occupies a unique position on the cost-performance frontier: it achieves
performance within 5--8\% of fine-tuning at 0.02\% of the cost. The key insight
is that for many practical applications, the last few percentage points of
performance are not worth three orders of magnitude more in cost.
\begin{proposition}[Cost-Adjusted Advantage]
Define the cost-adjusted performance metric $\text{CAP} = \text{Performance} / \log(1 + \text{Cost})$. Then:
\begin{equation}
\text{CAP}_{\text{ASO}} = \frac{18.2\%}{\log(1 + 18)} \approx 6.1,
\quad
\text{CAP}_{\text{LoRA}} = \frac{22.1\%}{\log(1 + 15000)} \approx 2.3.
\end{equation}
ASO achieves $2.65\times$ better cost-adjusted performance than LoRA fine-tuning.
\end{proposition}
% ============================================================================
% 8. HANZO DEV AGENT
% ============================================================================