Unsupervised Non-transferable Text Classification

Guangtao Zeng, Wei Lu · DOI

Introduction

The development of state-of-the-art deep learning models for natural language processing requires significant investment in high-quality data and massive computational resources. This high cost of entry makes trained models valuable intellectual property (IP). To prevent unauthorized redistribution or use in specific domains, researchers have developed Non-transferable Learning (NTL). NTL aims to maintain a model's accuracy on a designated source domain while intentionally degrading its performance on unauthorized "target" domains.

However, traditional NTL methods suffer from two primary limitations: a reliance on labeled data from the target domain and the irreversibility of the performance degradation. This paper introduces Unsupervised Non-Transferable Learning (UNTL), a novel framework that protects models without requiring target-domain labels and provides a "secret key" mechanism for authorized performance recovery.

The UNTL Framework

UNTL operates on the principle of feature distribution manipulation. Instead of relying on task-specific labels to "break" the model, UNTL focuses on the underlying data distributions. The goal is to push the hidden representations of source and target data as far apart as possible, ensuring that the classification head—trained on source features—cannot generalize to the target features.

Core Components

To achieve this separation, the authors utilize two primary mechanisms:

  1. Maximum Mean Discrepancy (MMD): This statistical tool measures the distance between two probability distributions. In UNTL, MMD is used as a loss function to maximize the distance between the feature representations of the source and target domains.
  2. Domain Classifier (DC): While MMD addresses the average distance between distributions, it often fails to create a definitive boundary. The inclusion of a Domain Classifier—a module trained to distinguish between source and target inputs—forces the model to learn highly distinct, non-overlapping features for different domains. This "sharpens" the non-transferability effect.

Authorized Recovery via Secret Keys

A unique contribution of this work is the ability to restore model performance for authorized users. This is achieved through a "secret key" that maps target features back into the source distribution space. The authors explore two variants:

  • Prompt-based Secret Key: Authorized users prepend a specific, secret text string to their inputs. The model is trained to recognize this prompt and shift the resulting features toward the source distribution. While intuitive, these discrete prompts are less flexible than continuous methods.
  • Adapter-based Secret Key: This method involves inserting a small, trainable "adapter" module (approximately 99k parameters) into the model. This adapter acts as a continuous key, transforming target-domain embeddings into "source-like" embeddings. Because adapters are jointly trained within the embedding space, they provide a more robust bridge for performance recovery without compromising source domain accuracy.

Experimental Evaluation

The researchers evaluated UNTL using two major benchmarks:

  • MultiNLI: A natural language inference dataset spanning five domains: slate (SL), telephone (TE), government (GO), travel (TR), and fiction (FI).
  • Amazon Reviews: A sentiment analysis dataset covering Books, DVD, Electronics, and Kitchen domains, tested in both binary and ternary (positive, neutral, negative) configurations.

Key Results

  • Effective Degradation: UNTL successfully reduced target domain accuracy to near-random levels. On the MultiNLI dataset, performance dropped from a baseline of 70-80% to between 32.6% and 40.0%.
  • Source Integrity: The protection mechanism had a negligible impact on the authorized source domain, with accuracy typically dropping by only ~1%.
  • Performance Recovery: The Adapter-based Secret Key proved highly effective, restoring target domain performance to levels nearly identical to an unprotected model. It outperformed the prompt-based approach by approximately 7% in recovery accuracy, highlighting the advantage of continuous-space transformations.

Discussion and Future Work

The most significant insight of this research is that labels are not a prerequisite for model protection. By focusing on data distributions, UNTL allows developers to protect their IP against target domains even when labeled data is unavailable.

However, the authors note a challenge regarding Unbalanced Labels in evaluation. If a target domain is heavily biased (e.g., 90% positive reviews), a "broken" model might still appear accurate by simply predicting the majority class. Future research will focus on more robust evaluation metrics and the implementation of multi-level access, where different keys unlock different tiers of model capability or specific data subsets.

Summary updated

BibTeX
@inproceedings{zeng2022unsupervised,
  author = {Guangtao Zeng and Wei Lu},
  title = {{Unsupervised Non-transferable Text Classification}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2022},
  url = {https://openreview.net/forum?id=0I7qV2pyBCG},
}
Figure