Abstract:
To achieve carbon neutrality in edge intelligent inference, this paper investigates the problem of online AI model selection and deployment under a carbon allowance trading mechanism, and systematically conducts mathematical modeling and algorithm design. The problem presents four core challenges: continuously arriving inference data follows an unknown distribution, and the system can only observe instantaneous losses based on discrete samples, making it difficult to directly optimize the global expected objective; the existence of model switching costs renders the exploration-exploitation tradeoff in model selection more complex; the continuously time-varying carbon allowance prices and system environment introduce deep uncertainty; and the lack of trust among nodes in a decentralized edge environment makes it difficult to simultaneously ensure trustworthy inference loss recording, automated carbon trading execution, and effective control of on-chain interaction overhead. However, existing studies have not yet jointly addressed the above challenges. To this end, we first formulate a long-term stochastic cost minimization model to characterize the aforementioned complex properties. Building on this foundation, we propose a blockchain-assisted online solution framework, which leverages a decoupling mechanism to decompose the original problem into two interdependent subproblems solved collaboratively. The first subproblem employs a block-based sampling strategy under model switching constraints to dynamically balance exploration and exploitation, minimizing the expected inference loss. Meanwhile, a lightweight on-chain recording mechanism is designed to upload inference losses from each edge node to the blockchain while strictly constraining blockchain interaction costs, thereby enabling multi-party verifiable performance sharing. The second subproblem derives real-time, cost-efficient carbon allowance trading strategies to achieve long-term carbon neutrality, requiring no prior knowledge of carbon prices or system carbon emissions, with the entire trading process executed automatically via smart contracts in a decentralized manner to ensure transparency and immutability. Theoretically, we prove that both the regret and fit of the proposed algorithm grow sublinearly over time. Experimentally, evaluations based on real-world workloads and carbon market data demonstrate that the proposed scheme achieves significant performance advantages over existing state-of-the-art techniques.