moddemod commited on
Commit
4e2109c
·
verified ·
1 Parent(s): 3fd6428

Upload verified cross-architecture bb_disasm V2 dataset

Browse files
README.txt ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ LLM2Vec cross-architecture bb_disasm JSONL
2
+
3
+ Original splits and positive pairs preserved exactly. This export is self-contained.
4
+ train/validation/test.jsonl: one cross-architecture positive pair per line, query and positive are raw disassembly text. IDs, architecture and group_id are metadata, not model inputs. No explicit negatives.
5
+ train/validation/test.functions.jsonl: one function per line, text is raw disassembly; use id/arch/group_id for cross-architecture retrieval evaluation. For a chosen source->target architecture direction, query source functions and rank all target functions; same group_id defines labeled positives. Labels do not prove semantic equivalence or non-equivalence of other groups.
6
+ Text concatenates bb_disasm in ascending block-address order, original instruction order within blocks, newline separated. No BB markers, normalization, names added or truncation.
7
+ Use dataset_name=XArchPairs and dataset_file_path=this directory with experiments/run_simcse.py. The loader returns two positive views compatible with VICReg. Loss choice still controls whether batch negatives are used.
8
+ Training max_seq_length can still truncate inputs; export does not solve long-function context limits. All architecture pairs are enumerated: groups with more architectures have more training pairs. Pair direction follows existing manifests.
9
+
10
+ RELEASE: ppc64_entry_repaired_v2, 2026-10-09
11
+ Architectures: x86, x64, arm32, arm64, mips32, mips64, ppc32, ppc64.
12
+ Source collection: BinAtlas/noinline, GCC 6, O0, 20 projects.
13
+ Train: 199408 functions, 27946 groups, 660178 pairs.
14
+ Validation: 26277 functions, 3771 groups, 85857 pairs.
15
+ Test: 26987 functions, 3755 groups, 89931 pairs.
16
+
17
+ FUNCTION SCHEMA
18
+ id, group_id, split, arch, project, artifact, num_blocks,
19
+ num_instructions, opcode_hash, text.
20
+ PAIR SCHEMA
21
+ group_id, split, query_id, positive_id, query_arch, positive_arch,
22
+ query, positive.
23
+ UTF-8 JSON Lines. Parse each line using json.loads. Escaped newlines inside
24
+ text become actual newlines after parsing.
25
+
26
+ PROCESSING
27
+ Known PPC64 adjacent global-entry/local-body splits were repaired before
28
+ filtering. Functions have >=5 basic blocks. Opcode hashes were deduplicated
29
+ across splits with priority test > validation > train; groups with fewer
30
+ than two remaining architectures were removed. Hash input is a compact JSON
31
+ array of lowercased stripped instruction mnemonics in block-address order,
32
+ without operands or architecture tags, hashed using SHA256.
33
+ Groups use DWARF source correspondence and artifact metadata, not bare names.
34
+ Source-linked groups stay in one split. This is NOT project-held-out data.
35
+ Do not randomly re-split pair rows. Different group IDs do not prove different
36
+ semantics. Source correspondence is not a formal equivalence proof.
37
+ This package includes all exported architecture pairs, not just the x64-anchor
38
+ subset used in our later training experiments.
39
+
40
+ RETRIEVAL
41
+ Use *.functions.jsonl. For source->target retrieval, rank ALL target-ISA
42
+ functions in the same split for each source-ISA query. Same group_id marks
43
+ labeled positives. Skip and count queries without target counterparts.
44
+ Report Recall@K, NDCG@K, MRR, candidate size, query count, truncation limit,
45
+ tie handling and aggregation. Report different-ISA-family results separately.
46
+ The export is full text, but model tokenizers may truncate long functions.
47
+ No original machine bytes or full CFG edges are included.
48
+
49
+ PORTABILITY / HUGGING FACE
50
+ No IDA, original binaries or local database is needed. You may upload the
51
+ archive or extract and upload its files. Functions and pairs have different
52
+ schemas: select one file family at a time when loading a dataset.
53
+ XArchPairs is our custom LLM2Vec loader, not part of an unmodified upstream
54
+ installation. example_read.py requires only the Python standard library.
55
+ Run: python example_read.py .
56
+ Verify: sha256sum -c SHA256SUMS
57
+
58
+ ATTRIBUTION
59
+ Project and artifact attribution are retained in the function records.
60
+ No blanket license is assigned by this export; underlying source-project
61
+ licenses and notices have not been consolidated into this package.
62
+
63
+ INTEGRITY
64
+ summary.json contains counts, byte sizes and original data SHA256 hashes.
65
+ SHA256SUMS also covers these accompanying files.
SHA256SUMS ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ 2ced27ed4d288a4c740d8437272c2bfa88a3c43db1c2e62644787dfe7b99af1a README.txt
2
+ ab9ad3353baa5ec5354aa9ff31b2d62dd14287a4fa52b6a4afb186a93d7f320b example_read.py
3
+ 317a55b5a520141e6e36f03c0b68d119be58ef646fd2a5108b6293a634ec39dc summary.json
4
+ c7ecae760f483bdfad81dc30216424e73d9375de6550551d6576c35a624b77e3 test.functions.jsonl
5
+ 1413618b8aa0300b0d6bba006e2b9d2f6bbd22a5fdc947815cfeafce016f7693 test.jsonl
6
+ 1950762e8f6f4d2a891fc526884a795c4fb14fabad2521c1e4a957b321efa2a2 train.functions.jsonl
7
+ d43c4735eac9ae7cf364d633cb1b4554314e3e90008e3981c94ba6b183bb5786 train.jsonl
8
+ 98b741756680dc4d3bea70e4e407a79471dfcf935f3b60494a403de1cffc1d03 validation.functions.jsonl
9
+ 29291f87a815b2b694c951fe085031d3011ef0c9436f99c94415a4e0a6695d7c validation.jsonl
example_read.py ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import json
2
+ import sys
3
+ from pathlib import Path
4
+ root = Path(sys.argv[1] if len(sys.argv) > 1 else ".")
5
+ def records(name):
6
+ with (root / name).open(encoding="utf-8") as stream:
7
+ for line in stream:
8
+ yield json.loads(line)
9
+ pair = next(records("train.jsonl"))
10
+ print("Positive pair:", pair["query_arch"], "->", pair["positive_arch"])
11
+ print("Query excerpt:", pair["query"][:200])
12
+ functions = list(records("test.functions.jsonl"))
13
+ targets = [f for f in functions if f["arch"] == "x64"]
14
+ gold_groups = {f["group_id"] for f in targets}
15
+ queries = [f for f in functions if f["arch"] == "arm64" and f["group_id"] in gold_groups]
16
+ print("arm64 -> x64:", len(queries), "eligible queries;", len(targets), "candidates")
17
+ print("Encode text; same group_id indicates a labeled relevant candidate.")
summary.json ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "complete": true,
3
+ "text_source": "bb_disasm",
4
+ "block_order": "ascending numeric address",
5
+ "instruction_order": "original within basic block",
6
+ "separator": "newline",
7
+ "normalization": false,
8
+ "truncation": false,
9
+ "workers": 24,
10
+ "counts": {
11
+ "train": {
12
+ "functions": 199408,
13
+ "positive_pairs": 660178,
14
+ "groups": 27946
15
+ },
16
+ "validation": {
17
+ "functions": 26277,
18
+ "positive_pairs": 85857,
19
+ "groups": 3771
20
+ },
21
+ "test": {
22
+ "functions": 26987,
23
+ "positive_pairs": 89931,
24
+ "groups": 3755
25
+ }
26
+ },
27
+ "files": {
28
+ "test.functions.jsonl": {
29
+ "bytes": 101060610,
30
+ "sha256": "c7ecae760f483bdfad81dc30216424e73d9375de6550551d6576c35a624b77e3"
31
+ },
32
+ "test.jsonl": {
33
+ "bytes": 648067008,
34
+ "sha256": "1413618b8aa0300b0d6bba006e2b9d2f6bbd22a5fdc947815cfeafce016f7693"
35
+ },
36
+ "train.functions.jsonl": {
37
+ "bytes": 746135572,
38
+ "sha256": "1950762e8f6f4d2a891fc526884a795c4fb14fabad2521c1e4a957b321efa2a2"
39
+ },
40
+ "train.jsonl": {
41
+ "bytes": 4720458427,
42
+ "sha256": "d43c4735eac9ae7cf364d633cb1b4554314e3e90008e3981c94ba6b183bb5786"
43
+ },
44
+ "validation.functions.jsonl": {
45
+ "bytes": 84347518,
46
+ "sha256": "98b741756680dc4d3bea70e4e407a79471dfcf935f3b60494a403de1cffc1d03"
47
+ },
48
+ "validation.jsonl": {
49
+ "bytes": 529175427,
50
+ "sha256": "29291f87a815b2b694c951fe085031d3011ef0c9436f99c94415a4e0a6695d7c"
51
+ }
52
+ },
53
+ "all_output_records_verified": true,
54
+ "elapsed_seconds": 48.48998165130615,
55
+ "dataset_version": "ppc64_entry_repaired_v2"
56
+ }
xarch-bbdisasm-v2.tar.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d67a9cd155b054548d12cec6deb60de63b9ab5ce8a02c40db8790617fae22349
3
+ size 488681622
xarch-bbdisasm-v2.tar.gz.sha256 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:713b180e3f93f56ead244abe8fbbe9063859c4305faf04601a23cba790caa924
3
+ size 91