Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash 96 TPS
Gemini 2.5 Pro 39 TPS Pro
GPT-5 Medium 36 TPS
GPT-5 High 36 TPS Pro
GPT-4o 74 TPS
GPT OSS 120B 399 TPS Pro
Kimi K2 184 TPS Pro
2000 character limit reached

Attention-FFN Disaggregation (AFD) System

Updated 14 August 2025
  • AFD system is an architectural framework that disaggregates attention and feed-forward computations to enable task-specific optimization and modular hardware deployment.
  • It enhances efficiency by allocating independent computational pathways, reducing resource contention and improving performance metrics in vision, language, and speech models.
  • The system also enables granular bias analysis and interpretability by isolating attention head and FFN components for targeted adjustments and robust model behavior.

Attention-FFN Disaggregation (AFD) Systems are architectural and computational frameworks that explicitly separate (disaggregate) the roles and executions of attention mechanisms and feed-forward networks (FFNs), traditionally coupled within Transformer and related deep neural architectures. This separation enables tailored feature extraction, specialized computation, hardware-aware deployment, and task-specific optimization. Originating in object detection and rapidly adopted for vision, language, speech, and scientific modeling, AFD systems provide modularity, efficiency, and enhanced interpretability across domains.

1. Conceptual Foundations and Motivation

AFD is founded on the observation that attention and FFN components exhibit distinct preferences, computational profiles, and optimization requirements. In standard architectures, classification (requiring semantic context) and localization (requiring spatial precision) share feature maps and parameterizations; this often leads to suboptimal performance due to blended representations and resource contention. AFD architectures explicitly partition attention-driven and FFN-driven feature pathways, enabling:

  • Task-aligned feature learning (e.g., separate query and support feature encoding for object classification and localization (Liu et al., 2020))
  • Modular implementation where each component specializes (e.g., vision transformers with hallucinated attention maps and compact FFN modules (Xu et al., 2023))
  • Independent hardware scaling, batch sizing, and parallelism (e.g., MoE systems with disaggregated expert and attention nodes (Zhu et al., 3 Apr 2025), Step-3 for LLM decoding (StepFun et al., 25 Jul 2025))
  • Direct bias analysis and mitigation via isolated attention head/FFN component manipulation in LLMs (Zhou et al., 31 May 2024)

This disaggregation is not limited to neural feature flows but extends to deployment scenarios where attention and FFN computations run on distinct hardware, maximizing resource utilization. The principle applies to two-branch systems in vision (e.g. frequency and spatial AFD in forgery detection (Wang et al., 2022)), distributed inference pipelines (Liang et al., 26 Mar 2025, StepFun et al., 25 Jul 2025), and chaotic system modeling (Gong et al., 23 May 2025).

2. Architectural Designs and Key Modules

Dual Branch, Dual Aggregator, and Adaptive Fusion

AFD-Net exemplifies dual branch (classification/regression) designs: Dual Query Encoder outputs task-specific RoI features, Dual Attention Generator processes support images for separate attentional embeddings, and the Dual Aggregator fuses these via learned reweighting (element-wise multiplication, subtraction, FC layers) (Liu et al., 2020). Adaptive Fusion Mechanisms combine convolutional and FC encoders, with learnable subtask-specific weights, to tailor feature representations.

Sparse and Adaptive Attention, Chunked FFN

In speech, EfficientASR’s Shared Residual Multi-Head Attention (SRMHA) reuses previous layer attention maps with residual fusion and shared QK projections, halving quadratic computations (Wang et al., 30 Apr 2024). Chunk-Level FFN processes embedding dimension chunks via independent, small FFNs, lowering parameter count by 36%.

hallucinated-MHSA and compact-FFN

Vision transformers may hallucinate attention maps via local (depthwise) and cross-head convolutional operations, avoiding redundant QK computations. The FFN is factorized in the hidden-to-output mapping, enabling tight compaction and re-parameterization (Xu et al., 2023).

MoE Unification and Expert Routing

Sparse MoE systems leverage expert parallelism for FFN and, increasingly, attention layers. UMoE demonstrates that attention output projection can be expressed as sequential FFN-like modules and shares experts between branches via top-k routing (Yang et al., 12 May 2025). MegaScale-Infer distributes expert and attention modules across separate GPU groups, applying ping-pong pipeline parallelism for batch interleaving and maximizing utilization (Zhu et al., 3 Apr 2025).

Spatiotemporal Attention and Dynamic Fusion

For dynamical systems, AFD-STA Net employs adaptive exponential smoothing, parallel spatiotemporal attention mechanisms, dynamic gated fusion, and deep projection networks. Temporal and spatial dependencies are separately attended and fused for precision in chaotic attractor prediction (Gong et al., 23 May 2025).

3. Computational and Hardware Disaggregation

AFD systems extend architectural separation to physical deployment. In LLMs, Step-3 executes attention (KV cache management, memory-bound) and FFN (MoE, compute-bound) on specialized hardware pipelines. The theoretical decoding cost per token is split:

CostAttn=max(FLOPAttnUFLOP,ByteKVUbyte)+FLOPLinearUFLOP\text{Cost}_{\text{Attn}} = \max(\text{FLOP}_{\text{Attn}} \cdot U_{\text{FLOP}}, \text{Byte}_{\text{KV}} \cdot U_{\text{byte}}) + \text{FLOP}_{\text{Linear}} \cdot U_{\text{FLOP}}

CostFFN=FLOPFFNUFLOP\text{Cost}_{\text{FFN}} = \text{FLOP}_{\text{FFN}} \cdot U_{\text{FLOP}}

Pipelines overlap attention computation, high-speed interconnect transfer, and FFN matrix multiplication across GPUs, achieving superior throughput and cost Pareto optimality in large-scale deployments (StepFun et al., 25 Jul 2025).

MegaScale-Infer organizes inference into micro-batch "ping-pong" pipelines between attention and FFN expert nodes, hiding communication latency. Tailored communication libraries (M2N pattern, GPUDirect/RDMA) eliminate unnecessary synchronization and data copies (Zhu et al., 3 Apr 2025). Adrenaline offloads attention computation during decoding to prefill instances, maximizing memory and compute utilization and boosting throughput (Liang et al., 26 Mar 2025).

4. Empirical Performance and Efficiency Metrics

AFD architectures yield measurable improvements:

  • In few-shot object detection, AFD-Net advances AP₅₀ by large margins against baselines, especially in minimal-shot setups (Liu et al., 2020)
  • In face forgery, AFD boosts accuracy and AUC (90.33%/94.24% vs. 89.39%/91.75% baseline) and consistently outperforms across manipulation methods (Wang et al., 2022)
  • Vision transformers gain 10–20% FLOPs and parameter reductions, matching or exceeding vanilla MHSA/FFN performance (Xu et al., 2023)
  • EfficientASR achieves a 36% parameter reduction and 0.3–0.2% CER improvements in speech recognition (Wang et al., 30 Apr 2024)
  • Spark Transformer enforces 8% FFN activation and at most 256 attended tokens, yielding 2.5x FLOPs reduction and up to 1.79x real-world speedup (You et al., 7 Jun 2025)
  • Step-3’s system co-design reaches 4,039 tokens/s/GPU (SLA 50ms, 4K context) versus 2,324 for DeepSeek-V3 (StepFun et al., 25 Jul 2025)
  • MegaScale-Infer's disaggregation delivers 1.90x GPU throughput and cost reduction (Zhu et al., 3 Apr 2025)
  • Adrenaline yields 2.28x memory capacity, 2.07x bandwidth, 1.67x compute utilization, and 1.68x overall throughput increase (Liang et al., 26 Mar 2025)

5. Interpretability, Bias Analysis, and Robustness

AFD facilitates granular analysis and mitigation of internal model biases. In UniBias, attention heads and FFN vectors are projected and analyzed separately for label bias; biased components are masked during inference, reducing prompt brittleness and increasing accuracy by up to 3 pp across diverse NLP tasks (Zhou et al., 31 May 2024). Disaggregation enables component-level interventions and interpretability, suggesting future directions in adaptive thresholding and training-integrated fairness adjustments.

6. Applications and Extensions

AFD systems have broad application scope:

Extensions involve hybrid disaggregation (e.g., combining AFD with sparse activation, chunked FFN), deployment in sensing/communications (AFDM waveform with delay-Doppler alignment (Rou et al., 15 Jan 2024)), and task-general expert routing with unified MoE (Yang et al., 12 May 2025).

7. Challenges and Future Directions

Disaggregated architectures pose integration and optimization challenges: balancing computational and communication overhead, tuning hyperparameters (compactness, batch split), and ensuring seamless interaction between precision-critical pathways. Designing globally adaptive mitigation schemes for bias, supporting dynamic hardware allocation, and merging disaggregated components during training remain active research directions. The principle of AFD continues to inform both theoretical advances in neural architectures and practical implementations for efficient, robust real-world AI systems.


Attention-FFN Disaggregation defines a multidimensional approach to neural architecture and deployment, spanning feature specialization, modular hardware scaling, robustness to bias, and resource-aware efficiency. It is pivotal in advancing cost-effective, high-throughput, and interpretable AI systems at scale across modalities and domains.