Abstract:
To achieve carbon neutrality in edge intelligent inference, we investigate the problem of online AI model selection and deployment under a carbon allowance trading mechanism, formulate it as an online stochastic optimization problem with long-term constraints, and systematically conduct algorithm design. The problem presents three 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; achieving long-term carbon neutrality under continuously fluctuating allowance prices and unpredictable future emissions is inherently difficult, and must be accomplished while simultaneously ensuring trustworthy data sharing among decentralized nodes and effectively controlling 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 algorithms 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.