SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2004.14135 · ICLR · 2020

BERT Fine-tuning For Arabic Text Summarization

Khalid Elmadani, Mukhtar Elgezouli, Anas Showk

arXiv · PDF · Open in the Atlas

Code that ran

8 of 8 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; 0 honoured the contract we drafted, 1 violated it and 2 have no contract verdict; 5 failures of our instrument; 0 no recorded run), measured 2026-11-22; 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/2004.14135.json · badge: /api/ran/2004.14135.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
mukhtar-algezoli/Arabic_PreSumm canonical (classifier label)
classifier basis not recorded on the link
8 ran · 0 no recorded run
FunctionStatusWhere it lives
abs_batch_size_fn Ran
ran on a synthesized input
mukhtar-algezoli/Arabic_PreSumm/src/models/data_loader.py
code served (permissive licence) · get_code("cb2c65cc6a650510")
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 int, ndim 0, dtype family int, 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:
# - new: a list/tuple where new[0] is src and new[1] is tgt
# - count: an integer representing the batch count
# 
# The function uses:
# - len(tgt) to get the number of sentences in the target
# - Performs arithmetic operations on counts and sizes

# Create simple tensor data for src and tgt
# tgt needs to support len(), so it should be a list or tensor
src = torch.randn(2, 4)  # Small source tensor
tgt = [torch.randn(3, 4) for _ in range(5)]  # List of 5 target sequences (simulating sentences)

# new should be a tuple/list containing src and tgt
new = (src, tgt)

# count should be an integer representing batch position
count = 1

ARGS = {
    "new": new,
    "count": count
}
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 int, ndim 0, dtype family int, 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
all_gather_list Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
mukhtar-algezoli/Arabic_PreSumm/src/distributed.py
pointer only (licence: MIT); the stored copy get_code serves, from gb-kgp/MEDVOC, is pointer only (licence: NONE) · get_code("66575e439195e14f")
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 gb-kgp/MEDVOC, 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.

ext_batch_size_fn Ran
ran on a synthesized input
mukhtar-algezoli/Arabic_PreSumm/src/models/data_loader.py
code served (permissive licence) · get_code("4edda4f9c7e44864")
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 int, ndim 0, dtype family int, 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 `new` to be a list/tuple with at least 5 elements
# It accesses new[0] and new[4]
# new[0] is used as `src` and len(src) is called on it, so it should be a sequence
# new[4] is used as `labels` but not actually used in the function body

# Create a sample batch item where:
# - new[0] (src) is a sequence (list of sentences or tokens)
# - new[4] (labels) can be any value since it's not used

src = [1, 2, 3, 4, 5]  # A sequence of 5 elements (representing sentences or tokens)
labels = torch.tensor([0, 1])  # Labels tensor (not used in function but accessed)

# new should be a list/tuple with at least 5 elements
new = [src, None, None, None, labels]

# count is the second parameter - an integer representing batch count
count = 1

ARGS = {
    "new": new,
    "count": count
}
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 int, ndim 0, dtype family int, 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
has_repeat Ran
ran; our contract draft was wrong, not the code
mukhtar-algezoli/Arabic_PreSumm/src/post_stats.py
pointer only (licence: MIT); the stored copy get_code serves, from gb-kgp/MEDVOC, is pointer only (licence: NONE) · get_code("7b7669755eae20fe")
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 gb-kgp/MEDVOC, 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.

is_master Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
mukhtar-algezoli/Arabic_PreSumm/src/distributed.py
pointer only (licence: MIT); the stored copy get_code serves, from gb-kgp/MEDVOC, is pointer only (licence: NONE) · get_code("b80220994c939e73")
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 gb-kgp/MEDVOC, 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.

n_grams Ran
ran; our contract draft was wrong, not the code
mukhtar-algezoli/Arabic_PreSumm/src/post_stats.py
pointer only (licence: MIT); the stored copy get_code serves, from gb-kgp/MEDVOC, is pointer only (licence: NONE) · get_code("c3fcc4e906d8ecbd")
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 gb-kgp/MEDVOC, 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.

rouge_results_to_str Ran
ran; our contract draft was wrong, not the code
mukhtar-algezoli/Arabic_PreSumm/src/cal_rouge.py
pointer only (licence: MIT); the stored copy get_code serves, from gb-kgp/MEDVOC, is pointer only (licence: NONE) · get_code("14b39c4dc7a42e40")
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 gb-kgp/MEDVOC, 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.

str2bool Ran
ran, violated the contract we drafted
mukhtar-algezoli/Arabic_PreSumm/src/post_stats.py
code served (permissive licence) · get_code("f017532fc389cbfe")
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 bool, 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 argparse

def str2bool(v):
    if v.lower() in ('yes', 'true', 't', 'y', '1'):
        return True
    elif v.lower() in ('no', 'false', 'f', 'n', '0'):
        return False
    else:
        raise argparse.ArgumentTypeError('Boolean value expected.')

# Setup code to construct valid arguments
ARGS = {
    'v': 'true'
}
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 bool, 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

Also present in other papers' code

Of 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 distinct functions with an identity, 8 are also present in other papers whose code we hold (8 with at least one paper dated earlier, 0 the same month, 8 later) and 0 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
str2bool 82 other papers
34 dated earlier, 48 later
1510.03055 (2015-10)
A Diversity-Promoting Objective Function for Neural Conversation Models
1703.06490 (2017-03)
Generating Multi-label Discrete Patient Records using Generative Adversarial Networks
1710.10467 (2017-10)
Generalized End-to-End Loss for Speaker Verification
and 79 more not named here
all_gather_list 5 other papers
1 dated earlier, 4 later
1908.08345 (2019-08)
Text Summarization with Pretrained Encoders
aaai_16089 (2021 (year only))
Automated Lay Language Summarization of Biomedical Scientific Reviews
2109.04084 (2021-09)
Thinking Clearly, Talking Fast: Concept-Guided Non-Autoregressive Generation for Open-Domain Dialogue Systems
and 2 more not named here
is_master 5 other papers
1 dated earlier, 4 later
1908.08345 (2019-08)
Text Summarization with Pretrained Encoders
aaai_16089 (2021 (year only))
Automated Lay Language Summarization of Biomedical Scientific Reviews
2109.04084 (2021-09)
Thinking Clearly, Talking Fast: Concept-Guided Non-Autoregressive Generation for Open-Domain Dialogue Systems
and 2 more not named here
rouge_results_to_str 5 other papers
3 dated earlier, 2 later
1905.13164 (2019-05)
Hierarchical Transformers for Multi-Document Summarization
1908.08345 (2019-08)
Text Summarization with Pretrained Encoders
1910.14142 (2019-10)
Discourse-Aware Neural Extractive Text Summarization
and 2 more not named here
has_repeat 3 other papers
1 dated earlier, 2 later
1908.08345 (2019-08)
Text Summarization with Pretrained Encoders
aaai_16089 (2021 (year only))
Automated Lay Language Summarization of Biomedical Scientific Reviews
2405.04163 (2024-05)
MEDVOC: Vocabulary Adaptation for Fine-tuning Pre-trained Language Models on Medical Text Summarization
n_grams 3 other papers
1 dated earlier, 2 later
1908.08345 (2019-08)
Text Summarization with Pretrained Encoders
aaai_16089 (2021 (year only))
Automated Lay Language Summarization of Biomedical Scientific Reviews
2405.04163 (2024-05)
MEDVOC: Vocabulary Adaptation for Fine-tuning Pre-trained Language Models on Medical Text Summarization
abs_batch_size_fn 2 other papers
1 dated earlier, 1 later
1908.08345 (2019-08)
Text Summarization with Pretrained Encoders
aaai_16089 (2021 (year only))
Automated Lay Language Summarization of Biomedical Scientific Reviews
ext_batch_size_fn 2 other papers
1 dated earlier, 1 later
1908.08345 (2019-08)
Text Summarization with Pretrained Encoders
aaai_16089 (2021 (year only))
Automated Lay Language Summarization of Biomedical Scientific Reviews

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-22.

Repositories linked to this paper

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

Abstract

Fine-tuning a pretrained BERT model is the state of the art method for extractive/abstractive text summarization, in this paper we showcase how this finetuning method can be applied to the Arabic language to both construct the first documented model for abstractive Arabic text summarization and show its performance in Arabic extractive summarization. Our model works with multilingual BERT (as Arabic language does not have a pretrained BERT of its own). We show its performance in English corpus rst before applying it to Arabic corpora in both extractive and abstractive tasks. 1

For agents

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

get_harvested_code_for_paper("2004.14135")
get_code_for_paper("2004.14135")
have("2004.14135")

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

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

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

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

Connect an agent — have() is free.