PaperSpread Research Publishing
Smart Networks and Secure Communications

Energy-Aware Agent Optimization for Edge Program Generation

Read & download PDF
Abstract

Edge computing applications require generated code to satisfy not only functional requirements but also latency, memory, and energy constraints. Current code generation models often produce correct programs that are too slow or resource-intensive for embedded devices, mobile processors, and low-power edge platforms. This study investigates energy-aware program generation through collaborative agent optimization. We propose EdgeOpt-Agent, a four-agent model composed of an algorithm design agent, a hardware profiling agent, a code generation agent, and a resource optimization agent. The algorithm design agent selects candidate computational strategies according to task complexity. The hardware profiling agent estimates device-specific constraints, including CPU frequency, memory bandwidth, cache behavior, and battery consumption. The code generation agent produces executable implementations in C++, Python, and Rust. The resource optimization agent rewrites inefficient loops, removes redundant memory copies, adjusts data structures, and selects approximate computation when accuracy tolerance is allowed. The model was evaluated on 1,320 edge programming tasks covering sensor-stream filtering, image preprocessing, object-count estimation, anomaly detection, route calculation, and real-time signal analysis. Experiments used Raspberry Pi 5, NVIDIA Jetson Orin Nano, Android ARM devices, and x86 edge gateways. A total of 15,840 generated programs were tested under 72,600 runtime profiles. Compared with a standard LLM code generator, EdgeOpt-Agent improved task pass rate from 68.5% to 81.2%. Average execution latency decreased by 28.7%, peak memory usage decreased by 19.4%, and energy consumption per task decreased by 22.8%. On real-time image preprocessing tasks, the model increased frame throughput from 21.6 FPS to 30.8 FPS while keeping output accuracy loss below 1.5%. These findings indicate that agent-level profiling and resource-aware repair can make generated programs more suitable for edge deployment.

Keywords
Code generationedge computingenergy-aware optimizationprogram profilingembedded systemsruntime performancemulti-agent optimization
References
  1. Xu, D., Gui, H., & Chen, H. (2026, March). Research on Layered Control and Fault Recovery Mechanisms for Fast Charging Safety Diagnosis of High-Voltage Battery Systems Under Charging Network Interoperability Conditions. In 2026 3rd International Conference on Electrical Technology and Automation Engineering (ETAE) (pp. 669-672). IEEE.
  2. Semerikov, S. O., Vakaliuk, T. A., Kanevska, O. B., Ostroushko, O. A., & Kolhatin, A. O. (2025). Edge intelligence unleashed: a survey on deploying large language models in resource-constrained environments.
  3. Zhang, Z. (2026). A Study on the Impact of Cost Presentation on Decision-making Bias and Cancellation Behavior in Online Subscriptions. Available at SSRN 7349839.
  4. Qi, C., & Qiao, X. (2026). Building and Operating a Large Scale Multi-Agent System: A Case Study from Industry. Available at SSRN 6795198.
  5. Zhang, Z., Wang, J., Li, Z., Wang, Y., & Zheng, J. (2025). Anncoder: A mti-agent-based code generation and optimization model. Symmetry, 17(7), 1087.
  6. Siddiqui, M. Z., & Khan, K. (2025, October). A Comparative Evaluation of Large Language Models for Automated Code Generation and Debugging. In International Journal of Multidisciplinary Conference Proceedings (IJMCP) (Vol. 2, No. 2, pp. 32-32).
  7. Gu, X. (2026). Identifying Causal Effects and Analyzing Heterogeneity of User Growth Interventions on Digital Platforms: Evidence from Large-Scale Behavioral Data. Available at SSRN 6809181.
  8. Zhao, J., Fan, J., & Li, L. (2026). A Study on an Explainable Causal-Enhanced LLM Agent for Predicting the Forming Quality of Automotive Component Materials.
  9. Koohestani, R., de Bekker, P., Koç, B., & Izadi, M. (2025). Benchmarking AI models in software engineering: A review, search tool, and unified approach for elevating benchmark quality. IEEE Transactions on Software Engineering.
  10. You, S. (2026). Verifiable Audit Mechanisms in AI Compliance Automation: Scalability. Available at SSRN 6547458.
  11. Du, Y., Liu, Q., Dong, Y., & Chen, Z. (2026). Cross-Domain Transfer and Few-Shot Recognition of Defect Images in Complex Industrial Settings.
  12. Hong, Z., Liang, S., Xu, T., & Chen, H. (2026). A Study on Failover Verification and Recovery Objective Prediction for Cross-Region Cloud Services.
  13. Sivapiran, S., & Uddin, G. (2026). Reward-Free Code Alignment from Pretrained or Fine-Tuned LLM: Unpacking the Trade-offs for Code Generation. Proceedings of the ACM on Software Engineering, 3(FSE), 2606-2629.
  14. Huang, J., Xu, T., Yin, J., & Yang, J. (2026). Data Quality Monitoring and Intelligent Scheduling Optimization in Financial Data Workflow Automation. Available at SSRN 7179338.
  15. Bao, Y., Qiu, Y., & Wang, H. (2026). FLARE: A Real-Time Framework for Detecting Malicious Account Activities at Internet Scale. Available at SSRN 7185659.
  16. Wang, S., Feng, Y., & Fang, X. (2026, May). A Large Language Model-Enabled Multi-Agent Collaboration Method for Complex Task Solving. In 2026 6th International Symposium on Computer Technology and Information Science (ISCTIS) (pp. 253-256). IEEE.
  17. Tunzina, T., Mashira, M., & Islam, M. M. (2026). Greenai: A comparative analysis of environmental efficiency in llm-generated code. IEEE Access.
  18. Yang, Q., & Du, Y. (2026). Predicting Rollback Risks and Controlling Gradual Rollout Traffic for Online Ranking Feature Deployments.
  19. Liang, S., Hsu, K. H., & Liu, Z. (2026). Rolling Scheduling and Capacity Balancing for Server Assembly Under Engineering Change Disturbances.
  20. Bao, Y., & Wang, H. (2026). Large-scale Metrics Migration: A Systematic Approach to Rebuilding Production Measurement Infrastructure. Available at SSRN 7185660.
  21. Ashraf, H., Danish, S. M., Leivadeas, A., Otoum, Y., & Sattar, Z. (2025, November). Energy-aware code generation with llms: Benchmarking small vs. large language models for sustainable ai programming. In 2025 3rd International Conference on Foundation and Large Language Models (FLLM) (pp. 814-821). IEEE.
  22. Yuan, Y., Xu, T., Yin, J., & Huang, J. (2026). Modeling Loading Anomalies and Identifying Root Causes in Media Consumption Workflows on Large Social Media Platforms. Available at SSRN 7393318.
  23. Zhao, Z., & Welsch, R. E. (2026). Point-in-Time Financial RAG with Frozen LLMs and Market-Feedback Adaptive Retrieval. arXiv preprint arXiv:2605.31201.
  24. Menon, H., Jekel, C. F., Korner, K., Gunnarson, B., Brown, N. K., Stees, M., ... & Belof, J. L. (2026). Multi-Agent Collaboration for Automated Design Exploration on High Performance Computing Systems. arXiv preprint arXiv:2603.11515.
  25. Yuan, Y., Huang, J., Yin, J., & Xu, T. (2026). Confidence Calibration and Semantic Error Analysis for Ambiguous Coreference Resolution in User-generated Social Media Text. Available at SSRN 7393238.
  26. Jain, N., Gu, A., Li, W. D., Yan, F., Zhang, T., Wang, S., ... & Stoica, I. (2025, May). Livecodebench: Holistic and contamination free evaluation of large language models for code. In International Conference on Learning Representations (Vol. 2025, pp. 58791-58831).
  27. Zheng, J., & Makar, M. (2022). Causally motivated multi-shortcut identification and removal. Advances in Neural Information Processing Systems, 35, 12800-12812.
  28. Jiao, Y., Shi, T., Zhao, B., & Wang, A. (2026). Retrieval-Guided Structured Reasoning and Interpretable Representation Learning for Large-Scale Video–Language Models.
  29. El Makroum, R., Zwickl-Bernhard, S., & Kranzl, L. (2026). Agentic AI home energy management system: A large language model framework for residential load scheduling. Results in Engineering, 109857.
  30. Liang, S., Du, Y., Chen, W., & Liu, Z. (2026). Order Allocation and Emergency Transportation Decisions Amid Multi-Source Procurement Disruptions.
Publication details
Journal
Smart Networks and Secure Communications
Volume
1 (2026)
Issue
1 · Forthcoming issue
Article number
snsc20260005
License
CC BY 4.0