RiteeshGrandhi/sciclaimeval-shared-task huggingface dataset:
DeNetDM
In response to the observations to be discussed in Sec. 3.1 regarding linear decodability, we introduce DeNetDM, a debiasing approach centered on network depth modulation.
Our training process comprises two stages: initially, a deep and shallow network pair is trained using a training paradigm that originates from
Products of Experts [ 11 ] , yielding both biased and debiased models, which is detailed in Sec. 3.2 .
Subsequently, recognizing the limitations of the shallow debiased model in capturing core feature complexities due to its depth, we proceed to train a target debiased model, ensuring it possesses the same or higher depth compared to the deep biased model. This phase leverages information acquired from the biased and debiased models in the previous step, as elaborated in Sec. 3.3 . An illustration of the proposed approach is provided in Fig. 3 .
Stage1: Segregation of Bias & Core Attributes
In this section, we explain the training procedure to obtain the b iased and d ebiased classifier for an M class classification problem. Let \phi_{b} and \phi_{d} denote the parameters of the feature extractors associated with the deep and shallow branches, where \operatorname{depth}(\phi_{b})>\operatorname{depth}(\phi_{d}) . We use f to represent the classifier head shared by \phi_{b} and \phi_{d} . Here, f , \phi_{b} and \phi_{d} are trainable parameters. Considering an image-label pair (x,y) , the objective function is expressed as:

\mathcal{L}_{CE}(\hat{p},y)=-\sum_{c=1}^{M}y_{c}\log(\hat{p}_{c})\vspace{-8pt} (1)

\hat{p}=\operatorname{softmax}\left(f(\alpha_{b}\phi_{b}(x)+\alpha_{d}\phi_{d}(x))\right)\vspace{-5pt}

If \alpha_{b}=\alpha_{d}=1 ,

\hat{p}=\operatorname{softmax}\left(f\left(\phi_{b}(x)+\phi_{d}(x)\right)\right)\vspace{-5pt} (2)

where \alpha_{b} and \alpha_{d} are set to 1 throughout the training process. To evaluate the performance of an individual expert, we assign a value of 1 to the corresponding \alpha while setting the other \alpha equal to 0.

Our training methodology is derived from the Products of Experts technique [ 11 ] where multiple experts are combined to make a final prediction, and each expert contributes to the prediction with a weight. However, in our approach, the role of the experts is assumed by \phi_{b} and \phi_{d} , whose features are combined through weighted contributions. The conjunction of features is then passed to the shared classifier to generate predictions. We provide a detailed proof elucidating the derivation of Eq. 2 through the Product of Experts in Section B of the supplementary material.
Due to the architectural constraints we imposed by modulating their capacities, the deep expert tends to prioritize the learning of bias attribute, while the shallow expert is inclined towards the core attribute. The model leverages the strengths of both experts to effectively learn from their combined knowledge. We investigate the training dynamics in Sec. 4.3 .
Stage2 : Training the Target Debiased Model
The initial phase effectively separates the bias and core attributes into deep and shallow branches, respectively. However, relying solely on the debiased shallow branch may not be practical, as it might not capture the complex features representing the core attributes, given the less depth of the shallow model. This limitation does not apply to the deep biased model. To tackle this challenge, we introduce a target branch with the desired architecture for debiasing.

Let \phi_{t} be the parameters of the feature extractor associated with the target branch and f_{t} be the classifier head whose weights are initialized using the weights of f . During this phase, our training is exclusively focused on \phi_{t} and f_{t} . We freeze \phi_{b} and \phi_{d} since we leverage these models to only extract the necessary knowledge for debiasing the target branch. To capture information orthogonal to \phi_{b} , we employ the same training approach described in Sec. 3.2 , where \phi_{b} and \phi_{t} serve as the experts. The objective function can be written as:

\mathcal{L}_{t}(\hat{p},y)=-\sum_{c=1}^{M}y_{c}\log(\hat{p}_{c})\vspace{-4pt}

where,

\hat{p}=\operatorname{softmax}(f_{t}(\beta_{b}\phi_{b}(x)+\beta_{t}\phi_{t}(x)))\vspace{-1pt} (3)

The training and evaluation of the experts follow the procedure described in Sec. 3.2 , with the key difference being that in this phase, only a single expert, \phi_{t} , which is the target branch and classifier f_{t} , undergoes updates.

We further leverage the knowledge pertaining to the core attributes, which is encapsulated in \phi_{d} , by transferring this knowledge to the target branch \phi_{t} through knowledge distillation. Here, \phi_{t} acts as the student, whereas \phi_{d} corresponds to the teacher. We set \beta_{b}=0 and \beta_{t}=1 in Eq. 3 to obtain the predictions of the student \phi_{t} . Therefore, the distillation loss is given by :

\mathcal{L}_{dist}(\hat{p}_{t},\hat{p}_{s})=-\sum_{c=1}^{M}\hat{p}_{t_{c}}\log(\hat{p}_{s_{c}})\vspace{-25pt}

where, \hat{p}_{s}=\operatorname{softmax}\left(\frac{f_{t}(\phi_{t}(x))}{\tau}\right) (4) \hat{p}_{t}=\operatorname{softmax}\left(\frac{f(\phi_{d}(x))}{\tau}\right) (5)

Here, \tau is the temperature which is a hyperparameter. Consequently, the complete loss function is given by :

\mathcal{L}=\mathcal{L}_{t}+\lambda\mathcal{L}_{dist}\vspace{-4pt} (6)

where \lambda is a hyperparameter chosen from the interval [0,1] . The pseudocode for the entire training process of DeNetDM is provided in Algorithm 1 .
Experiments
In this section, we discuss the experimental results and analysis to demonstrate the effectiveness of DeNetDM training in debiasing. We evaluate the performance of the proposed approach by comparing it with the previous methods in debiasing, utilizing well-known datasets with diverse bias ratios, consistent with the prior works in debiasing [ 23 , 19 , 16 ] . Additionally, we conduct an empirical study to analyze the training dynamics of DeNetDM. We also perform ablation studies to assess the impact and effectiveness of individual components within the proposed approach.
Evaluation Results
We present a comprehensive comparison of DeNetDM with all the baselines described in Sec. 4.1 across varying bias conflicting ratios on CMNIST, C-CIFAR10, BFFHQ and BAR in Tab. 1 and Tab. 2 respectively. As evident from Tab. 1 and Tab. 2 , DeNetDM consistently outperforms all baselines across different bias ratios for CMNIST, BFFHQ and BAR datasets. Notably, on the C-CIFAR10 dataset, DeNetDM exhibits superior performance when bias ratios are at 0.5%, 1%, and 5%, and closely aligns with LC [ 20 ] in the case of 2%. These findings provide empirical evidence for the practical applicability of DeNetDM. It is worth mentioning that the proposed approach demonstrates a significant performance enhancement across all datasets when compared to Group DRO, which relies on predefined knowledge of bias. DeNetDM achieves this improvement without any form of supervision on the bias, highlighting the effectiveness of depth modulation in the debiasing process.

An intriguing observation from Tab. 1 is that DeNetDM demonstrates better performance compared to the baselines when the bias-conflicting ratio is lower, particularly evident in the C-CIFAR10 dataset. We believe that the effectiveness of inductive bias enforced by DeNetDM in distinguishing between core and bias attributes is superior to that of LC, thereby allowing it to adeptly capture core attributes even when dealing with data points that exhibit fewer bias conflicting points. This emphasizes the applicability of DeNetDM in scenarios where the training data exhibits a significant amount of spurious correlations. Another noteworthy observation in Tab. 2 is that DeNetDM outperforms LC and DFA by a considerable margin across all datasets, particularly on the complex real-world datasets, BAR and BFFHQ. Both LC and DFA rely on augmentations to enhance the diversity of bias-conflicting points, whereas our approach utilizes depth modulation to efficiently capture the core attribute characteristics in the existing training data. Despite this, DeNetDM still achieves superior performance compared to LC and DFA without relying on augmentations.
Analysis of Training Dynamics
In Sec. 3.1 , we discussed the variability in the linear decodability at various depths and how the disparity in linear decodability between biased attributes and target attributes forms a significant motivation for debiasing. To further validate this intuition and identify the elements contributing to its effectiveness, we delve into the analysis of the training dynamics of DeNetDM during the initial training stages. We consider the training of Colored MNIST with 1% skewness due to its simplicity and ease of analysis. Figure 4 shows how linear decodability of attributes varies across different branches of DeNetDM during training.
As depicted in Fig. 4 , prior to the training, the deep branch demonstrates lower linear decodability for both the digit (core attribute) and color (bias attribute) in comparison to the linear decodability observed in the shallow branch. As the training process unfolds, the bias attribute which is relatively easier to learn, undergoes a rapid increase in the linear decodability in both the shallow and deep branches, as denoted by the label ‘A’ in Fig. 4 .
At this point, the disparity in linear decodability between the digit and color attributes becomes more pronounced in the deep branch as opposed to the shallow branch in the DeNetDM. This distinction serves as a prior, influencing the deep branch to effectively capture the bias.

Since we employ Product of Experts technique, the deep branch becomes proficient in classification using the spurious attribute, thereby compelling the shallow branch to rely on other attributes such as digit for the classification. It is worth noting that the linear decodability of core attributes is more pronounced in the shallow branch, allowing them to capture the core attributes. Therefore, the training paradigm of DeNetDM leads to a shallow branch that is robust to spurious correlations, and a deep branch that predominantly relies on the biased attribute. This analysis not only confirms our intuition but also furnishes empirical evidence that the training paradigm is effective in the process of debiasing.
Conclusion
We introduce a novel debiasing method that leverages the variations in linear decodability across network depths. Through an extensive analysis of bias and core attributes across networks of varying depths, we uncover compelling insights into the interplay between network architecture, attribute decodability, and training methodologies. Leveraging these insights, we present a training approach derived from the Product of Experts methodology by employing paired deep and shallow branches and then transferring their debiasing capabilities to the desired architecture. By modulating the network depths, DeNetDM adeptly captures core attributes within the debiased model without necessitating explicit reweighting or data augmentation. We conducted extensive experiments and meticulous ablation studies across various datasets, including synthetic datasets like Colored MNIST and Corrupted CIFAR-10, along with real-world datasets, Biased FFHQ and BAR, to validate the robustness and superiority of our methodology. Significantly, we present empirical evidence demonstrating that DeNetDM achieves comparable performance to supervised approaches, despite not having access to bias annotations.
Figure 1 : Our DeNetDM model comprises a Product of Expert (PoE) [ 11 ] , featuring one deep and one shallow expert. The shallow expert primarily captures core attributes, achieving debiased classification, while the deep expert focuses on bias. To compensate for the shallow expert’s limited capability due to less depth, we implement a knowledge transfer strategy utilizing knowledge from the experts to train a target debiased model.; Our DeNetDM model comprises a Product of Expert (PoE) [ 11 ] , featuring one deep and one shallow expert. The shallow expert primarily captures core attributes, achieving debiased classification, while the deep expert focuses on bias. To compensate for the shallow expert’s limited capability due to less depth, we implement a knowledge transfer strategy utilizing knowledge from the experts to train a target debiased model.
(a); (b); Exploring the Effect of depth modulation: (a) illustrates how the linear decodability of features decreases as neural network depth increases, while (b) dives into the training dynamics of MLPs with varying depths under ERM.
Figure 3 : Illustration of the DeNetDM framework : In Stage 1, an ensemble of shallow and deep branches produces outputs linearly combined and trained as a product of experts. The cross-entropy loss with depth modulation aids in separating biases and identifying target attributes. In Stage 2, we further introduce a target branch with the desired architecture, which also requires debiasing. This phase exclusively focuses on refining the target branch’s feature extractor ( \phi_{t} ) and classifier head ( f_{t} ) while leveraging knowledge from the initial stages.; Illustration of the DeNetDM framework : In Stage 1, an ensemble of shallow and deep branches produces outputs linearly combined and trained as a product of experts. The cross-entropy loss with depth modulation aids in separating biases and identifying target attributes. In Stage 2, we further introduce a target branch with the desired architecture, which also requires debiasing. This phase exclusively focuses on refining the target branch’s feature extractor ( \phi_{t} ) and classifier head ( f_{t} ) while leveraging knowledge from the initial stages.
Figure 4 : Training dynamics of DeNetDM during initial stages of training monitored in terms of linear decodability of bias attribute (color) and core attribute (digit).; Training dynamics of DeNetDM during initial stages of training monitored in terms of linear decodability of bias attribute (color) and core attribute (digit).
Performance in terms of accuracy is evaluated on test sets of CMNIST and C-CIFAR10, considering diverse percentages of bias-conflicting samples. Baseline method results are derived from [ 20 ] since we utilize identical experimental settings. Model requirements for spurious attribute annotations (type) are indicated by ✗ (not required) and ✓ (required). Best performances for each dataset are marked in bold .
Performance in terms of accuracy is evaluated on test sets of BAR and BFFHQ, considering diverse percentages of bias-conflicting samples. Additionally, both BAR and BFFHQ are evaluated on the test set which contains bias-conflicting samples. Baseline method results are derived from [ 18 ] for BAR and [ 20 ] for BFFHQ since we utilize identical experimental settings.
Comparison of the performance of DeNetDM using different network depths for the two branches of DeNetDM.
Ablation study of different losses used in DeNetDM.
Ablation study on the number of parameters of deep and shallow branches in DeNetDM using C-CIFAR10 dataset.