In recent years, the rapid development of artificial intelligence has greatly promoted the application of Machine Learning as a Service (MLaaS). Users can upload their requirements through front-end applications, and the server provides model inference services after receiving the user input. However, MLaaS may lead to serious privacy breaches. Large language model services are typical representatives of MLaaS, and the Transformer is a typical structure in large language models. Therefore, this paper proposes a privacy-protected Transformer inference scheme based on the CKKS fully homomorphic encryption scheme to optimize computational and communication efficiency. Firstly, this paper implements efficient matrix multiplication based on ring multiplication and optimizes the matrix partition parameters to adapt to different types (including ciphertext-plaintext and ciphertext-ciphertext) and different matrix dimensions. Secondly, this paper optimizes and designs secure Softmax, LayerNorm, and Gelu protocols based on parameter fuzzing and collaborative computing to perform efficient, secure atomic computations over ciphertexts. Finally, experiments on text classification were conducted on the IMDB and AGNEWS datasets. The results show that, under our experimental settings (including an AMD Ryzen 7 5700G CPU with 32 GB RAM and 8-thread parallel computing using the Lattigo library), the scheme proposed in this paper completes the inference process within 3 s, with communication costs below 1 GB, and the computing accuracy is comparable to that of plaintext computing.
- Article type
- Year
Open Access
Article
Issue
Open Access
Article
Issue
In rapid urban development, outdoor parking lots have become essential components of urban transportation systems. However, the increasing number of parking lots is accompanied by a rising risk of vehicle fires, posing a serious challenge to public safety. As a result, there is a critical need for fire warning systems tailored to outdoor parking lots. Traditional smoke detection methods, however, struggle with the complex outdoor environment, where smoke characteristics often blend into the background, resulting in low detection efficiency and accuracy. To address these issues, this paper introduces a novel model named Dynamic Contextual Transformer YOLO (DCT-YOLO), an advanced smoke detection method specifically designed for outdoor parking lots. We introduce an innovative Dynamic Channel-Spatial Attention (DCSA) mechanism to improve the model’s focus on smoke features, thus improving detection accuracy. Additionally, we incorporate Contextual Transformer Networks (CoTNet) to better adapt to the irregularity of smoke patterns, further enhancing the accuracy of smoke region detection in complex environments. Moreover, we developed a new dataset that includes a wide range of smoke and fire scenarios, improving the model’s generalization capability. All baseline models were trained and evaluated on the same dataset to ensure a fair and consistent comparison. The experimental results on this dataset demonstrate that the proposed algorithm yields a mAP@0.5 of 85.1% and a mAP@0.5:0.95 of 55.7%, representing improvements of 15.0% and 14.9%, respectively, over the baseline model. These results highlight the effectiveness of the proposed method in accurately detecting smoke in challenging outdoor environments.
With the widespread use of machine learning (ML) technology, the operational efficiency and responsiveness of power grids have been significantly enhanced, allowing smart grids to achieve high levels of automation and intelligence. However, tree ensemble models commonly used in smart grids are vulnerable to adversarial attacks, making it urgent to enhance their robustness. To address this, we propose a robustness enhancement method that incorporates physical constraints into the node-splitting decisions of tree ensembles. Our algorithm improves robustness by developing a dataset of adversarial examples that comply with physical laws, ensuring training data accurately reflects possible attack scenarios while adhering to physical rules. In our experiments, the proposed method increased robustness against adversarial attacks by 100% when applied to real grid data under physical constraints. These results highlight the advantages of our method in maintaining efficient and secure operation of smart grids under adversarial conditions.
京公网安备11010802044758号