Skip to content

philz0918/DAHRS

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

DAHRS

Divergence-Aware Hallucination-Remediated SRL Projection

A Python framework for improving cross-lingual Semantic Role Labeling (SRL) projection using divergence-aware alignment and hallucination mitigation techniques.


Overview

DAHRS is a framework for projecting semantic role labels (SRL) across languages while addressing a key challenge:

  • Hallucinated role alignments — incorrect or spurious mappings that arise from cross-lingual divergences (naturally occurring structural and lexical differences between languages)

The system builds on alignment analysis techniques and introduces strategies to improve projection quality through:

  • Divergence-aware alignment handling
  • Function word filtering
  • Structured alignment resolution (FCFA: First-Come-First-Assign)

Paper

This repo goes along with the paper:

"DAHRS: Divergence-Aware Hallucination-Remediated SRL Projection"

It covers the ideas, methods, and experiments behind what's behind implemented here.

https://arxiv.org/abs/2407.09283


Key Ideas

Divergence-Aware Alignment

Captures and analyzes:

  • One-to-many alignments
  • Many-to-one alignments
  • Structural mismatches between languages

Hallucination Remediation

Reduces incorrect alignments by:

  • Filtering function words
  • Removing inconsistent mappings
  • Prioritizing stable alignment structures

FCFA Alignment Strategy

Implements a First-Come-First-Assign (FCFA) approach:

  • Sequential alignment resolution
  • Conflict reduction in many-to-one mappings
  • Improved consistency in projected labels

Quick Start

from fcfa_framework import FCFAFramework

framework = FCFAFramework()

src_tokens = {0: "I", 1: "do", 2: "n't", 3: "know"}
tgt_tokens = {0: "Je", 1: "ne", 2: "sais", 3: "pas"}

framework.load_alignment_output("0-0 1-1 2-3 3-2", (src_tokens, tgt_tokens))

print(framework.get_alignment_statistics())

About

Code for cross-lingual SRL transfer that accommodates naturally occurring linguistic divergences and remediates the hallucinated roles they induce during projection — treating divergence as a phenomenon to model, not an error to correct.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages