Overview
Aparecium reconstructs approximate short English text from the complete token-state matrix stored on SentiChain. Reconstruction uses the matrix directly, without loading the encoder or retrieving original posts.
The default model is SentiChain/aparecium-matrix. It accepts native
float32 final hidden states from the pinned
sentence-transformers/all-mpnet-base-v2 encoder. Each matrix has
3 to 256 rows and 768 columns, including its first and last framing rows.
Preserve all state values and row order without pooling or normalization.
Key Features
- Stored matrix input - Reconstructs directly from complete token states
- No source lookup - Does not fetch original posts or use source identifiers for reconstruction
- Ordered batch inference - Processes up to 32 matrices per Python call
- Approximate outputs - Names, numbers, dates, actions and conditions can change or disappear
Architecture
A nonlinear projection maps each visible interior token state to the encoder's original vocabulary. The decoder selects one token per interior row and converts the predicted IDs into text. The known first and last framing positions are removed.
Input Compatibility
The matrix must be complete AutoModel.last_hidden_state output from
the encoder and tokenizer revision specified in the model documentation. A pooled
sentence vector or states from another encoder cannot substitute for this input.
Shape checks alone do not establish encoder provenance.
For padded inputs, attention_masks must identify a visible prefix
followed by right padding. Each visible prefix must include both framing rows.
Stored SentiChain matrices can be passed directly when they contain only visible rows.
Usage
Install the Python package and use Aparecium() to load the default
matrix model. Its weights and tokenizer are downloaded on first use and cached locally.
Matrix reconstruction does not load the original MPNet encoder.
Installation
pip install aparecium
Reconstruct a Public Block
This example purchases one block using your shared Yototec API key, then reconstructs every returned matrix in batches of up to 32. One intentional block purchase costs 1 credit. Preserve the purchase UUID when retrying the same request. The returned block time gives the storage time of the matrices.
import json
import os
import uuid
from urllib.request import Request, urlopen
from aparecium import Aparecium
purchase_id = str(uuid.uuid4())
request = Request(
"https://api.sentichain.com/blockchain/get_block_by_number"
"?network=mainnet&block_number=130624",
headers={
"Authorization": "Bearer " + os.environ["YOTOTEC_API_KEY"],
"User-Agent": "SentiChain-Python",
"Idempotency-Key": purchase_id,
},
)
with urlopen(request, timeout=30) as response:
block = json.load(response)["block"]
matrices = [entry["post_matrix"] for entry in block["transactions"]]
model = Aparecium()
for start in range(0, len(matrices), 32):
results = model.invert_matrices(matrices[start:start + 32])
for result in results:
print("Block time:", block["block_timestamp"])
print(result.text)
The public block contains matrix data and block metadata. Reconstruction needs
no original post text, publication timestamp or account identifier. Results retain
matrix order and contain text, token_ids and
input_rows. CPU is the default device; set device="mps"
explicitly to use a supported Apple GPU.
Inference API
The optional HTTP service accepts complete token matrices at POST /invert.
It listens on the local machine by default. GET /health reports readiness,
and /docs provides the request schema.
Starting the Service
pip install "aparecium[server]"
aparecium-serve --host 127.0.0.1 --port 8000 --device cpu
Request Format
Send exactly one matrix or a batch of 1 to 32 matrices.
Optional attention_mask or attention_masks describe right
padding for the corresponding input. Each matrix follows the full token-state
contract above. Request bodies are limited to 16 MiB, so larger matrices require
smaller batches. Invalid inputs return HTTP 422, oversized bodies return 413,
and an unavailable model returns 503.
Response Format
| Field | Meaning |
|---|---|
| text | Approximate decoded reconstruction, with special tokens skipped |
| token_ids | Predicted IDs for every visible interior row, including predicted special IDs |
| input_rows | Visible row count, including the first and last framing rows |
A batch response contains a results array in input order. Predicted
token IDs are not calibrated confidence estimates of source fidelity.
Model Documentation
The model card describes the released architecture, pinned encoder revision, training provenance and intended use. The benchmark documentation separates token recovery from preservation of financial and timing claims. Those measurements do not establish production accuracy or trading profitability.
Refer to the package documentation for the complete input contract, model loading options and artifact details.
Limitations
- Financial and factual detail - An event's broad meaning can survive while amounts, names, dates, actions, conditions or relationships change
- Encoder compatibility - Only complete token states from the pinned MPNet encoder and tokenizer are supported
- Short English content - Exact quotation recovery, long documents and other languages have not been established
- Independent validation - Reconstructed claims require verification before consequential use
Interpreting Results
Fluent wording and a recognizable event do not prove that a quantity, actor, deadline or condition was preserved. Multiple reconstructions can repeat a shared mistake. Keep missing or uncertain information unresolved rather than treating reconstructed text as verified news or an unattended trading signal.
A matrix signature authenticates the returned matrix against a trusted vectorizer public key. It does not certify the accuracy of reconstructed content. The restricted public block representation is not the complete original signed transaction record.