SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · aaai_17659 · AAAI · 2021

Context-Guided BERT for Targeted Aspect-Based Sentiment Analysis

Zhengxuan Wu, Desmond Ong

Open in the Atlas

Code that ran

13 of 18 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; 3 honoured the contract we drafted, 0 violated it and 7 have no contract verdict; 3 failures of our instrument; 5 no recorded run), measured 2026-11-23; 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/aaai_17659.json · badge: /api/ran/aaai_17659.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
frankaging/Quasi-Attention-ABSA canonical (classifier label)
classifier basis: census
13 ran · 5 no recorded run
FunctionStatusWhere it lives
convert_examples_to_features Ran
ran on a synthesized input
frankaging/Quasi-Attention-ABSA/code/analyze.py
code served (permissive licence) · get_code("24279805bb518dca")
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 list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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
from transformers import BertTokenizer

# Create a simple example class to represent data
class Example:
    def __init__(self, text_a, text_b, label):
        self.text_a = text_a
        self.text_b = text_b
        self.label = label

# Create a minimal tokenizer stand-in
class SimpleTokenizer:
    def __init__(self):
        self.vocab = {
            '[CLS]': 101,
            '[SEP]': 102,
            '[PAD]': 0,
            'hello': 1000,
            'world': 1001,
            'test': 1002,
            'example': 1003,
            'good': 1004,
            'bad': 1005,
            'location': 1006,
            '-': 1007,
            '1': 1008,
            '2': 1009,
            'general': 1010,
            'price': 1011,
            'safety': 1012,
            'transit': 1013,
        }
    
    def tokenize(self, text):
        if text is None:
            return None
        # Simple tokenization: split by spaces and convert to tokens
        words = text.lower().split()
        tokens = []
        for word in words:
            if word in self.vocab:
                tokens.append(word)
            else:
                # For unknown words, break into characters
                for char in word:
                    if char not in self.vocab:
                        tokens.append('[UNK]')
                    else:
                        tokens.append(char)
        return tokens
    
    def convert_tokens_to_ids(self, tokens):
        ids = []
        for token in tokens:
            if token in self.vocab:
                ids.append(self.vocab[token])
            else:
                ids.append(0)  # Default to padding token
        return ids

# Create example data
examples = [
    Example(text_a="hello world", text_b="location - 1 - general", label="positive"),
    Example(text_a="test example", text_b="location - 1 - price", label="negative"),
]

# Create label list
label_list = ["positive", "negative"]

# Set parameters
max_seq_length = 32
max_context_length = 16
context_standalone = False

# Create tokenizer
tokenizer = SimpleTokenizer()

ARGS = {
    'examples': examples,
    'label_list': label_list,
    'max_seq_length': max_seq_length,
    'tokenizer': tokenizer,
    'max_context_length': max_context_length,
    'context_standalone': context_standalone,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, tqdm, transformers — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
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
convert_to_unicode Ran
ran; our contract draft was wrong, not the code
frankaging/Quasi-Attention-ABSA/code/util/tokenization.py
pointer only (licence: MIT); the stored copy get_code serves, from huawei-noah/Pretrained-Language-Model, is pointer only (licence: NONE) · get_code("1923fc05163d207d")
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 huawei-noah/Pretrained-Language-Model, 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.

gelu Ran
ran, honoured the contract we drafted
frankaging/Quasi-Attention-ABSA/code/model/BERT.py
pointer only (licence: MIT); the stored copy get_code serves, from shmsw25/qa-hard-em, is pointer only (licence: NONE) · get_code("40e9fee2e0b7e278")
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 shmsw25/qa-hard-em, 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.

get_activation Ran
ran on a synthesized input
frankaging/Quasi-Attention-ABSA/code/model/QACGBERT.py
code served (permissive licence) · get_code("4a90fd305083ef9f")
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 function. 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 torch.nn as nn
import collections

torch.manual_seed(0)

# The function get_activation takes a single parameter: name (a string)
# It returns a hook function that will be called with (model, input, output)
# The hook stores the output in func_activations dict

# To test this, we need to:
# 1. Create a simple model
# 2. Register the hook
# 3. Call the model to trigger the hook

class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        return self.linear(x)

# Create a model instance
model = SimpleModel()

# The function parameter is just a name (string)
name = "test_activation"

# Set up the arguments dict
ARGS = {
    "name": name
}
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 function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
get_activation_multi Ran
ran on a synthesized input
frankaging/Quasi-Attention-ABSA/code/model/QACGBERT.py
code served (permissive licence) · get_code("99e0619cb4ea3c0d")
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 function. 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 torch.nn as nn
import collections

torch.manual_seed(0)

# The function get_activation_multi takes one parameter: name
# It returns a hook function that will be used with model.register_forward_hook()
# The hook receives (model, input, output) and stores output in func_activations[name]

# Create a simple model to test with
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        return self.linear(x)

# Create a small tensor for testing
model = SimpleModel()
x = torch.randn(2, 4)

# The name parameter is a string that will be used as a key in func_activations dict
name = "test_activation"

ARGS = {
    "name": name
}
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 function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
get_inputivation Ran
ran on a synthesized input
frankaging/Quasi-Attention-ABSA/code/model/QACGBERT.py
code served (permissive licence) · get_code("b19455903d4a93e8")
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 function. 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 torch.nn as nn
import collections

torch.manual_seed(0)

# Define the function being tested
func_inputs = collections.defaultdict(list)

def get_inputivation(name):
    def hook(model, input, output):
        func_inputs[name] = [_in for _in in input]
    return hook

# Create a simple model to use with the hook
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        return self.linear(x)

# Create test inputs
model = SimpleModel()
name = "test_layer"

# Define ARGS mapping all parameters
ARGS = {
    "name": name
}
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 function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
l_lap_grad Ran
ran on a synthesized input
frankaging/Quasi-Attention-ABSA/code/util/lrp.py
code served (permissive licence) · get_code("0a38938169c15c89")
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 float, shape (2, 3, 4) 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
import torch.nn as nn

torch.manual_seed(0)

# Analyze what the function needs:
# - post_hs: used in autograd.grad as the output, and in post_hs + eps
# - pre_hs: used in autograd.grad as the input that needs gradients
# - post_A: used in division and sum operations
# - eps, bias_factor, debug: scalars/flags

# The key constraint: autograd.grad(post_hs, pre_hs, ...) requires:
# 1. post_hs must be differentiable w.r.t. pre_hs
# 2. pre_hs must have requires_grad=True

# Create pre_hs with requires_grad
pre_hs = torch.randn(2, 3, 4, requires_grad=True)

# Create post_hs that depends on pre_hs (so gradient can flow)
# Simple linear transformation to ensure differentiability
post_hs = pre_hs.sum(dim=1, keepdim=True)  # shape: (2, 1, 4)

# Create post_A with compatible shape for operations with post_hs
# post_A is divided by post_hs_err and summed along dim=-1
post_A = torch.randn(2, 1, 4)

ARGS = {
    "post_hs": post_hs,
    "pre_hs": pre_hs,
    "post_A": post_A,
    "eps": 1e-07,
    "bias_factor": 1.0,
    "debug": False,
}
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 float, shape (2, 3, 4) — shape (2, 3, 4) 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
mask Ran
ran on a synthesized input
frankaging/Quasi-Attention-ABSA/code/model/CGBERT.py
code served (permissive licence) · get_code("282df37089346a8f")
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 2, dtype family float, shape (2, 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)

ARGS = {
    "seq_len": [3, 5]
}
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 2, dtype family float, shape (2, 5) — shape (2, 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
printable_text Ran
ran; our contract draft was wrong, not the code
frankaging/Quasi-Attention-ABSA/code/util/tokenization.py
code served (permissive licence) · get_code("0e5615f8994003cf")
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 str. 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 six

# The function takes a single parameter 'text' which can be:
# - str (works in both Python 2 and 3)
# - bytes (in Python 3, decoded to utf-8)
# - unicode (in Python 2, encoded to utf-8)

# Since we're running on Python 3, we'll test with a string
text_input = "Hello, World!"

ARGS = {
    "text": text_input
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
six — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
sentihood_macro_F1 Ran
ran on a synthesized input
frankaging/Quasi-Attention-ABSA/code/util/evaluation.py
code served (permissive licence) · get_code("42b4a03b2835ee2e")
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 float, ndim 0, dtype family float, shape () 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
import numpy as np

torch.manual_seed(0)

# The function expects two list-like arguments:
# y_true and y_pred, each containing binary/multi-class predictions
# The function processes them in groups of 4 (iterates over len // 4 groups)
# Each element is checked with != 0 to determine membership in a set

# Create sample predictions and ground truth
# Using 8 elements (2 samples, 4 aspects each)
y_pred = [0, 1, 0, 1,      # Sample 1: aspects 1 and 3 predicted
          1, 1, 0, 0]       # Sample 2: aspects 0 and 1 predicted

y_true = [0, 1, 1, 0,      # Sample 1: aspects 1 and 2 are true
          1, 0, 1, 1]       # Sample 2: aspects 0, 2, 3 are true

ARGS = {
    "y_true": y_true,
    "y_pred": y_pred
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, ndim 0, dtype family float, shape () — shape () 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
sentihood_strict_acc Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
frankaging/Quasi-Attention-ABSA/code/util/evaluation.py
pointer only (licence: MIT); the stored copy get_code serves, from anshulwadhawan/ABSA, is pointer only (licence: NONE) · get_code("367e923376717b34")
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 anshulwadhawan/ABSA, 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.

warmup_constant Ran
ran, honoured the contract we drafted
frankaging/Quasi-Attention-ABSA/code/util/optimization.py
pointer only (licence: MIT); the stored copy get_code serves, from Yueeeeeeee/Self-Supervised-QA, is pointer only (licence: NONE) · get_code("e7d542062316094a")
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 Yueeeeeeee/Self-Supervised-QA, 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.

warmup_linear Ran
ran, honoured the contract we drafted
frankaging/Quasi-Attention-ABSA/code/util/optimization.py
code served (permissive licence) · get_code("c58d57224530d17e")
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 float, ndim 0, dtype family float, shape () 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)

# The function warmup_linear takes two parameters:
# - x: a numeric value (float) representing a position/step in training
# - warmup: a float representing the warmup threshold (default 0.002)
# 
# The function uses x and warmup in simple arithmetic comparisons and operations,
# so we just need numeric values.

ARGS = {
    "x": 0.001,
    "warmup": 0.002
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, ndim 0, dtype family float, shape () — shape () 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
BaseTrain Not yet run
unverified (harvested, no recorded run)
frankaging/Quasi-Attention-ABSA/code/analyze.py
code served (permissive licence) · get_code("1ace70ee38d21d9e")
How it ran

no invocation recorded.

a_lap_vectorize Not yet run
unverified (harvested, no recorded run)
frankaging/Quasi-Attention-ABSA/code/util/lrp.py
code served (permissive licence) · get_code("cd3323f36ce855d4")
How it ran

no invocation recorded.

load_vocab Not yet run
unverified (harvested, no recorded run)
frankaging/Quasi-Attention-ABSA/code/util/tokenization.py
code served (permissive licence) · get_code("97e01db27f6a6fd2")
How it ran

no invocation recorded.

sentihood_AUC_Acc Not yet run
unverified (harvested, no recorded run)
frankaging/Quasi-Attention-ABSA/code/util/evaluation.py
code served (permissive licence) · get_code("771e468728b122a4")
How it ran

no invocation recorded.

warmup_cosine Not yet run
unverified (harvested, no recorded run)
frankaging/Quasi-Attention-ABSA/code/util/optimization.py
pointer only (licence: MIT); the stored copy get_code serves, from Yueeeeeeee/Self-Supervised-QA, is pointer only (licence: NONE) · get_code("35f7cddf90dd05d4")
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 Yueeeeeeee/Self-Supervised-QA, 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. No invocation recorded.

Also present in other papers' code

Of 18 samples lifted from this paper's linked repositories, 18 carry a function identity and 0 do not. Of the 18 distinct functions with an identity, 8 are also present in other papers whose code we hold (7 with at least one paper dated earlier, 0 the same month, 8 later) and 10 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
gelu 198 other papers
67 dated earlier, 103 later, 28 same year, order not determinable · 32 only as an assembly brick
1408.5882 (2014-08)
Convolutional Neural Networks for Sentence Classification
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
1901.10125 (2019-01)
Glyce: Glyph-vectors for Chinese Character Representations
and 195 more not named here
convert_to_unicode 36 other papers
20 dated earlier, 14 later, 2 same year, order not determinable
1609.08144 (2016-09)
Google's Neural Machine Translation System: Bridging the Gap between Human and Machine Translation
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
1901.04085 (2019-01)
Passage Re-ranking with BERT
and 33 more not named here
printable_text 33 other papers
19 dated earlier, 11 later, 3 same year, order not determinable
1609.08144 (2016-09)
Google's Neural Machine Translation System: Bridging the Gap between Human and Machine Translation
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
1901.04085 (2019-01)
Passage Re-ranking with BERT
and 30 more not named here
warmup_constant 28 other papers
8 dated earlier, 12 later, 8 same year, order not determinable
1408.5882 (2014-08)
Convolutional Neural Networks for Sentence Classification
1903.09588 (2019-03)
Utilizing BERT for Aspect-Based Sentiment Analysis via Constructing Auxiliary Sentence
1906.01698 (2019-06)
Open Sesame: Getting Inside BERT's Linguistic Knowledge
and 25 more not named here
warmup_linear 19 other papers
14 dated earlier, 3 later, 2 same year, order not determinable
1408.5882 (2014-08)
Convolutional Neural Networks for Sentence Classification
1803.03376 (2018-03)
Learning Approximate Inference Networks for Structured Prediction
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
and 16 more not named here
warmup_cosine 17 other papers
7 dated earlier, 4 later, 6 same year, order not determinable
1408.5882 (2014-08)
Convolutional Neural Networks for Sentence Classification
1903.09588 (2019-03)
Utilizing BERT for Aspect-Based Sentiment Analysis via Constructing Auxiliary Sentence
1906.01698 (2019-06)
Open Sesame: Getting Inside BERT's Linguistic Knowledge
and 14 more not named here
sentihood_strict_acc 2 other papers
1 dated earlier, 1 later
1903.09588 (2019-03)
Utilizing BERT for Aspect-Based Sentiment Analysis via Constructing Auxiliary Sentence
2203.11702 (2022-03)
BERT-ASC: Auxiliary-Sentence Construction for Implicit Aspect Learning in Sentiment Analysis
sentihood_AUC_Acc 1 other paper
1 later
2203.11702 (2022-03)
BERT-ASC: Auxiliary-Sentence Construction for Implicit Aspect Learning in Sentiment Analysis

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

Aspect-based sentiment analysis (ABSA) and Targeted ABSA (TABSA) allow finer-grained inferences about sentiment to be drawn from the same text, depending on context. For example, a given text can have different targets (e.g., neighborhoods) and different aspects (e.g., price or safety), with different sentiment associated with each target-aspect pair. In this paper, we investigate whether adding context to self-attention models improves performance on (T)ABSA. We propose two variants of Context-Guided BERT (CG-BERT) that learn to distribute attention under different contexts. We first adapt a context-aware Transformer to produce a CG-BERT that uses context-guided softmax-attention. Next, we propose an improved Quasi-Attention CG-BERT model that learns a compositional attention that supports subtractive attention. We train both models with pretrained BERT on two (T)ABSA datasets: SentiHood and SemEval-2014 (Task 4). Both models achieve new state-of-the-art results with our QACG-BERT model having the best performance. Furthermore, we provide analyses of the impact of context in the our proposed models. Our work provides more evidence for the utility of adding context-dependencies to pretrained selfattention-based language models for context-based natural language tasks.

For agents

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

get_harvested_code_for_paper("aaai_17659")
get_code_for_paper("aaai_17659")
have("aaai_17659")

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

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

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

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

Connect an agent — have() is free.