texturejc commited on
Commit
54356e8
Β·
verified Β·
1 Parent(s): 25e389f

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +103 -0
README.md ADDED
@@ -0,0 +1,103 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: other
3
+ license_name: framenet-academic
4
+ license_link: https://framenet.icsi.berkeley.edu/framenet_data
5
+ language:
6
+ - en
7
+ library_name: transformers
8
+ pipeline_tag: token-classification
9
+ tags:
10
+ - frame-semantics
11
+ - framenet
12
+ - semantic-parsing
13
+ - srl
14
+ - argument-extraction
15
+ - english
16
+ base_model: microsoft/deberta-v3-large
17
+ ---
18
+
19
+ # texture-frames Β· argument-extraction head
20
+
21
+ The **argument-extraction** stage of
22
+ [`texture-frames`](https://github.com/texturejc/Texture_Frames), a fast FrameNet
23
+ semantic-frame parser. Given a sentence with a marked trigger and its frame, it
24
+ finds the spans that fill the frame's roles (frame elements) and labels each.
25
+
26
+ It fine-tunes [`microsoft/deberta-v3-large`](https://huggingface.co/microsoft/deberta-v3-large)
27
+ on **FrameNet 1.7** with a **detect-then-classify** design β€” two heads on one
28
+ backbone, a single forward pass:
29
+
30
+ - **Head A β€” span detection:** a role-agnostic 3-class BIO tagger (`O`/`B`/`I`),
31
+ "is this token part of *an* argument?". Dense signal, arbitrary-length spans.
32
+ - **Head B β€” role classification:** for each detected span, pool its tokens
33
+ (`start βŠ• end βŠ• mean`) and classify into **only the current frame's frame
34
+ elements** (plus a `NULL` reject class), masked via the lexicon.
35
+
36
+ The input carries the predicate marker and the frame's FE menu
37
+ (`{frame} [FE1; FE2; …] : … <t> {trigger} </t> …`). A **`NULL`-bias** at inference
38
+ sets the precision/recall operating point.
39
+
40
+ > This is one of three stages. Use it through the package rather than alone.
41
+
42
+ ## Usage
43
+
44
+ ```bash
45
+ pip install git+https://github.com/texturejc/Texture_Frames
46
+ ```
47
+
48
+ ```python
49
+ from texture_frames import FrameParser
50
+ parser = FrameParser()
51
+ for ann in parser.parse("The chef gave food to the customer ."):
52
+ print([(a.role, a.text) for a in ann.arguments])
53
+ # [('Donor', 'The chef'), ('Theme', 'food'), ('Recipient', 'to the customer')]
54
+ ```
55
+
56
+ ## Files
57
+
58
+ | File | What |
59
+ | ---- | ---- |
60
+ | `args2_model.pt` | model `state_dict` (backbone + detection + role heads) |
61
+ | `role2id.json` | `{role name β†’ id}` label map (incl. `<NULL>`) + `base_model` |
62
+ | tokenizer files | DeBERTa-v3 tokenizer with the `<t>` / `</t>` markers added |
63
+
64
+ Loading is handled by `texture_frames.weights.load_args`.
65
+
66
+ ## Results
67
+
68
+ Open-Sesame test split, weighted F1 (non-core FEs = 0.5):
69
+
70
+ | Metric | This head | T5 baseline |
71
+ | ------ | --------- | ----------- |
72
+ | Argument F1 | **0.750** | 0.753 |
73
+ | Speed | single forward pass (~50–60 ms) | 3 beam-search passes |
74
+
75
+ Parity with the generative baseline while running ~4Γ— faster. The encoder went
76
+ 0.628 (flat BIO) β†’ 0.712 (detect-then-classify) β†’ 0.750 (+ WordNet augmentation)
77
+ across redesigns.
78
+
79
+ ## Training
80
+
81
+ `microsoft/deberta-v3-large`, AdamW lr 1e-5, warmup 0.06, weight decay 0.01,
82
+ batch 16, max length 320, bf16, 6 epochs with WordNet synonym augmentation.
83
+ Data: FrameNet 1.7 (NLTK), Open-Sesame splits.
84
+
85
+ ## Licence
86
+
87
+ **Code (the package): MIT.** **Weights:** trained on **FrameNet 1.7**, which
88
+ carries its own academic-use terms β€” review them before redistributing.
89
+
90
+ ## Citation
91
+
92
+ ```bibtex
93
+ @software{texture_frames,
94
+ author = {Carney, James},
95
+ title = {texture-frames: a fast DeBERTa encoder FrameNet parser},
96
+ url = {https://github.com/texturejc/Texture_Frames},
97
+ year = {2026}
98
+ }
99
+ ```
100
+
101
+ Builds on David Chanin's
102
+ [`frame-semantic-transformer`](https://github.com/chanind/frame-semantic-transformer);
103
+ thanks to the Berkeley FrameNet and Open-Sesame projects.