This paper proposes a digital twin (DT)-assisted approach for adaptive device-edge collaboration on deep neural network (DNN) inference in AIoT. The goal is to optimize the tradeoff among inference accuracy, delay, and energy consumption by dynamically deciding whether and when to stop local inference at a device and upload intermediate results to an edge server. The approach constructs two DTs: one to evaluate all potential offloading decisions for each DNN task, providing augmented training data for a machine learning-assisted decision-making algorithm, and another to estimate the inference status at the device, reducing signaling overhead. The DTs also help derive necessary conditions for optimal offloading decisions, reducing the decision space. Simulation results show that the DT-assisted approach outperforms conventional methods in balancing the tradeoff among inference accuracy, delay, and energy consumption. The approach is evaluated in a system model where a full-size DNN is deployed at an edge server for high-accuracy inference and a shallow DNN is deployed at an AIoT device for low-latency inference. The system model includes task generation, computing, and queuing models, as well as task utility definitions. The DT-assisted approach involves four steps: task information gathering, learning-assisted offloading decision-making, signaling of task offloading, and training of the learning-assisted offloading algorithm. The approach is supported by DTs that emulate on-device inference and computing workload evolution, enabling adaptive decision-making. The paper also presents a learning-assisted algorithm for offloading decision-making, which uses a neural network (ContValueNet) to approximate continuation values and make optimal offloading decisions. The algorithm is trained using DT-assisted data augmentation and reference continuation value construction. The approach is shown to reduce signaling overhead and complexity while maintaining high performance in terms of inference accuracy, delay, and energy consumption.This paper proposes a digital twin (DT)-assisted approach for adaptive device-edge collaboration on deep neural network (DNN) inference in AIoT. The goal is to optimize the tradeoff among inference accuracy, delay, and energy consumption by dynamically deciding whether and when to stop local inference at a device and upload intermediate results to an edge server. The approach constructs two DTs: one to evaluate all potential offloading decisions for each DNN task, providing augmented training data for a machine learning-assisted decision-making algorithm, and another to estimate the inference status at the device, reducing signaling overhead. The DTs also help derive necessary conditions for optimal offloading decisions, reducing the decision space. Simulation results show that the DT-assisted approach outperforms conventional methods in balancing the tradeoff among inference accuracy, delay, and energy consumption. The approach is evaluated in a system model where a full-size DNN is deployed at an edge server for high-accuracy inference and a shallow DNN is deployed at an AIoT device for low-latency inference. The system model includes task generation, computing, and queuing models, as well as task utility definitions. The DT-assisted approach involves four steps: task information gathering, learning-assisted offloading decision-making, signaling of task offloading, and training of the learning-assisted offloading algorithm. The approach is supported by DTs that emulate on-device inference and computing workload evolution, enabling adaptive decision-making. The paper also presents a learning-assisted algorithm for offloading decision-making, which uses a neural network (ContValueNet) to approximate continuation values and make optimal offloading decisions. The algorithm is trained using DT-assisted data augmentation and reference continuation value construction. The approach is shown to reduce signaling overhead and complexity while maintaining high performance in terms of inference accuracy, delay, and energy consumption.