# SimCDL: A Simple Framework for Contrastive Dictionary Learning
## 1 Introduction
Several strategies are available, such as Momentum Contrast (MoCo) [8], Pretext-Invariant Representation Learning (PIRL) [9], and a Simple Framework for Contrastive Learning of Visual Representations (SimCLR) [10]. MoCo is a framework that uses a queue and a moving average encoder to learn visual representations. In PIRL, invariant representations are learned by solving pretext tasks. SimCLR uses a simple contrastive loss function to learn visual representations. The simple contrastive loss is applied by learning similar representations for augmented versions of the same input image while discriminating representations of dissimilar images. _Contributions._ In this paper, we adapt the SimCLR framework to the dictionary learning problem, with the purpose of obtaining more incoherent atoms that are better adapted for DL applications (classification and anomaly detection). The learned atoms can then be used to improve sparse representations, leading to smaller representation errors and better discriminative performances. The main contribution is reconfiguring the initial SimCRL algorithm in the context of dictionary learning. This includes the substitution of the base encoder network with a dictionary learning problem. The network projection head is no longer used since the encoding and projection are performed using the OMP algorithm. The augmentation procedure was adapted for n-dimensional vectors. For this, we only used four elementary operations, which were changed in the context of dictionary learning. This self-supervised framework is capable of building more incoherent dictionaries, which facilitates a better representation error and has an impact on further supervised and semi-supervised applications. The use of SimCLR can be beneficial for dictionary learning applications from different perspectives. In many real-world applications, large amounts of unlabeled data are used. SimCLR can learn robust feature representations from the unlabeled data, which can then be used to initialize the dictionary. This initialization can improve the performance of downstream tasks, such as classification, anomaly detection, or clustering, even when labeled data are scarce. On the other hand, the initialization of the dictionary using the SimCLR framework can boost the optimization process. The learning process can start from a more informative and structured point, potentially leading to faster convergence and more stable solutions. This not only enhances the efficiency and effectiveness of the learning process, but also improves the interpretability and stability of the resulting model. _The content of this paper is organized as follows. In Section 2, we introduce the self-supervised contrastive framework in the context of dictionary learning. The augmentation methods required for this framework are included in Section 3. In Section 4, we include several algorithms that have been used for our experiments. These algorithms [11] also aim to respect a discriminatory representation using contrastive learning. Our tests demonstrate that the use of the SimCLR framework is beneficial for dictionary learning algorithms that promote contrastive learning. We then continue with the presentations of our experimentsin Section 5. We conducted tests on two mainstream tasks, namely classification (Section 5.1) and anomaly detection (Section 5.2). In the last section, we end up with some conclusions.