                      MOGIC: Metadata-infused Oracle Guidance for Improved Extreme Classification

3.4. Theoretical Justification of Oracle-Guided Losses              Wikipedia dumps 1 dated 2022-05-20. LF-WikiTitles-500K
                                                                    and LF-Wikipedia-500K (full-text version of the former)
Oracle-guided training, where a frozen oracle guides the
                                                                    are datasets where, given a Wikipedia article/page, the task
training of a disciple model through the Alignment and
                                                                    is to predict the Wikipedia categories that the article should
Matching losses, enhances the disciple’s accuracy and ro-
                                                                    be tagged with. Other Wikipedia article titles connected to
bustness, by enabling implicit knowledge transfer and im-
                                                                    the original page via hyperlinks in the article are used as
proving convergence with fewer training samples. We the-
                                                                    metadata. Similarly, the task in the LF-WikiSeeAlsoTitles-
oretically analyze the impact of minimizing these losses
                                                                    320K and LF-WikiSeeAlso-320K (full text version of the
on the disciple’s accuracy and measure the sample com-
                                                                    former) datasets is, given a Wikipedia article/page, to predict
plexity under the following simplifying assumptions: (a) A
                                                                    the other Wikipedia articles to be recommended in the “See
Lipschitz-continuous binary classification loss (with con-
                                                                    Also” section. The Wikipedia categories that these articles
stant K) replacing the triplet loss, and (b) Embeddings are
                                                                    are tagged with are used as metadata in this scenario. In a
norm-bounded by B. The disciple is a dual encoder with
                      q    l            q            l              similar vein, the Amazon datasets are created from publicly
parameters θD = {θD     , θD }, where θD   ∈ F and θD   ∈G
                                                                    available Amazon Product review dumps2 . Given a product
represent the query and label tower parameters, respectively.
                                                                    title, the task in the LF-AmazonTitles-131K dataset and its
The hypothesis classes F and G have bounded complexities,
                                                                    full-text version, LF-Amazon-131K is to predict products
characterized by Rademacher constants Rq and Rl . The
                                                                    that are likely to be bought together. The product category
following is our key result:
                                                                    that these products are tagged with serve as the metadata.
Theorem 1. Given MOGIC’s problem setting, if the disciple
model is trained by minimizing the oracle-guided loss L =           Implementation Details: We initialize all oracle and disci-
LAlignment + K · B · LMatching on the training set D ∼ D            ple encoders with a DistilBERT checkpoint pre-trained on
with N samples, then for some λ > 0 and any δ ∈ [0, 1],             the MS-MARCO dataset (Chen et al., 2024) and fine-tune
the following inequality holds true with probability at least       it. Table 10 in Appendix F.2 summarizes the various hyper-
1 − δ:                                                              parameters used for each dataset. We remark that MOGIC
                                                                    uses golden linkages for the metadata only at training time,
E((X,Z),y)∼D [LDisciple ] ≤ E((X,Z),y)∼D [LOracle ]                 whereas at inference time, these metadata linkages are in-
                                                s                   duced (i.e., for a new query, links to metadata are predicted
                            4K                      log( 1δ )       by the disciple). All models were trained using the PyTorch
                          +     ·(Rq + Rl ) + 2
                             N                        N             library on a machine with 4 AMD MI200 GPUs.

Proof. The proof is provided in the Appendix E.                     4.2. Results
The above theorem shows that, post oracle-guided training,          We now present the experimental results and conduct an
the disciple’s expected population loss tends to be close to        ablation study to analyze the contributions of different com-
oracle’s population loss itself, thus inheriting strong ora-        ponents of our proposed framework (cf. Appendix G.2 for
cle accuracy. This implies good training efficiency for the         further details).
proposed MOGIC framework.
                                                                    Main results on benchmark datasets: MOGIC is com-
                                                                    pared against state-of-the-art XC and dense retrieval ap-
4. Experiments and Results                                          proaches in Table 2. MOGIC leads to state-of-the-art ac-
                                                                    curacy on multiple datasets. These accuracy gains are at-
We now present the experimental setup, and results on train-
                                                                    tributed to gradient regularization from the oracle model.
ing various disciple models using the MOGIC framework.
                                                                    In particular, MOGIC (OAK) outperforms OAK by 1–2%
4.1. Datasets and Experimental Setup                                in P@1 and 2–3% in propensity-scored metrics. In addi-
                                                                    tion to OAK, MOGIC also outperforms graph-based ap-
The XML Repository (Bhatia et al., 2016) provides various           proaches such as GraphFormers (Yang et al., 2021) and
public XC datasets which have been thoroughly studied in            GraphSage (Hamilton et al., 2017) by 8%, even those these
the literature (You et al., 2019; Guo et al., 2019; Dahiya          baseline approaches are given an unfair advantage with ac-
et al., 2021; Mittal et al., 2021; Saini et al., 2021; Gupta        cess to ground-truth memory items during inference. Note
et al., 2023; Mohan et al., 2024). However, very few of             that MOGIC makes no changes to the input, but only the
them (Mohan et al., 2024; Chien et al., 2023) offer ground          training procedure is improved with the inclusion of a novel
truth metadata. To address this, we attach ground truth
                                                                       1
metadata from the original dumps to existing XC datasets.               https://dumps.wikimedia.org/enwiki//
                                                                       2
Table 9 in Appendix F.1 summarizes the dataset statistics.              https://cseweb.ucsd.edu/~jmcauley/datasets.html#
                                                                    amazon_reviews
The Wikipedia datasets were created from publicly available

                                                                6
