Table of Contents
Fetching ...

AgenticPruner: MAC-Constrained Neural Network Compression via LLM-Driven Strategy Search

Shahrzad Esmat, Mahdi Banisharif, Ali Jannesari

TL;DR

AgenticPruner directly optimizes neural network pruning for target MAC budgets rather than solely reducing parameters. It employs a three-agent framework (Profiling, Master, Analysis) with an LLM-driven strategy learner to iteratively converge to MAC targets within user-defined tolerance bands, typically in 3–5 revisions. Built on isomorphic pruning principles, it demonstrates MAC-budget compliance and competitive accuracy on ImageNet-1K across ResNet, ConvNeXt, and DeiT architectures, achieving practical speedups and predictable deployment costs. The approach highlights the value of architecture-aware, history-informed pruning guided by LLM reasoning for reliable hardware-constrained model compression.

Abstract

Neural network pruning remains essential for deploying deep learning models on resource-constrained devices, yet existing approaches primarily target parameter reduction without directly controlling computational cost. This yields unpredictable inference latency in deployment scenarios where strict Multiply-Accumulate (MAC) operation budgets must be met. We propose AgenticPruner, a framework utilizing large language models to achieve MAC-constrained optimization through iterative strategy learning. Our approach coordinates three specialized agents: a Profiling Agent that analyzes model architecture and MAC distributions, a Master Agent that orchestrates the workflow with divergence monitoring, and an Analysis Agent powered by Claude 3.5 Sonnet that learns optimal strategies from historical attempts. Through in-context learning, the Analysis Agent improves convergence success rate from 48% to 71% compared to grid search. Building upon isomorphic pruning's graph-based structural grouping, our method adds context-aware adaptation by analyzing patterns across pruning iterations, enabling automatic convergence to target MAC budgets within user-defined tolerance bands. We validate our framework on ImageNet-1K across ResNet, ConvNeXt, and DeiT architectures. On CNNs, our approach achieves MAC targeting while maintaining or improving accuracy: ResNet-50 reaches 1.77G MACs with 77.04% accuracy (+0.91% vs baseline); ResNet-101 achieves 4.22G MACs with 78.94% accuracy (+1.56% vs baseline). For ConvNeXt-Small, pruning to 8.17G MACs yields 1.41x GPU and 1.07x CPU speedup with 45% parameter reduction. On Vision Transformers, we demonstrate MAC-budget compliance within user-defined tolerance bands (typically +1% to +5% overshoot, -5% to -15% undershoot), establishing feasibility for deployment scenarios requiring strict computational guarantees.

AgenticPruner: MAC-Constrained Neural Network Compression via LLM-Driven Strategy Search

TL;DR

AgenticPruner directly optimizes neural network pruning for target MAC budgets rather than solely reducing parameters. It employs a three-agent framework (Profiling, Master, Analysis) with an LLM-driven strategy learner to iteratively converge to MAC targets within user-defined tolerance bands, typically in 3–5 revisions. Built on isomorphic pruning principles, it demonstrates MAC-budget compliance and competitive accuracy on ImageNet-1K across ResNet, ConvNeXt, and DeiT architectures, achieving practical speedups and predictable deployment costs. The approach highlights the value of architecture-aware, history-informed pruning guided by LLM reasoning for reliable hardware-constrained model compression.

Abstract

Neural network pruning remains essential for deploying deep learning models on resource-constrained devices, yet existing approaches primarily target parameter reduction without directly controlling computational cost. This yields unpredictable inference latency in deployment scenarios where strict Multiply-Accumulate (MAC) operation budgets must be met. We propose AgenticPruner, a framework utilizing large language models to achieve MAC-constrained optimization through iterative strategy learning. Our approach coordinates three specialized agents: a Profiling Agent that analyzes model architecture and MAC distributions, a Master Agent that orchestrates the workflow with divergence monitoring, and an Analysis Agent powered by Claude 3.5 Sonnet that learns optimal strategies from historical attempts. Through in-context learning, the Analysis Agent improves convergence success rate from 48% to 71% compared to grid search. Building upon isomorphic pruning's graph-based structural grouping, our method adds context-aware adaptation by analyzing patterns across pruning iterations, enabling automatic convergence to target MAC budgets within user-defined tolerance bands. We validate our framework on ImageNet-1K across ResNet, ConvNeXt, and DeiT architectures. On CNNs, our approach achieves MAC targeting while maintaining or improving accuracy: ResNet-50 reaches 1.77G MACs with 77.04% accuracy (+0.91% vs baseline); ResNet-101 achieves 4.22G MACs with 78.94% accuracy (+1.56% vs baseline). For ConvNeXt-Small, pruning to 8.17G MACs yields 1.41x GPU and 1.07x CPU speedup with 45% parameter reduction. On Vision Transformers, we demonstrate MAC-budget compliance within user-defined tolerance bands (typically +1% to +5% overshoot, -5% to -15% undershoot), establishing feasibility for deployment scenarios requiring strict computational guarantees.
Paper Structure (85 sections, 4 equations, 2 figures, 30 tables, 2 algorithms)

This paper contains 85 sections, 4 equations, 2 figures, 30 tables, 2 algorithms.

Figures (2)

  • Figure 1: Multi-agent framework architecture. The Profiling Agent analyzes model structure and baseline MAC distribution. The Master Agent orchestrates workflow and detects convergence patterns. The Analysis Agent, powered by an LLM, learns optimal pruning strategies from historical attempts. Iterative refinement continues until MAC targets are met within tolerance.
  • Figure 2: Iterative MAC-budget optimization workflow. Each revision refines the pruning strategy based on LLM analysis of previous attempts until MAC targets are achieved. The workflow typically converges within 3-5 revisions.