Dictionary Compression
Reducing Symbolic Redundancy in RDF
Antonio Fariña, Javier D. Fernández and
Miguel A. Martinez-Prieto
23TH AUGUST 2017
3rd KEYSTONE Training School Keyword search in Big Linked Data
Image: ALCÁZAR (SEGOVIA, SPAIN)
Dictionary Compression Reducing Symbolic Redundancy in RDF Antonio - - PowerPoint PPT Presentation
Image: ALCZAR (S EGOVIA , SPAIN ) Dictionary Compression Reducing Symbolic Redundancy in RDF Antonio Faria, Javier D. Fernndez and Miguel A. Martinez-Prieto 3rd KEYSTONE Training School Keyword search in Big Linked Data 23 TH AUGUST 2017
Dictionary Compression
Reducing Symbolic Redundancy in RDF
Antonio Fariña, Javier D. Fernández and
Miguel A. Martinez-Prieto
23TH AUGUST 2017
3rd KEYSTONE Training School Keyword search in Big Linked Data
Image: ALCÁZAR (SEGOVIA, SPAIN)
PAGE 2
Agenda
images: zurb.com
Introduction
Dictionary Compression
Dictionary compression is a simple but effective technique which replaces the
more compact to encode and easier and more efficient to handle.
What is Dictionary Compression?
DICTIONARY COMPRESSION PAGE 4
Dictionary compression is a simple but effective technique which replaces the
more compact to encode and easier and more efficient to handle.
structure configuration (dictionary) which provides, at least, two basic mapping operations:
processing purposes (e.g. information retrieval).
Dictionary Compression
DICTIONARY COMPRESSION PAGE 5
Dictionary Compression
DICTIONARY COMPRESSION PAGE 6
Dictionary Compression
… la tarara sí la tarara no la tarara niña que la he visto yo …
ID String 1 he 2 la 3 niña 4 no 5 que 6 sí 7 tarara 8 visto 9 yo
data structure
DICTIONARY COMPRESSION PAGE 7
Dictionary Compression
ID String 1 he 2 la 3 niña 4 no 5 que 6 sí 7 tarara 8 visto 9 yo
… 2 7 6 2 7 4 2 7 3 5 2 1 8 9 … data structure
DICTIONARY COMPRESSION PAGE 8
Dictionary Compression
… la tarara sí la tarara no la tarara niña que la he visto yo … The original text takes 59 bytes
59 chars * 1 byte/char
DICTIONARY COMPRESSION PAGE 9
Dictionary Compression
… 2 7 6 2 7 4 2 7 3 5 2 1 8 9 … The original text takes 59 bytes
59 chars * 1 byte/char
+ the cost of serializing the data structure. The dictionary compressed text takes 7 bytes
14 IDs * log2(9) bits/ID
Machine Translation)
HDT)
DICTIONARY COMPRESSION PAGE 10
Dictionary Compression
well-known data structures:
DICTIONARY COMPRESSION PAGE 11
Data Structures
restrictions of main memory.
efficient in-memory management:
must be optimized for Big Data scenarios.
changed).
DICTIONARY COMPRESSION PAGE 12
The Problem…
Compressed String Dictionaries are a particular class of compacta data structure which is optimize for dealing with string vocabularies from different domains.
Compressed String Dictionaries
DICTIONARY COMPRESSION PAGE 13
vocabularies in main memory:
dictionaries.
DICTIONARY COMPRESSION PAGE 14
The Solutions…
locate(“tarara”) extract(2) locatePrefix(“n”) extractPrefix(“n”) locateSubstring(“a”) extractSubstring(“a”)
DICTIONARY COMPRESSION PAGE 15
Queries
ID String 1 he 2 la 3 niña 4 no 5 que 6 sí 7 tarara 8 visto 9 yo
= 7 = “la” = {3,4} = {“niña”,”no”} = {2,3,7} = {“la”,”niña”,”tarara”}
a common prefix.
compression.
efficient sequential decoding.
indexed trie.
DICTIONARY COMPRESSION PAGE 16
Techniques for Compressing Dictionaries
DICTIONARY COMPRESSION PAGE 17
More Details…
Compressed String Dictionaries answer queries at the level of microseconds, while compressing vocabularies up to 20 times.
Some Experimental Numbers
DICTIONARY COMPRESSION PAGE 18
DICTIONARY COMPRESSION PAGE 19
Experimental Setup
DICTIONARY COMPRESSION PAGE 20
Locate / Extract Performance (URIs)
PFC is the faster choice for locate/extract…
HTFC (compressed Front-Coding) reports the most balanced space/time tradeoffs:
DICTIONARY COMPRESSION PAGE 21
Locate / Extract Performance (Literals)
HTFC reports the best compression ratios, but its performance is less competitive:
HashDAC-rp (compressed Hashing) reports the best tradeoffs:
DICTIONARY COMPRESSION PAGE 22
Domain Entity Retrieval (URIs)
PFC is the best choice for prefix-based operations:
DICTIONARY COMPRESSION PAGE 23
Full-Text Search (Literals)
Self-index based dictionaries are the only ones providing fullt-text search:
1μs/result) when uses more space than the original vocabulary.
this scenario:
RDF Dictionaries
Dictionary Compression
RDF Dictionaries are a core component of any compression or indexing approach desgined for semantic datasets.
Foundations
DICTIONARY COMPRESSION PAGE 25
http://example.org/property/age http://example.org/property/location http://example.org/person/abe-simpson http://example.org/person/bart-simpson
numbers, or dates…:
“742 Evergreen Terrace” “Bart Simpson” “Homer Simpson” 10
DICTIONARY COMPRESSION PAGE 26
Basics
purposes (e.g. RDF stores, semantic search engines, etc.).
purposes (e.g. decompression, result retrieval, etc.).
http://example.org/person/.
“Simpson”.
DICTIONARY COMPRESSION PAGE 28
Dictionary Queries
DICTIONARY COMPRESSION PAGE 29
Decisions
RDF Dictionary-based compression handles some dictionaries to optimize URIs and Literals compression.
RDF Dictionary-based Compression
DICTIONARY COMPRESSION PAGE 30
encoded once:
subjects and objects.
performs as objects.
DICTIONARY COMPRESSION PAGE 31
Dictionary Organization
DICTIONARY COMPRESSION PAGE 32
RDF Dictionaries in Practice
person:homer-simpson person:abe-simpson "Homer Simpson" property:name "742 Evergreen Terrace" property:address property:father person:marge-simpson property:address "Marge Simpson" property:name location:springfield property:location property:location person:bart-simpson "Springfield" property:mother property:father property:name "Bart Simpson" 10 property:name property:age 83 "Bart Simpson" property:age property:name
<http://example.org/location/springfield> <http://example.org/property/name> "Springfield" . <http://example.org/person/abe-simpson> <http://example.org/property/age> 83 . <http://example.org/person/abe-simpson> <http://example.org/property/name> "Abe Simpson" . <http://example.org/person/bart-simpson> <http://example.org/property/age> 10 . <http://example.org/person/bart-simpson> <http://example.org/property/name> "Bart Simpson" . <http://example.org/person/bart-simpson> <http://example.org/property/father> <http://example.org/person/homer-simpson> . <http://example.org/person/bart-simpson> <http://example.org/property/mother> <http://example.org/person/marge-simpson> . <http://example.org/person/homer-simpson> <http://example.org/property/address> "742 Evergreen Terrace" . <http://example.org/person/homer-simpson> <http://example.org/property/name> "Homer Simpson" . <http://example.org/person/homer-simpson> <http://example.org/property/location> <http://example.org/location/springfield> . <http://example.org/person/homer-simpson> <http://example.org/property/father> <http://example.org/person/abe-simpson> . <http://example.org/person/marge-simpson> <http://example.org/property/address> "742 Evergreen Terrace" . <http://example.org/person/marge-simpson> <http://example.org/property/name> "Marge Simpson" . <http://example.org/person/marge-simpson> <http://example.org/property/location> <http://example.org/location/springfield> .
DICTIONARY COMPRESSION PAGE 33
Looking for Subject-Object (SO) terms…
1
<http://example.org/property/name> "Springfield" .
2
<http://example.org/property/age> 83 .
2
<http://example.org/property/name> "Abe Simpson" . <http://example.org/person/bart-simpson> <http://example.org/property/age> 10 . <http://example.org/person/bart-simpson> <http://example.org/property/name> "Bart Simpson" . <http://example.org/person/bart-simpson> <http://example.org/property/father> 3 . <http://example.org/person/bart-simpson> <http://example.org/property/mother> 4 .
3
<http://example.org/property/address> "742 Evergreen Terrace" .
3
<http://example.org/property/name> "Homer Simpson" .
3
<http://example.org/property/location> 1 .
3
<http://example.org/property/father> 2 .
4
<http://example.org/property/address> "742 Evergreen Terrace" .
4
<http://example.org/property/name> "Marge Simpson" .
4
<http://example.org/property/location> 1 . <http://example.org/location/springfield> <http://example.org/property/name> "Springfield" . <http://example.org/person/abe-simpson> <http://example.org/property/age> 83 . <http://example.org/person/abe-simpson> <http://example.org/property/name> "Abe Simpson" . <http://example.org/person/bart-simpson> <http://example.org/property/age> 10 . <http://example.org/person/bart-simpson> <http://example.org/property/name> "Bart Simpson" . <http://example.org/person/bart-simpson> <http://example.org/property/father> <http://example.org/person/homer-simpson> . <http://example.org/person/bart-simpson> <http://example.org/property/mother> <http://example.org/person/marge-simpson> . <http://example.org/person/homer-simpson> <http://example.org/property/address> "742 Evergreen Terrace" . <http://example.org/person/homer-simpson> <http://example.org/property/name> "Homer Simpson" . <http://example.org/person/homer-simpson> <http://example.org/property/location> <http://example.org/location/springfield> . <http://example.org/person/homer-simpson> <http://example.org/property/father> <http://example.org/person/abe-simpson> . <http://example.org/person/marge-simpson> <http://example.org/property/address> "742 Evergreen Terrace" . <http://example.org/person/marge-simpson> <http://example.org/property/name> "Marge Simpson" . <http://example.org/person/marge-simpson> <http://example.org/property/location> <http://example.org/location/springfield> .
DICTIONARY COMPRESSION PAGE 34
Building SO Dictionary & Compressing terms
DICTIONARY COMPRESSION
ID RDF Term 1 http://example.org/location/springfield 2 http://example.org/person/abe-simpson 3 http://example.org/person/homer-simpson 4 http://example.org/person/marge-simpson
SO
1
<http://example.org/property/name> "Springfield" .
2
<http://example.org/property/age> 83 .
2
<http://example.org/property/name> "Abe Simpson" . <http://example.org/person/bart-simpson> <http://example.org/property/age> 10 . <http://example.org/person/bart-simpson> <http://example.org/property/name> "Bart Simpson" . <http://example.org/person/bart-simpson> <http://example.org/property/father> 3 . <http://example.org/person/bart-simpson> <http://example.org/property/mother> 4 .
3
<http://example.org/property/address> "742 Evergreen Terrace" .
3
<http://example.org/property/name> "Homer Simpson" .
3
<http://example.org/property/location> 1 .
3
<http://example.org/property/father> 2 .
4
<http://example.org/property/address> "742 Evergreen Terrace" .
4
<http://example.org/property/name> "Marge Simpson" .
4
<http://example.org/property/location> 1 .
DICTIONARY COMPRESSION
Looking for Subject (S) terms…
ID RDF Term 1 http://example.org/location/springfield 2 http://example.org/person/abe-simpson 3 http://example.org/person/homer-simpson 4 http://example.org/person/marge-simpson
SO
1
<http://example.org/property/name> "Springfield" .
2
<http://example.org/property/age> 83 .
2
<http://example.org/property/name> "Abe Simpson" .
5
<http://example.org/property/age> 10 .
5
<http://example.org/property/name> "Bart Simpson" .
5
<http://example.org/property/father> 3 .
5
<http://example.org/property/mother> 4 .
3
<http://example.org/property/address> "742 Evergreen Terrace" .
3
<http://example.org/property/name> "Homer Simpson" .
3
<http://example.org/property/location> 1 .
3
<http://example.org/property/father> 2 .
4
<http://example.org/property/address> "742 Evergreen Terrace" .
4
<http://example.org/property/name> "Marge Simpson" .
4
<http://example.org/property/location> 1 .
1
<http://example.org/property/name> "Springfield" .
2
<http://example.org/property/age> 83 .
2
<http://example.org/property/name> "Abe Simpson" . <http://example.org/person/bart-simpson> <http://example.org/property/age> 10 . <http://example.org/person/bart-simpson> <http://example.org/property/name> "Bart Simpson" . <http://example.org/person/bart-simpson> <http://example.org/property/father> 3 . <http://example.org/person/bart-simpson> <http://example.org/property/mother> 4 .
3
<http://example.org/property/address> "742 Evergreen Terrace" .
3
<http://example.org/property/name> "Homer Simpson" .
3
<http://example.org/property/location> 1 .
3
<http://example.org/property/father> 2 .
4
<http://example.org/property/address> "742 Evergreen Terrace" .
4
<http://example.org/property/name> "Marge Simpson" .
4
<http://example.org/property/location> 1 .
DICTIONARY COMPRESSION PAGE 36
Building S Dictionary & Compressing terms
PAGE 36 PAGE 36
ID RDF Term 5 http://example.org/person/bart-simpson
S
ID RDF Term 1 http://example.org/location/springfield 2 http://example.org/person/abe-simpson 3 http://example.org/person/homer-simpson 4 http://example.org/person/marge-simpson
SO
DICTIONARY COMPRESSION PAGE 37
Looking for Object (O) terms…
PAGE 37 PAGE 37
1
<http://example.org/property/name> "Springfield" .
2
<http://example.org/property/age> 83 .
2
<http://example.org/property/name> "Abe Simpson" .
5
<http://example.org/property/age> 10 .
5
<http://example.org/property/name> "Bart Simpson" .
5
<http://example.org/property/father> 3 .
5
<http://example.org/property/mother> 4 .
3
<http://example.org/property/address> "742 Evergreen Terrace" .
3
<http://example.org/property/name> "Homer Simpson" .
3
<http://example.org/property/location> 1 .
3
<http://example.org/property/father> 2 .
4
<http://example.org/property/address> "742 Evergreen Terrace" .
4
<http://example.org/property/name> "Marge Simpson" .
4
<http://example.org/property/location> 1 . ID RDF Term 5 http://example.org/person/bart-simpson
S
ID RDF Term 1 http://example.org/location/springfield 2 http://example.org/person/abe-simpson 3 http://example.org/person/homer-simpson 4 http://example.org/person/marge-simpson
SO
1
<http://example.org/property/name> 10 .
2
<http://example.org/property/age> 12 .
2
<http://example.org/property/name> 6 .
5
<http://example.org/property/age> 11 .
5
<http://example.org/property/name> 7 .
5
<http://example.org/property/father> 3 .
5
<http://example.org/property/mother> 4 .
3
<http://example.org/property/address> 5 .
3
<http://example.org/property/name> 8 .
3
<http://example.org/property/location> 1 .
3
<http://example.org/property/father> 2 .
4
<http://example.org/property/address> 5 .
4
<http://example.org/property/name> 9 .
4
<http://example.org/property/location> 1 .
DICTIONARY COMPRESSION PAGE 38
Building O Dictionary & Compressing Terms
ID RDF Term 5 http://example.org/person/bart-simpson
S
PAGE 38 PAGE 38
ID RDF Term 1 http://example.org/location/springfield 2 http://example.org/person/abe-simpson 3 http://example.org/person/homer-simpson 4 http://example.org/person/marge-simpson
SO
1
<http://example.org/property/name> "Springfield" .
2
<http://example.org/property/age> 83 .
2
<http://example.org/property/name> "Abe Simpson" .
5
<http://example.org/property/age> 10 .
5
<http://example.org/property/name> "Bart Simpson" .
5
<http://example.org/property/father> 3 .
5
<http://example.org/property/mother> 4 .
3
<http://example.org/property/address> "742 Evergreen Terrace" .
3
<http://example.org/property/name> "Homer Simpson" .
3
<http://example.org/property/location> 1 .
3
<http://example.org/property/father> 2 .
4
<http://example.org/property/address> "742 Evergreen Terrace" .
4
<http://example.org/property/name> "Marge Simpson" .
4
<http://example.org/property/location> 1 . ID RDF Term 5 "742 Evergreen Terrace" 6 "Abe Simpson" 7 "Bart Simpson" 8 "Homer Simpson" 9 "Marge Simpson" 10 "Springfield" 11 10 12 83
O
1
<http://example.org/property/name> 10 .
2
<http://example.org/property/age> 12 .
2
<http://example.org/property/name> 6 .
5
<http://example.org/property/age> 11 .
5
<http://example.org/property/name> 7 .
5
<http://example.org/property/father> 3 .
5
<http://example.org/property/mother> 4 .
3
<http://example.org/property/address> 5 .
3
<http://example.org/property/name> 8 .
3
<http://example.org/property/location> 1 .
3
<http://example.org/property/father> 2 .
4
<http://example.org/property/address> 5 .
4
<http://example.org/property/name> 9 .
4
<http://example.org/property/location> 1 .
DICTIONARY COMPRESSION PAGE 39
Looking for Predicate (P) terms…
ID RDF Term 5 http://example.org/person/bart-simpson
S
PAGE 39 PAGE 39
ID RDF Term 1 http://example.org/location/springfield 2 http://example.org/person/abe-simpson 3 http://example.org/person/homer-simpson 4 http://example.org/person/marge-simpson
SO
ID RDF Term 5 "742 Evergreen Terrace" 6 "Abe Simpson" 7 "Bart Simpson" 8 "Homer Simpson" 9 "Marge Simpson" 10 "Springfield" 11 10 12 83
O
1
<http://example.org/property/name>
10 . 2
<http://example.org/property/age>
12 . 2
<http://example.org/property/name>
6 . 5
<http://example.org/property/age>
11 . 5
<http://example.org/property/name>
7 . 5
<http://example.org/property/father>
3 . 5
<http://example.org/property/mother>
4 . 3
<http://example.org/property/address>
5 . 3
<http://example.org/property/name>
8 . 3
<http://example.org/property/location>
1 . 3
<http://example.org/property/father>
2 . 4
<http://example.org/property/address>
5 . 4
<http://example.org/property/name>
9 . 4
<http://example.org/property/location>
1 .
DICTIONARY COMPRESSION PAGE 40
Building P Dictionary & Compressing terms
ID RDF Term 5 http://example.org/person/bart-simpson
S
PAGE 40 PAGE 40
ID RDF Term 1 http://example.org/location/springfield 2 http://example.org/person/abe-simpson 3 http://example.org/person/homer-simpson 4 http://example.org/person/marge-simpson
SO
ID RDF Term 5 "742 Evergreen Terrace" 6 "Abe Simpson" 7 "Bart Simpson" 8 "Homer Simpson" 9 "Marge Simpson" 10 "Springfield" 11 10 12 83
O
ID RDF Term 1 http://example.org/property/address 2 http://example.org/property/age 3 http://example.org/property/father 4 http://example.org/property/location 5 http://example.org/property/mother 6 http://example.org/property/name
P
1 6 10 . 2 2 12 . 2 6 6 . 5 2 11 . 5 6 7 . 5 3 3 . 5 5 4 . 3 1 5 . 3 6 8 . 3 4 1 . 3 3 2 . 4 1 5 . 4 6 9 . 4 4 1 .
Dictionary Compression
ID RDF Term 1 http://example.org/property/address 2 http://example.org/property/age 3 http://example.org/property/father 4 http://example.org/property/location 5 http://example.org/property/mother 6 http://example.org/property/name
P
compressed using Plain Front Coding.
http://example.org/property/address$http://example.org/property/age$http://example.org/property/father$ht tp://example.org/property/location$http://example.org/property/mother$http://example.org/property/name$
B1 = http://example.org/property/address$http://example.org/property/age$http://example.org/property/father$ B2 = http://example.org/property/location$http://example.org/property/mother$http://example.org/property/name$
DICTIONARY COMPRESSION PAGE 33
Dictionary Compression
(ASCII).
byte of each bucket.
Bucket 1 Bucket 2
http://example.org/property/address$ 29 ge$ 28 ather$ http://example.org/property/location$ 28 mother$ 28 name$ B1 = http://example.org/property/address$http://example.org/property/age$http://example.org/property/father$ B2 = http://example.org/property/location$http://example.org/property/mother$http://example.org/property/name$
47
RDF Dictionaries are used for SPARQL resolution, but also allows other interesting queries to be efficiently resolved in the Linked Data workflow.
Dictionaries in Practice
DICTIONARY COMPRESSION PAGE 43
DICTIONARY COMPRESSION PAGE 44
Normative SPARQL
PAGE 44 PAGE 44
1 6 10 2 2 12 2 6 6 5 2 11 5 6 7 5 3 3 5 5 4 3 1 5 3 6 8 3 4 1 3 3 2 4 1 5 4 6 9 4 4 1
Retrieve all people living in Springfield.
@prefix … SELECT ?Who WHERE { ?Who property:location location:springfield }
P.locate(http://example.org/property/location/) SO.locate(http://example.org/location/springfield/) Looking for (?Who 4 1) SO.extract(3)
SO.extract(4)
4 1 3 4
http://example.org/person/homer-simpson http://example.org/person/marge-simpson
DICTIONARY COMPRESSION PAGE 45
Domain Entity Retrieval
PAGE 45 PAGE 45
1 6 10 2 2 12 2 6 6 5 2 11 5 6 7 5 3 3 5 5 4 3 1 5 3 6 8 3 4 1 3 3 2 4 1 5 4 6 9 4 4 1
Retrieve all people in our domain:
http://explample.org/people/
SO.extractPrefix(http://example.org/people/) S.extractPrefix(http://example.org/people/)
O.extractPrefix(http://example.org/people/)
http://example.org/person/abe-simpson http://example.org/person/homer-simpson http://example.org/person/marge-simpson http://example.org/person/bart-simpson
DICTIONARY COMPRESSION PAGE 46
Full-Text Search
PAGE 46 PAGE 46
1 6 10 2 2 12 2 6 6 5 2 11 5 6 7 5 3 3 5 5 4 3 1 5 3 6 8 3 4 1 3 3 2 4 1 5 4 6 9 4 4 1
Retrieve all terms which include “Simpson”:
O.extractSubstring(”Simpson”)
“Abe Simpson” “Bart Simpson” “Homer Simpson” “Marge Simpson”
Conclusions
Dictionary Compression
redundancy.
structures for dictionaries:
dictionaries.
the original dictionaries.
level:
DICTIONARY COMPRESSION PAGE 48
Conclusions
DICTIONARY COMPRESSION PAGE 49
Conclusions
(beta):
search functionality (e.g. top K).
https://github.com/migumar2/libCSD
BIG (LINKED) SEMANTIC DATA COMPRESSION PAGE 50
Bibliography
1. Julian Arz and Johannes Fischer. LZ-compressed string dictionaries. In Procedings of DCC, pages 322–331, 2014. 2. Nieves Brisaboa, Rodrigo Cánovas, Francisco Claude, Miguel A. Martínez-Prieto, and Gonzalo Navarro. Compressed string dictionaries. In Proceedings of SEA, pages 136–147, 2011. 3. Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, and Clifford Stein. Introduction to Algorithms. MIT Press and McGraw-Hill, 2nd edition, 2001. 4. Paolo Ferragina and Giovanni Manzini. Indexing compressed texts. Journal of the ACM, 52(4):552–581, 2005. 5. Paolo Ferragina, Giovanni Manzini, Veli Mäkinen, and Gonzalo Navarro. Compressed representations of sequences and full-text indexes. ACM Transactions on Algorithms, 3(2):article 20, 2007. 6. Roberto Grossi and Giuseppe Ottaviano. Fast Compressed Tries through Path Decompositions. In Proceedings of ALENEX, pages 65–74, 2012. 7. T.C. Hu and Alan C. Tucker. Optimal Computer-Search Trees and Variable-Length Alphabetic Codes. SIAM Journal
8. David A. Huffman. A method for the construction of minimum-redundancy codes. Proc. of the Institute of Radio Engineers, 40(9):1098–1101, 1952.
BIG (LINKED) SEMANTIC DATA COMPRESSION PAGE 51
Bibliography
9. Donald E. Knuth. The Art of Computer Programming, volume 3: Sorting and Searching. Addison Wesley, 1973.
1732, 2000.
Mäkinen and Gonzalo Navarro. Dynamic entropy-compressed sequences and full-text indexes. ACM Transactions on Algorithms, 4(3):article 32, 2008.
compressed string dictionaries. Information Systems, 56: 73-108, 2016.
1999.
and Images. Morgan Kaufmann, 1999.
Triples Compression
Let’s the lecture continues…
Image: ROYAL MINT & ALCÁZAR (SEGOVIA, SPAIN)