Cognitive Radio Networks (CRN) are the possible and ideal solution for meeting the spectrum needs of next-generation communication systems. CRN is a promising alternative approach that allows spectrum sharing in many applications. The licensed users considered Primary Users (PU) and unlicensed users as Secondary Users (SU). Time and power consumption on security issues are considered degrading factors in performance for improving the Quality of Service (QoS). Irrespective of using different optimization techniques, the same methodology is to be updated for the task. So that, learning and optimization go hand in hand. It ensures the security in CRN, risk factors in spectrum sharing to SU for secure communication. The objective of the proposed work is to preserve the location of the SU from attackers and attain the clustering of SU to utilize the resource. Ant Colony Optimization (ACO) is implemented to increase the overall efficiency and utilization of the CRN. ACO is used to form clusters of SUs in the co-operative spectrum sensing technique. This paper deals with threat detection and classifying threats using parameters such as unlikability, context privacy, anonymity, conditional traceability, and trade-off. In this privacy-preserving model, overall accuracy is 97.4%, and it is 9% higher than the conventional models without Privacy-Preserving Architecture (PPA).