---
title: Dual-Granularity Guidance Network for Fault Diagnosis
url: https://www.emergentmind.com/topics/dual-granularity-guidance-network-dggn
type: topic
---

# Dual-Granularity Guidance Network for Fault Diagnosis

Searching arXiv for the cited DGGN paper and closely related dual-granularity guidance work.
Found the core DGGN paper and several adjacent dual-granularity methods for context. Proceeding with the article grounded in these sources.
Dual-Granularity Guidance Network (DGGN) is a framework for **Few-shot Class-incremental Fault Diagnosis (FSC-FD)** that explicitly separates representation learning into a **fine-grained representation stream** for class-specific discrimination and a **coarse-grained representation stream** for class-agnostic knowledge preservation, then fuses the two through a **multi-semantic cross-attention** mechanism so that stable coarse-grained knowledge guides the learning of fine-grained features [2508.16634]. In the paper that introduces the term, DGGN is not a standalone guidance block but a full incremental diagnosis system comprising dual-stream feature learning, cross-attentive semantic fusion, exemplar replay, and a decoupled classifier. Its stated purpose is to address the joint difficulty of **catastrophic forgetting** of previously learned faults and **overfitting** to scarce new-class samples in industrial diagnosis settings [2508.16634].

## 1. Problem formulation and conceptual basis

DGGN is formulated for sequential class-incremental learning over sessions
\[
\mathcal{T} = \left[(C^1, D^1), (C^2, D^2), \ldots, (C^n, D^n)\right],
\]
where \(C^t\) is the set of classes introduced in session \(t\) and \(D^t\) is the corresponding training set. For the base session,
\[
D^1 = \left\{ (x_1, y_1), (x_2, y_2), \ldots, (x_i, y_i),\; y_i \in C^1 \right\},
\]
while for incremental sessions \(t>1\),
\[
D^t = \left\{ (x_i, y_i)_{i=1}^N,\; y_i \in C^t \right\}.
\]
The class sets are disjoint across sessions,
\[
\forall t_1 \neq t_2,\quad C^{t_1} \cap C^{t_2} = \emptyset,
\]
and after session \(n\) the model must classify over
\[
C^{(0:n)} = \left\{ C^1 \cup C^2 \cup \cdots \cup C^n \right\}
\]
[2508.16634].

The motivation is specific to industrial fault diagnosis. The paper states that **fault samples are naturally scarce** because systems mostly operate normally, and **fault classes evolve over time** because of aging, operating condition changes, or new failure modes. In this setting, a single-stream model is described as prone to **representation entanglement** and **feature conflict**: it may overfit to the few new samples while simultaneously distorting representations needed for old classes [2508.16634].

The central conceptual move in DGGN is to distinguish two representation types that prior FSC-FD methods tend to mix in one feature space. The **class-specific / fine-grained** stream is intended to remain plastic and discriminative for new faults. The **class-agnostic / coarse-grained** stream is intended to remain stable across sessions and capture general semantics shared across fault types. This division is the basis for the paper’s claim that forgetting and overfitting should be addressed jointly through representation design rather than solely through replay or distillation [2508.16634].

## 2. System architecture and dual-stream organization

The architecture is described at a high level as consisting of **sample replay**, **feature expansion**, and **classifier**. End to end, DGGN processes input fault signals through two parallel encoders, fuses their outputs by cross-attention, updates memory using a boundary-aware exemplar strategy, and performs final prediction with a decoupled **Balanced Random Forest (BRF)** classifier [2508.16634].

| Component | Role | Main mechanism |
|---|---|---|
| Class-specific stream | Fine-grained discrimination | 1D ResNet-18 + MOIA |
| Class-agnostic stream | Stable shared semantics | 1D ResNet-18 + self-supervised continual learning |
| Fusion module | Guidance from coarse to fine | Multi-semantic cross-attention |
| Replay module | Forgetting mitigation | Boundary-Aware Exemplar Prioritization |
| Final classifier | Imbalance-robust prediction | Balanced Random Forest |

Both streams use **ResNet-18** backbones, but they are trained differently. The class-specific branch \(f_{cs}^{(t)}\) is updated every session and optimized for discriminative learning. The class-agnostic branch \(f_{ca}^{(t)}\) is trained with self-supervised continual learning so that it can function as a stable semantic anchor. The outputs are fused into a dual-semantic representation \(z_m\), which is used both for supervision and for guiding the class-specific branch [2508.16634].

This architecture is explicitly asymmetric. The class-agnostic branch is not merely an auxiliary regularizer; it is intended to preserve knowledge that the class-specific branch would otherwise overwrite. Conversely, the class-specific branch is the main carrier of new discriminative information. A plausible implication is that DGGN treats incremental diagnosis as a controlled interaction between **stability** and **plasticity**, with the guidance mechanism mediating between them [2508.16634].

## 3. Fine-grained and coarse-grained representation learning

The **class-specific / fine-grained stream** is a **1D ResNet-18** enhanced with the **Multi-Order Interaction Aggregation (MOIA)** module. MOIA takes an input feature
\[
X_{in} \in \mathbb{R}^{C \times L},
\]
splits channels into low-, mid-, and high-level groups, processes the latter two with dilated depthwise convolutions,
\[
\tilde{X}_m = DW_{5 \times 5, d=2}(X_m), \qquad
\tilde{X}_h = DW_{7 \times 7, d=3}(X_h),
\]
and then concatenates and compresses them:
\[
X_{out} = Conv_{1 \times 1} \left( Concat(X_l, \tilde{X}_m, \tilde{X}_h) \right).
\]
In the paper’s terminology, “multi-order” refers to contextual dependencies at different receptive-field scales rather than explicit polynomial interaction terms [2508.16634].

The class-specific branch is trained with three losses. First is supervised contrastive learning:
\[
\mathcal{L}_{\text{scl} }= \sum_{i \in I} \frac{-1}{|P(i)|} \sum_{p \in P(i)} \log \frac{\exp\left( (z_i \cdot z_p)/\tau \right)}{\sum_{a \in A(i)} \exp\left( (z_i \cdot z_a)/\tau \right)},
\]
where \(z_i = f_{cs}(x_i)\). Second is feature-level knowledge distillation based on pairwise feature similarities, using
\[
Q(z_i; z_a) = \frac{\exp\left( (z_i \cdot z_a)/\tau \right)}{\sum_{k \in A(i)} \exp\left( (z_i \cdot z_k)/\tau \right)}.
\]
The stated distillation loss is
\[
\begin{split}
\mathcal{L}_{\text{kd}(f_{cs}^{t-1}, f_{cs}^{t})}
&= -\frac{1}{2N} \sum_{i \in I} \sum_{a \in A(i)} Q(z_i; z_a)^T \log \left( Q(z_i; z_a)^S \right).
\end{split}
\]
Third is a KL alignment term received from the fused representation, discussed below [2508.16634].

The **class-agnostic / coarse-grained stream** is also a **1D ResNet-18**, but it is trained without class labels. At the base session it uses an InfoNCE objective:
\[
\begin{split}
\mathcal{L}_{\text{ca}^{(t=0)}}
&= -\text{InfoNCE} \, \mathbb{E} \left( \{ f_{ca}(x_i) \}_{i=1}^N, \{ f_{ca}(x_i') \}_{i=1}^N \right) \\
&= \frac{1}{N} \sum_{i=1}^N \log \frac{\exp\left( \text{sim}(z_i, z_i') / \tau \right)}{\sum_{\substack{j=1 \\ j \neq i}^N} \exp\left( \text{sim}(z_i, z_j') / \tau \right)},
\end{split}
\]
with cosine similarity
\[
\text{sim}(z_i, z_i') = \frac{z_i^\top z_i'}{\| z_i \| \cdot \| z_i' \|}.
\]
For incremental sessions, it adds cross-session alignment with a predictor \(g(\cdot)\):
\[
\begin{split}
\mathcal{L}_{\text{ca}^{(t>0)}}
&= -\text{InfoNCE} \, \mathbb{E} \left( \{ f_{ca}^t(x_i) \}_{i=1}^N, \{ f_{ca}^t(x_i') \}_{i=1}^N \right) \\
&\quad -\text{InfoNCE} \, \mathbb{E} \left( \{ g(f_{ca}^t(x_i)) \}_{i=1}^N, \{ f_{ca}^{t-1}(x_i) \}_{i=1}^N \right).
\end{split}
\]
The previous class-agnostic encoder \(f_{ca}^{t-1}\) is frozen and used as a semantic anchor [2508.16634].

The stated rationale is that the class-agnostic stream remains stable because it is trained without class-discriminative supervision, is aligned to its previous version, and is used with **StopGradient** during fusion. The class-specific stream, by contrast, is intended to adapt rapidly to new classes. The paper’s CKA analysis is consistent with this interpretation: CA-CA inter-session similarities are reported as typically above **0.92**, while CS-CS similarities are substantially lower [2508.16634].

## 4. Guidance mechanism, replay strategy, and decoupled classification

The core guidance module is **multi-semantic cross-attention (MSCA)**. Given feature maps \(F_{cs}^t(x)\) and \(F_{ca}^t(x)\), DGGN first normalizes them:
\[
z_{cs} = \text{LayerNorm}_1 \bigl( F_{cs}^t(x) \bigr),
\]
\[
z_{ca} = \text{LayerNorm}_2 \Bigl( \text{StopGradient} \bigl( F_{ca}^t(x) \bigr) \Bigr).
\]
The class-specific feature provides the query,
\[
Q = W_q \cdot z_{cs},
\]
while both streams provide keys and values,
\[
K_{cs} = W_k^{cs} \cdot z_{cs}, \qquad V_{cs} = W_v^{cs} \cdot z_{cs},
\]
\[
K_{ca} = W_k^{ca} \cdot z_{ca}, \qquad V_{ca} = W_v^{ca} \cdot z_{ca}.
\]
For each head, the fused representation is
\[
z_m^{(h)} = \text{Softmax} \left( \frac{Q^{(h)} \left[ K_{cs}^{(h)}, K_{ca}^{(h)} \right]^T}{d/h} \right) \left[ V_{cs}^{(h)}, V_{ca}^{(h)} \right].
\]
This makes the guidance explicitly **uni-directional**: the class-specific branch queries both itself and the class-agnostic branch, while the class-agnostic branch is protected from discriminative gradients by **StopGradient** [2508.16634].

The fused feature is supervised by
\[
\mathcal{L}_{\text{mcls} }= \ell_{\text{CE}(\text{GAP}(z_m), y),
\]
and its predictive distribution \(p_m\) guides the class-specific branch distribution \(p_{cs}\) through
\[
\mathcal{L}_{kl} = \sum_{i=1}^c \text{SG}(p_m(i)) \log \left( \frac{\text{SG}(p_m(i))}{p_{cs}(i)} \right).
\]
The class-specific branch loss is
\[
\mathcal{L}_{cs} = \mathcal{L}_{scl} + \mathcal{L}_{kd} + \mathcal{L}_{kl},
\]
and the total objective is
\[
\mathcal{L}_{total} = \mathcal{L}_{cs} + \lambda \cdot \mathcal{L}_{ca} + \mu \cdot \mathcal{L}_{mcls},
\]
with implementation values
\[
\lambda = 0.5,\qquad \mu = 0.6
\]
[2508.16634].

To mitigate forgetting, DGGN uses **Boundary-Aware Exemplar Prioritization (BAEP)** rather than random or center-oriented replay. For a class candidate set \(C = \{x_1, x_2, \dots, x_n\}\) and class mean
\[
\mu_c = \frac{1}{n} \sum_{i=1}^n \varphi_\theta(x_i),
\]
the selected exemplar is
\[
p_k = \arg\max_{x \in C} \left\| \varphi_\theta(x) - \mu_c + \frac{1}{k} \sum_{j=1}^{k-1} \left( \varphi_\theta(p_j) - \mu_c \right) \right\|_2^2.
\]
The memory budget is fixed at \(M\), with per-class quota
\[
k = M / t
\]
after seeing \(t\) classes. This selection rule explicitly favors samples deviating from the class center, which the paper interprets as boundary-relevant and diversity-preserving [2508.16634].

Final prediction is decoupled from neural representation learning and performed by a **Balanced Random Forest**. For each tree \(i\),
\[
S^{(i)} = S_{\text{minority}^{(i)} \cup S_{\text{majority}^{(i)},
\]
with balanced sampling between minority and majority classes. After training \(N\) trees, prediction is
\[
\hat{y}(x) = \text{mode} \bigl( T_1(\varphi(x)), T_2(\varphi(x)), \dots, T_N(\varphi(x)) \bigr).
\]
The paper’s stated reason for this decoupling is that few-shot incremental imbalance biases neural decision boundaries; BRF is intended to counter that bias more effectively than a standard softmax head [2508.16634].

## 5. Experimental evidence, ablations, and analytical findings

DGGN is evaluated on the **TEP** benchmark and a real-world **MFF** dataset. TEP provides 40 measured variables, 12 manipulated variables, and 21 fault types in total; the experiments use faults 1, 2, 4, 6, 7, 8, 12, 14, 18, plus normal class 0. MFF contains 24 process variables sampled at 1 Hz and six standard fault types; the experiments use faults 1, 2, 3, 4, plus normal class 0. The incremental setups are **\(2+2+2+2+2\)** classes for TEP and **\(1+1+1+1+1+1\)** for MFF [2508.16634].

The sample settings simulate few-shot imbalance. On TEP, normal training samples are **500**, fault training samples are **48 per class in imbalanced mode** and **20 per class in long-tailed mode**, with **800** test samples for both normal and fault classes. On MFF, normal training samples are **200**, fault training samples are **10 per class in imbalanced mode** and **5 per class in long-tailed mode**, again with **800** test samples for both normal and fault classes. Results are reported as classification accuracy and mean per-class accuracy on all seen classes, averaged over the last 10 checkpoints [2508.16634].

The main averages are uneven rather than uniformly dominant. On **TEP imbalanced**, DGGN reports **90.41** average accuracy versus **86.52** for SCLIFD. On **TEP long-tailed**, DGGN reports **85.13**, while SCLIFD reports **86.01**. On **MFF imbalanced**, DGGN reports **99.59** versus **97.94** for BiDistFSCIL and **97.86** for WaRP-CIFSL. On **MFF long-tailed**, DGGN reports **99.99** versus **98.87** for WaRP-CIFSL and **97.09** for BiDistFSCIL [2508.16634]. This record is consistent with a neutral reading: DGGN is strongest on MFF and on TEP imbalanced, but not strictly best on every reported setting.

The ablations directly support the dual-granularity claim. Removing the class-agnostic branch is the largest degradation: average accuracy drops from **90.41** to **71.06** on TEP imbalanced, from **85.13** to **71.03** on TEP long-tailed, from **99.59** to **91.78** on MFF imbalanced, and from **99.99** to **87.40** on MFF long-tailed. Removing MSCA also causes major losses, including **90.41 \rightarrow 83.66** on TEP imbalanced and **85.13 \rightarrow 73.84** on TEP long-tailed. Removing KL-based knowledge transfer is milder on TEP imbalanced (**90.41 \rightarrow 89.90**) but substantial on TEP long-tailed (**85.13 \rightarrow 76.93**). Removing MOIA yields smaller but consistent declines, such as **90.41 \rightarrow 89.04** on TEP imbalanced and **99.99 \rightarrow 97.85** on MFF long-tailed [2508.16634].

The paper also reports classifier comparisons favoring BRF over FCC, SVM, and KNN. On TEP imbalanced, the averages are **80.64** for FCC, **88.10** for SVM, **90.26** for KNN, and **90.41** for BRF/DGGN. On TEP long-tailed, the corresponding values are **72.47**, **78.42**, **82.00**, and **85.13** [2508.16634].

Analytically, the most direct evidence for the intended representation split is the CKA heatmap. Reported values include **Agnostic-S1 vs Agnostic-S2: 0.98**, **Agnostic-S1 vs Agnostic-S5: 0.96**, and generally CA-CA similarities above **0.92**. By contrast, CS-CS similarities include **Specific-S2 vs Specific-S3: 0.41** and **Specific-S4 vs Specific-S5: 0.37**, while cross-branch similarities such as **Agnostic-S1 vs Specific-S1: 0.32** remain low [2508.16634]. This supports the paper’s intended decomposition into a stable coarse-grained stream and a more session-sensitive fine-grained stream.

Implementation details are explicit. The model uses **ResNet-18** in both streams, **Adam**, **batch size 512**, **weight decay \(1e{-5}\)**, **temperature \(\tau = 0.07\)**, **learning rate 0.01**, and **500 epochs**. The memory buffer sizes are **100** and **40** on TEP for imbalanced and long-tailed settings, and **10** and **5** on MFF. The MOIA-based DGGN has about **9.91M** parameters on TEP, compared with about **8.50M–8.54M** for simpler DWConv variants, which suggests a modest parameter increase relative to the reported gains [2508.16634].

## 6. Broader use of “dual-granularity guidance” and the specific scope of DGGN

In the recent literature, several methods are **DGGN-like in spirit** but are not literally named “Dual-Granularity Guidance Network.” In embodied RL, **DEG** uses generated episodic guidance with coarse-grained exploration reward and fine-grained matching reward, but the paper explicitly states that it is “not literally a DGGN” and not a standalone guidance network [2602.12636]. In agentic RL, **D2Skill** organizes reusable experience into task skills and step skills, a dual-granularity guidance memory rather than a monolithic network [2603.28716]. In medical image classification, **DiffMIC** uses dual conditional guidance through global and local priors in a diffusion classifier [2303.10610]. Similar two-level guidance ideas appear in infrared small target detection through **DGSPNet** [2511.19306], in graph learning through **Cluster-GT** and node/cluster interaction [2410.06746], in human trajectory prediction through **MGTraj** [2509.09200], and in controllable reasoning compression through **CtrlCoT** [2601.20467].

This makes the naming issue important. The explicit term **DGGN** in the supplied literature refers to the FSC-FD framework introduced in “Few-shot Class-incremental Fault Diagnosis by Preserving Class-Agnostic Knowledge with Dual-Granularity Representations” [2508.16634]. Other works use dual-granularity guidance as a design principle, but not as the same method name. A common misconception is therefore to treat “DGGN” as a generic label for any coarse/fine two-stream model. The papers above suggest a narrower and more accurate usage: **DGGN** denotes the fault-diagnosis framework with class-specific/class-agnostic dual streams, MSCA fusion, BAEP replay, and BRF classification, whereas “dual-granularity guidance” is the broader methodological pattern spanning several domains [2508.16634].

From that perspective, DGGN occupies a specific place within the wider dual-granularity literature. Its distinctive feature is not merely that it has two streams, but that the **coarse-grained stream is explicitly class-agnostic, self-supervised, session-stable, and protected by StopGradient**, while the **fine-grained stream is explicitly class-specific, MOIA-enhanced, and regularized by fused semantic guidance** [2508.16634]. This suggests that DGGN is best understood as a specialized continual-learning architecture in which coarse-grained knowledge functions as a preserved semantic anchor for few-shot class-incremental fault diagnosis, rather than as a generic name for all dual-granularity models.

Source: https://www.emergentmind.com/topics/dual-granularity-guidance-network-dggn