Papers › G-DIG: Towards Gradient-based Diverse and High-quality Instruction Data Selection for...

G-DIG: Towards Gradient-based Diverse and High-quality Instruction Data Selection for Machine Translation

21 May 2024arXiv:2405.12915archive 2025-07-28

Xingyuan Pan, Luyang Huang, Liyan Kang, Zhicheng Liu, Yu Lu, Shanbo Cheng

Large Language Models (LLMs) have demonstrated remarkable abilities in general scenarios. Instruction finetuning empowers them to align with humans in various tasks. Nevertheless, the Diversity and Quality of the instruction data remain two main challenges for instruction finetuning. With regard to this, in this paper, we propose a novel gradient-based method to automatically select high-quality and diverse instruction finetuning data for machine translation. Our key innovation centers around analyzing how individual training examples influence the model during training. Specifically, we select training examples that exert beneficial influences on the model as high-quality ones by means of Influence Function plus a small high-quality seed dataset. Moreover, to enhance the diversity of the training data we maximize the variety of influences they have on the model by clustering on their gradients and resampling. Extensive experiments on WMT22 and FLORES translation tasks demonstrate the superiority of our methods, and in-depth analysis further validates their effectiveness and generalization.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2405.12915")

Code

Syntology Ran 1 of 9 code samples harvested from 1 repository linked to this paper; 8 have no recorded run. Of those that ran: 1 ran with no contract checked.

By repository: official repository: 9 samples from 1 repository, 1 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

xypan0/G-DIG officialmentioned in paperpytorch report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

9 samples harvested; 1 ran; 0 honoured the contract we drafted; 8 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran
8unverified

Licence: 9 of the 9 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from xypan0/G-DIG. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

to_device xypan0/G-DIG/kfac_launcher.py official repository ran no licence file found · pointer only · ab5571ae1e8a8115 · report
FIM xypan0/G-DIG/nngeometry/lm_metrics.py official repository unverified no licence file found · pointer only · c014368b984b2b9d · report
FIM xypan0/G-DIG/nngeometry/lm_metrics_para.py official repository unverified no licence file found · pointer only · 414a4faedd78e894 · report
FIM xypan0/G-DIG/nngeometry/metrics.py official repository unverified no licence file found · pointer only · 0e696f0733ddd4a0 · report
FIM_MonteCarlo xypan0/G-DIG/nngeometry/lm_metrics.py official repository unverified no licence file found · pointer only · 0945bf43d2c78e66 · report
FIM_MonteCarlo xypan0/G-DIG/nngeometry/lm_metrics_para.py official repository unverified no licence file found · pointer only · 78dde2f177397247 · report
FIM_MonteCarlo xypan0/G-DIG/nngeometry/metrics.py official repository unverified no licence file found · pointer only · ecc80fe17400e3d6 · report
generate_and_tokenize_prompt xypan0/G-DIG/dataset/utils.py official repository unverified no licence file found · pointer only · cdc59dd6fe0dbb68 · report
to_device xypan0/G-DIG/query_loss_mapper.py official repository unverified no licence file found · pointer only · e3cf12a7afd9f489 · report

Tasks

DiversityMachine TranslationTranslation

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

ALIGN

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections