samsonjma1 commited on
Commit
2e67cc7
·
verified ·
1 Parent(s): a1b12d4

Add analysis.md, README.md, config.json, training_args.json, model.safetensors, NOTES.md

Browse files
Files changed (6) hide show
  1. NOTES.md +6 -0
  2. README.md +68 -0
  3. analysis.md +54 -0
  4. config.json +19 -0
  5. model.safetensors +3 -0
  6. training_args.json +9 -0
NOTES.md ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ # Notes
2
+
3
+ - check whether the config round-trips through from_pretrained
4
+ - compare parameter counts against a reference implementation
5
+ - move constants into the config file
6
+ - document the expected input shapes
README.md ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ tags:
4
+ - research-notes
5
+ - document-ai
6
+ - reading-list
7
+ - planning
8
+ ---
9
+
10
+ # Toward Document AI (planning notes)
11
+
12
+ ## Overview
13
+
14
+ Reading notes and an experiment sketch for **Document AI**. The repository emphasizes what still needs to be tested instead of manufacturing scores or release claims.
15
+
16
+ Feedback on the structure is welcome; the code is intentionally short.
17
+
18
+ ---
19
+
20
+ ## How To Read This Repository
21
+
22
+ The note follows a intro-related-method-exp-conclusion outline and a narrative-progressive writing style. Plans and hypotheses are kept apart from results; any future numbers should ship with dataset versions, commands, seeds and raw logs.
23
+
24
+ ---
25
+
26
+ ## What Is Covered
27
+
28
+ + research question scope and likely confounders
29
+ + one proposed comparison against matched baselines
30
+ + evaluation context such as FUNSD, SROIE, and CORD
31
+ + reproducibility checks and open questions
32
+
33
+ ---
34
+
35
+ ## Scope And Limitations
36
+
37
+ Exploratory by design: no benchmark claims, no completed ablations, no released code, no trained checkpoint. The references are a starting point for verification, not evidence that the study has run.
38
+
39
+ ---
40
+
41
+ ## Open Questions
42
+
43
+ + which baselines are actually comparable under matched capacity?
44
+ + what is the minimum data exposure for a meaningful signal?
45
+ + which confounders would invalidate a naive comparison?
46
+
47
+ ---
48
+
49
+ ## Related Work
50
+
51
+ A reading list around Document AI is being assembled. Entries will be added as the note matures; suggestions via repository discussions are welcome.
52
+
53
+ ---
54
+
55
+ ## Files
56
+
57
+ + `analysis.md` — primary artifact
58
+ + `README.md` — this documentation
59
+ + `config.json` — architecture configuration
60
+ + `training_args.json` — default experiment settings
61
+ + `model.safetensors` — initialization checkpoint
62
+ + `NOTES.md` — informal to-do notes
63
+
64
+ ---
65
+
66
+ ## License
67
+
68
+ Released under **apache-2.0**. Review the source-data terms separately when this repository is used with external datasets.
analysis.md ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Document Ai: Research Notes
2
+
3
+ ## Status
4
+
5
+ Working note / experiment plan. No completed benchmark results are claimed here.
6
+
7
+ ## 1. Scope and motivation
8
+
9
+ The goal of this note is to turn a broad idea into a falsifiable study of layout-aware representations for documents and irregular visual text. The central question is whether the proposed change improves the target behavior under a matched training and evaluation budget. The note deliberately separates hypotheses from observations so that future results can be added without rewriting the rationale.
10
+
11
+ ## 2. Context
12
+
13
+ Research on document ai often mixes improvements from architecture, data scale, preprocessing, and compute. A useful comparison therefore needs controlled baselines and explicit reporting of resource use. For this topic, the main confound is that results can be dominated by OCR quality, language coverage, and annotation conventions.
14
+
15
+ ## 3. Working hypothesis
16
+
17
+ A focused change to the representation or interaction mechanism may improve entity-level F1 without increasing deployment cost disproportionately. The hypothesis should be rejected if gains disappear after matching parameter count, data exposure, or tuning budget.
18
+
19
+ ## 4. Proposed approach
20
+
21
+ The first implementation should keep modality-specific preprocessing simple, project inputs into a shared representation space, and isolate the new component behind a small interface. Baselines should include a comparable model without the component and a stronger off-the-shelf reference. Any optimization should be applied to all systems, not only the proposed one.
22
+
23
+ ## 5. Evaluation plan
24
+
25
+ | Dataset | Role | Primary measure |
26
+ |---|---|---|
27
+ | FUNSD | primary evaluation | entity-level F1 |
28
+ | SROIE | transfer / robustness | character error rate |
29
+ | CORD | transfer / robustness | exact match |
30
+
31
+ Planned comparisons include a matched-capacity baseline, an ablation that removes the proposed component, and an out-of-domain transfer check. Default training values for the first controlled run are learning rate `0.0001`, batch size `16`, and `3` independent seeds. These are planning values, not claims about a finished experiment.
32
+
33
+ ## 6. Reproducibility checklist
34
+
35
+ - Separate model selection from final evaluation.
36
+ - Run at least one out-of-domain test.
37
+ - Track failed runs as well as successful runs.
38
+ - Document every exclusion rule.
39
+
40
+ ## 7. Failure modes and responsible use
41
+
42
+ The analysis should report subgroup and category-level failures instead of relying only on a single aggregate score. Particular attention is needed because results can be dominated by OCR quality, language coverage, and annotation conventions. No production use is recommended without task-specific validation, data review, and an assessment of privacy and bias.
43
+
44
+ ## 8. Open questions
45
+
46
+ - Where does the method fail on compositional or out-of-domain examples?
47
+ - Does the proposed component improve calibration as well as the primary metric?
48
+ - Which gain survives when the compute budget is matched?
49
+
50
+ ## References
51
+
52
+ [1] Xu et al., LayoutLM, 2020.
53
+ [2] Kim et al., Donut, 2022.
54
+ [3] Jaume et al., FUNSD, 2019.
config.json ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "CustomResearchModel"
4
+ ],
5
+ "architecture": "transformer",
6
+ "model_type": "transformer",
7
+ "hidden_size": 128,
8
+ "num_hidden_layers": 6,
9
+ "num_attention_heads": 2,
10
+ "intermediate_size": 256,
11
+ "hidden_act": "gelu",
12
+ "max_position_embeddings": 512,
13
+ "layer_norm_eps": 1e-12,
14
+ "checkpoint_status": "initialization-only",
15
+ "notes": "Untrained checkpoint for smoke tests; no benchmark claim.",
16
+ "use_cache": true,
17
+ "torch_dtype": "float32",
18
+ "vocab_size": 2048
19
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4ed61401de9380bd9d9317060f5d36d1072a7a3801a494d8b1a066ef7470eeb6
3
+ size 66784
training_args.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "optimizer": "adamw",
3
+ "scheduler": "cosine",
4
+ "learning_rate": 5e-05,
5
+ "batch_size": 24,
6
+ "epochs": 30,
7
+ "seed": 42,
8
+ "status": "default recipe; not a completed run"
9
+ }