AI-augmented computing delegates natural language queries, code generation requests, and other open-ended tasks to a cluster of AI models that processes queries and generates responses. This paradigm introduces a resource dimension that neither classical time nor space complexity captures: the cost of sending queries to and receiving responses from such a cluster. We introduce token complexity, a formal resource measure defined as the minimum expected token cost to achieve a specified level of output quality on a task, and develop a taxonomy classifying AI systems by the strength of their probabilistic properties. We develop token complexity within the framework of AI-Oracle Turing machines, in which a probabilistic Turing machine interacts with a stochastic oracle via dedicated query and response tapes. We prove basic theorems establishing that token complexity behaves as expected: monotonicity (higher quality costs more tokens), convexity (quality improvements become progressively more expensive), price sensitivity (small price changes produce bounded cost changes), and price-relativity of task ordering (the token complexity ordering of tasks can reverse depending on the query-to-response cost ratio). We prove that the complexity frontier, defined as the set of all feasible resource bounds in tokens, time, and space, is non-empty, upward-closed, and convex.
翻译:AI增强计算将自然语言查询、代码生成请求及其他开放式任务委托给一个AI模型集群,该集群负责处理查询并生成响应。这一范式引入了一种经典时间与空间复杂性均未捕捉的资源维度:向该集群发送查询及接收响应的成本。我们引入令牌复杂性——一种形式化资源度量,定义为在任务中达到指定输出质量级别所需的最小期望令牌成本,并依据概率性质的强弱建立了AI系统的分类体系。我们基于AI-神谕图灵机框架构建了令牌复杂性理论,该框架中概率型图灵机通过专用查询与响应磁带与随机神谕交互。我们证明了一系列基本定理,证实令牌复杂性具有预期特性:单调性(更高质量需更多令牌)、凸性(质量改进成本递增)、价格敏感性(微小价格变化引起成本有界变化)以及任务排序的价格相关性(任务令牌复杂性排序可能随查询与响应成本比的变化而反转)。我们进一步证明,复杂性前沿——定义为令牌、时间与空间所有可行资源约束的集合——具有非空性、向上封闭性与凸性。