• Home
  • Search
  • WPN: An Unlearning Method Based on N-pair Contrastive Learning in Language Models
  • Cite Icon2
  • https://doi.org/10.3233/faia240662Copy DOI Icon

WPN: An Unlearning Method Based on N-pair Contrastive Learning in Language Models

Show More
  • Abstract
  • Literature Map
  • Citations
  • Similar Papers
Abstract

Generative language models (LMs) offer numerous advantages but may produce inappropriate or harmful outputs due to the harmful knowledge acquired during pre-training. This knowledge often manifests as undesirable correspondences, such as “harmful prompts” leading to “harmful outputs,” which our research aims to mitigate through unlearning techniques.However, existing unlearning methods based on gradient ascent can significantly impair the performance of LMs. To address this issue, we propose a novel approach called Weighted Positional N-pair (WPN) Learning, which leverages position-weighted mean pooling within an n-pair contrastive learning framework. WPN is designed to modify the output distribution of LMs by eliminating specific harmful outputs (e.g., replacing toxic responses with neutral ones), thereby transforming the model’s behavior from “harmful prompt-harmful output” to “harmful prompt-harmless response”. Experiments on OPT and GPT-NEO LMs show that WPN effectively reduces the proportion of harmful responses, achieving a harmless rate of up to 95.8% while maintaining stable performance on nine common benchmarks (with less than 2% degradation on average). Moreover, we provide empirical evidence to demonstrate WPN’s ability to weaken the harmful correspondences in terms of generalizability and robustness, as evaluated on out-of-distribution test sets and under adversarial attacks.

Similar Papers
  • PDF
  • Research Article
  • Citations76

ChatGPT and the Generation of Digitally Born “Knowledge”: How Does a Generative AI Language Model Interpret Cultural Heritage Values?

  • Sep 18, 2023
  • Knowledge
  • Dirk H R Spennemann
  • Research Article
  • Citations1

Guardians of digital safety: benchmarking large language models in the fight against online toxicity

  • Dec 13, 2025
  • Journal of Big Data
  • Nouar Aldahoul +3
  • Conference Article
  • Citations6

PromptKD: Distilling Student-Friendly Knowledge for Generative Language Models via Prompt Tuning

  • Jan 01, 2024
  • Gyeongman Kim +2
  • Research Article
  • Citations7

The Generalization and Robustness of Transformer-Based Language Models on Commonsense Reasoning

  • Mar 24, 2024
  • Proceedings of the AAAI Conference on Artificial Intelligence
  • Ke Shen
  • Research Article

Abstract C118: Design of programmable peptide-guided oncoprotein degraders via generative language models

  • Dec 01, 2023
  • Molecular Cancer Therapeutics
  • Suhaas Bhat +8
  • PDF
  • Research Article
  • Citations8

Genre: generative multi-turn question answering with contrastive learning for entity–relation extraction

  • Feb 08, 2024
  • Complex & Intelligent Systems
  • Lulu Wang +7
  • Conference Article
  • Citations22

Language model adaptation via minimum discrimination information

  • May 09, 1995
  • P.S Rao +2
  • Research Article

Research on the potential of generative artificial intelligence for providing expert-level evaluative feed-back in open-ended mathematical problems assessment

  • Dec 30, 2025
  • Science for Education Today
  • Marina Alexandrovna Lukoyanova +4
  • Conference Article
  • Citations19

A Generalized Language Model as the Combination of Skipped n-grams and Modified Kneser Ney Smoothing

  • Jan 01, 2014
  • Rene Pickhardt +5
  • Book Chapter
  • Citations1

Planning with Logical Graph-Based Language Model for Instruction Generation

  • Oct 16, 2024
  • Frontiers in artificial intelligence and applications
  • Fan Zhang +2
  • PDF
  • Preprint Article

Evaluation of Generative Language Models in Personalizing Medical Information: Instrument Validation Study (Preprint)

  • Nov 08, 2023
  • Aidin Spina +5
  • Conference Article

Prompting and Fine-tuning Pre-trained Generative Language Models

  • Sep 25, 2023
  • Johny Moreira +2
  • PDF
  • Research Article
  • Citations9

A case study on using a large language model to analyze continuous glucose monitoring data

  • Jan 07, 2025
  • Scientific Reports
  • Elizabeth Healey +4
  • Book Chapter
  • Citations14

Hypergeometric Language Model and Zipf-Like Scoring Function for Web Document Similarity Retrieval

  • Jan 01, 2010
  • Felipe Bravo-Marquez +3
  • PDF
  • Conference Article
  • Citations21

Looking for a Handsome Carpenter! Debiasing GPT-3 Job Advertisements

  • Jan 01, 2022
  • Conrad Borchers +6
Cactus Communications logo

Copyright 2026 Cactus Communications. All rights reserved.