SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2211.05414 · 2022

ADEPT: A DEbiasing PrompT Framework

arXiv · PDF · Open in the Atlas

Code that ran

8 of 13 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 7 failures of our instrument; 5 no recorded run), measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2211.05414.json · badge: /api/ran/2211.05414.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
EmpathYang/ADEPT canonical (classifier label)
classifier basis not recorded on the link
8 ran · 5 no recorded run
FunctionStatusWhere it lives
build_relative_position Ran
ran, honoured the contract we drafted
EmpathYang/ADEPT/model/deberta.py
code served (permissive licence) · get_code("00b3090f89b698e1")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 3, dtype family int, shape (1, 4, 3) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

ARGS = {
    "query_size": 4,
    "key_size": 3,
    "device": torch.device("cpu")
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 3, dtype family int, shape (1, 4, 3) — shape (1, 4, 3) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
c2p_dynamic_expand Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
EmpathYang/ADEPT/model/deberta.py
code served (permissive licence) · get_code("ea37553c09194184")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 4, dtype family float, shape (2, 3, 4, 5) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Analyze the function:
# - c2p_pos: needs .expand() method, so it's a tensor
# - query_layer: needs .size(0), .size(1), .size(2) methods, so it's a tensor
# - relative_pos: needs .size(-1) method, so it's a tensor

# The expand call uses query_layer.size(0), query_layer.size(1), query_layer.size(2), relative_pos.size(-1)
# So we need:
# - query_layer: shape [batch_size, seq_len, hidden_dim, ...]
# - relative_pos: shape [..., rel_dim]
# - c2p_pos: needs to be broadcastable to [batch_size, seq_len, hidden_dim, rel_dim]

# Using distinct sizes for clarity:
batch_size = 2
seq_len = 3
hidden_dim = 4
rel_dim = 5

query_layer = torch.randn(batch_size, seq_len, hidden_dim)
relative_pos = torch.randn(2, 3, rel_dim)
c2p_pos = torch.randn(1, 1, 1, rel_dim)  # broadcastable tensor

ARGS = {
    "c2p_pos": c2p_pos,
    "query_layer": query_layer,
    "relative_pos": relative_pos,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, dtype family float, shape (2, 3, 4, 5) — shape (2, 3, 4, 5) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
calculate_group_to_group_relative_distance_asymmetric Ran
ran; our contract draft was wrong, not the code
EmpathYang/ADEPT/distance.py
pointer only (licence: MIT); the stored copy get_code serves, from Xujxyang/Fairness-NC-main, is pointer only (licence: NONE) · get_code("31501071e57d43c4")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from Xujxyang/Fairness-NC-main, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

calculate_group_to_group_relative_distance_asymmetric_test Ran
ran; our contract draft was wrong, not the code
EmpathYang/ADEPT/distance.py
pointer only (licence: MIT); the stored copy get_code serves, from Xujxyang/Fairness-NC-main, is pointer only (licence: NONE) · get_code("d6b5586516edd277")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from Xujxyang/Fairness-NC-main, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

calculate_group_to_one_relative_distance_asymmetric_test Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
EmpathYang/ADEPT/distance.py
pointer only (licence: MIT); the stored copy get_code serves, from Xujxyang/Fairness-NC-main, is pointer only (licence: NONE) · get_code("d73ab432982f8191")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from Xujxyang/Fairness-NC-main, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

create_dataset Ran
ran; our contract draft was wrong, not the code
EmpathYang/ADEPT/debias.py
code served (permissive licence) · get_code("5f516b6aaad9acb6")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# Create a simple dataset class that stores data and labels
class SimpleDataset:
    def __init__(self, data, label):
        self.data = data
        self.label = label

# Create sample data structure
data = {
    'example': {
        'feature_a': torch.randn(2, 4),
        'feature_b': torch.randn(2, 3),
        'feature_c': torch.randn(2, 5),
    },
    'label': {
        'feature_a': torch.randint(0, 2, (2,)),
        'feature_b': None,  # feature_b has no label
    }
}

# Define the dataset callable
dataset = SimpleDataset

ARGS = {
    'data': data,
    'dataset': dataset,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
load_and_cache_examples Ran
ran; our contract draft was wrong, not the code
EmpathYang/ADEPT/debias.py
pointer only (licence: MIT); the stored copy get_code serves, from Xujxyang/Fairness-NC-main, is pointer only (licence: NONE) · get_code("f46fa5e6d0948125")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from Xujxyang/Fairness-NC-main, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

split_data Ran
ran; our contract draft was wrong, not the code
EmpathYang/ADEPT/debias.py
code served (permissive licence) · get_code("d0dd7e697cd0cfba")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import random

# Set seed for reproducibility
random.seed(0)

# Create sample data for attributes
# We need lists of examples and labels for multiple attributes
attributes_examples = [
    ['example1_attr0', 'example2_attr0', 'example3_attr0', 'example4_attr0', 'example5_attr0'],
    ['example1_attr1', 'example2_attr1', 'example3_attr1', 'example4_attr1', 'example5_attr1'],
]

attributes_labels = [
    [0, 1, 0, 1, 0],
    [1, 0, 1, 0, 1],
]

# Create sample neutral data
neutral_examples = ['neutral1', 'neutral2', 'neutral3', 'neutral4', 'neutral5']
neutral_labels = [0, 1, 0, 1, 0]

# Create args object with dev_data_size attribute
class Args:
    def __init__(self):
        self.dev_data_size = 2

args = Args()

ARGS = {
    'attributes_examples': attributes_examples,
    'attributes_labels': attributes_labels,
    'neutral_examples': neutral_examples,
    'neutral_labels': neutral_labels,
    'args': args,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
build_relative_position Not yet run
unverified (harvested, no recorded run)
EmpathYang/ADEPT/model/debertaV2.py
code served (permissive licence) · get_code("0df39601dd0d5745")
How it ran

no invocation recorded.

get_mask Not yet run
unverified (harvested, no recorded run)
EmpathYang/ADEPT/model/deberta.py
code served (permissive licence) · get_code("05732f1a5126672d")
How it ran

no invocation recorded.

get_model_deprecated Not yet run
unverified (harvested, no recorded run)
EmpathYang/ADEPT/model/utils.py
code served (permissive licence) · get_code("06439dc4fc5e69b0")
How it ran

no invocation recorded.

make_log_bucket_position Not yet run
unverified (harvested, no recorded run)
EmpathYang/ADEPT/model/debertaV2.py
code served (permissive licence) · get_code("29371b9c270911e1")
How it ran

no invocation recorded.

prepare_tokenizer Not yet run
unverified (harvested, no recorded run)
EmpathYang/ADEPT/collect_sentences.py
code served (permissive licence) · get_code("8caa8979bca6e6cd")
How it ran

no invocation recorded.

Also present in other papers' code

Of 13 samples lifted from this paper's linked repositories, 13 carry a function identity and 0 do not. Of the 13 distinct functions with an identity, 12 are also present in other papers whose code we hold (8 with at least one paper dated earlier, 0 the same month, 12 later) and 1 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
get_mask 10 other papers
6 dated earlier, 4 later
1906.03158 (2019-06)
Matching the Blanks: Distributional Similarity for Relation Learning
2110.00976 (2021-10)
LexGLUE: A Benchmark Dataset for Legal Language Understanding in English
2206.08155 (2022-06)
Zero-Shot Video Question Answering via Frozen Bidirectional Language Models
and 7 more not named here
build_relative_position 7 other papers
3 dated earlier, 4 later
2206.08155 (2022-06)
Zero-Shot Video Question Answering via Frozen Bidirectional Language Models
2207.07087 (2022-07)
Parameter-Efficient Prompt Tuning Makes Generalized and Calibrated Neural Text Retrievers
2210.12360 (2022-10)
Prompt-Tuning Can Be Much Better Than Fine-Tuning on Cross-lingual Understanding With Multilingual Language Models
and 4 more not named here
make_log_bucket_position 7 other papers
4 dated earlier, 3 later · 1 only as an assembly brick
2006.03654 (2020-06)
DeBERTa: Decoding-enhanced BERT with Disentangled Attention
2206.08155 (2022-06)
Zero-Shot Video Question Answering via Frozen Bidirectional Language Models
2207.07087 (2022-07)
Parameter-Efficient Prompt Tuning Makes Generalized and Calibrated Neural Text Retrievers
and 4 more not named here
build_relative_position 6 other papers
4 dated earlier, 2 later
2006.03654 (2020-06)
DeBERTa: Decoding-enhanced BERT with Disentangled Attention
2207.07087 (2022-07)
Parameter-Efficient Prompt Tuning Makes Generalized and Calibrated Neural Text Retrievers
2208.10160 (2022-08)
PANDA: Prompt Transfer Meets Knowledge Distillation for Efficient Model Adaptation
and 3 more not named here
c2p_dynamic_expand 6 other papers
4 dated earlier, 2 later
2006.03654 (2020-06)
DeBERTa: Decoding-enhanced BERT with Disentangled Attention
2207.07087 (2022-07)
Parameter-Efficient Prompt Tuning Makes Generalized and Calibrated Neural Text Retrievers
2208.10160 (2022-08)
PANDA: Prompt Transfer Meets Knowledge Distillation for Efficient Model Adaptation
and 3 more not named here
get_model_deprecated 4 other papers
2 dated earlier, 2 later
2207.07087 (2022-07)
Parameter-Efficient Prompt Tuning Makes Generalized and Calibrated Neural Text Retrievers
2210.12360 (2022-10)
Prompt-Tuning Can Be Much Better Than Fine-Tuning on Cross-lingual Understanding With Multilingual Language Models
2023.acl-long.750 (2023 (year only))
MVP-Tuning: Multi-View Knowledge Retrieval with Prompt Tuning for Commonsense Reasoning
and 1 more not named here
create_dataset 2 other papers
1 dated earlier, 1 later
2101.09523 (2021-01)
Debiasing Pre-trained Contextualised Embeddings
2410.04472 (2024-10)
Collapsed Language Models Promote Fairness
split_data 2 other papers
1 dated earlier, 1 later
2101.09523 (2021-01)
Debiasing Pre-trained Contextualised Embeddings
2410.04472 (2024-10)
Collapsed Language Models Promote Fairness
calculate_group_to_group_relative_distance_asymmetric 1 other paper
1 later
2410.04472 (2024-10)
Collapsed Language Models Promote Fairness
calculate_group_to_group_relative_distance_asymmetric_test 1 other paper
1 later
2410.04472 (2024-10)
Collapsed Language Models Promote Fairness
calculate_group_to_one_relative_distance_asymmetric_test 1 other paper
1 later
2410.04472 (2024-10)
Collapsed Language Models Promote Fairness
load_and_cache_examples 1 other paper
1 later
2410.04472 (2024-10)
Collapsed Language Models Promote Fairness

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Several works have proven that finetuning is an applicable approach for debiasing contextualized word embeddings. Similarly, discrete prompts with semantic meanings have shown to be effective in debiasing tasks. With unfixed mathematical representation at the token level, continuous prompts usually surpass discrete ones at providing a pre-trained language model (PLM) with additional task-specific information. Despite this, relatively few efforts have been made to debias PLMs by prompt tuning with continuous prompts compared to its discrete counterpart. Furthermore, for most debiasing methods that alter a PLM's original parameters, a major problem is the need to not only decrease the bias in the PLM but also to ensure that the PLM does not lose its representation ability. Finetuning methods typically have a hard time maintaining this balance, as they tend to violently remove meanings of attribute words. In this paper, we propose ADEPT, a method to debias PLMs using prompt tuning while maintaining the delicate balance between removing biases and ensuring representation ability. To achieve this, we propose a new training criterion inspired by manifold learning and equip it with an explicit debiasing term to optimize prompt tuning. In addition, we conduct several experiments with regard to the reliability, quality, and quantity of a previously proposed attribute training corpus in order to obtain a clearer prototype of a certain attribute, which indicates the attribute's position and relative distances to other words on the manifold. We evaluate ADEPT on several widely acknowledged debiasing benchmarks and downstream tasks, and find that it achieves competitive results while maintaining (and in some cases even improving) the PLM's representation ability. We further visualize words' correlation before and after debiasing a PLM, and give some possible explanations for the visible effects.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2211.05414")
get_code_for_paper("2211.05414")
have("2211.05414")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2211.05414.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2211.05414.svg)](https://syntology.ai/paper/2211.05414)

Connect an agent — have() is free.