The emergence of deepfake technology has spurred the need for robust and adaptive methods to detect manipulated media content. This study explores the integration of the Integrate-backward-integrate (IbI) Logic Optimization Algorithm with Convolutional Neural Networks (CNNs) for enhanced deepfake detection. The proposed approach involves a multi-phase iterative process: the CNN initially trained on a diverse dataset encompassing both real and deepfake images. The CNN serves as the foundation for the IbI-driven optimization. The integration phase employs the trained CNN to forward-integrate images, classifying them as real or deepfake. Subsequently, the IbI Logic Optimization Algorithm engages in the backward phase, utilizing feedback from the CNN's performance to iteratively refine the network's parameters, architecture, and feature extraction capabilities. This iterative optimization process aims to adaptively enhance the CNN's ability to discern subtle nuances between authentic and manipulated visuals. The re-integration phase evaluates the refined CNN's performance through multiple iterations, seeking to iteratively improve deepfake detection accuracy. Validation occurs using separate datasets to prevent overfitting and ensure the model's generalizability. The proposed method aims to enhance the CNN's adaptability to evolving deepfake techniques, addressing the dynamic nature of manipulative media creation. This fusion of IbI Logic Optimization with CNNs presents a promising avenue for bolstering deepfake detection capabilities. However, the effectiveness of this approach relies on dataset quality, network architecture, and the dynamic nature of deepfake generation techniques. Continuous refinement and validation are essential to adapt the model to new challenges posed by advancing deepfake technologies.