Get desktop application:
View/edit binary Protocol Buffers messages
KnowledgeBankService defines the service for handling embedding lookup, updates and samples.
Starts a session with the DES server.
The config for processing embedding lookup/update.
The name of the Op that uses dynamic embedding. A name and a config should uniquely identify a session.
A unique key for DES to identify this session.
Lookups the embeddings from a given batch of keys.
A handle to identify which session to use.
List of lookup keys.
If update = true, Lookup should allocate a new entry for a new key and also count frequency, often used in feedforward path in training. Otherwise, it should just be a lookup without changing any internal information, often used in inference.
Maps from keys to their embedding.
Updates the embedding value for a given batch of keys.
A handle to identify which session to use.
A batch of keys and their new values to be updated.
A batch of keys and gradients to be updated.
(message has no fields)
Samples the embeddings value from given context.
A handle to identify which session to use.
A batch of sample contexts.
Number of returned samples per sample context.
If true, allocate new embeddings for positive keys that are not in the knowledge bank.
A batch of results corresponding to the input sample context.
Looks up a dynamic memory layer and returns the corresponding memory data.
A handle to identify which session to use.
List of lookup activations.
Memory lookup result for each input.
Exports current model to a given directory with timestamped subdir.
A handle to identify which session to use.
Path to the export directory.
The saved path for knowledge bank.
The saved path for memory store. Used by DynamicMemory.
Imports the state of DES for a given session_handle.
A handle to identify which session to use.
The saved path for knowledge bank.
The saved path for memory store. Used by DynamicMemory.
(message has no fields)
Used in:
Weights associated with this feature vlaue.
Human-readable informaiton for each of the feature values.
Configurations for a DynamicEmbedding. This is used to decide which storage system is used for storing embeddings and also the corresponding lookup/update/sampling strategy.
Used in:
Used in:
Default embedding for new data.
Set all to zero, same as tf.zero_initializer.
Set a random number between low and high. Same as tf.random_uniform_initializer.
Set a random Gaussian distribution for given (mean, stddev). Same as tf.random_normal_initializer.
Used for random number generation. If true, use deterministic seed.
Used in:
Used in:
Used in:
(message has no fields)
Representation of an embedding vector and its related information.
Used in:
, , , , , , , , ,The lookup key associated with this embedding vector, e.g., normalized keywords or sample IDs.
Weight of the embedding vector, usually contains global information such as word frequency or probability P(w).
Embedding vector.
Metadata, contains more information for the embedding, e.g. category_id.
Timestamp of the embedding, usually used for recording the last time this embedding is updated. Value is in microseconds elapsed since 1/1/1970.
Used in:
Used in:
Weights associated with this feature vlaue.
Human-readable informaiton for each of the feature values.
Config for gradient descent algorithms used in knowledge bank service. Each time the server receives the gradients of the embedding data, it applies the corresponding optimizer to update the embedding data. Gradient update is conducted on the server side to facilitate asynchronous update.
Used in:
Learning rate is used by most algorithms.
Used in:
Initial value for Adagrad accumulator. Recommended value is 0.1.
Used in:
(message has no fields)
Stores the embedding in the proto directly. Note that protocol buffer only allows a small number of entries so only use this for model testing.
Represent the embedding data as a map from string to EmbeddingVectorProto.
Used in:
An InputContext is a list of features that provides the context of an input.
Used in:
,Map from feature name to InputFeature.
A generic sparse/dense feature representation. Each feature must have a unique value list, be it string, float or int. To include addition information for debugging, one can use debug_info.
Used in:
Used in:
Weights associated with this feature vlaue.
Human-readable informaiton for each of the feature values.
MetaData for restoring the state of a KnowledgeBank.
config from the base KnowledgeBank class.
This is used by the subclass implementation of KnowledgeBank to restore its state.
Used in:
,Method to initialize a new embedding.
Implementation is encoded in extension.
Stores the embedding in the LevelDB which facilitates efficient key-value lookup and update. The KnowledgeBankServer first loads all the embedding data from the DB into memory then only updates the data in the DB when Export() is called.
THe address of the LevelDB file.
Number of in-memory partitions for embedding data lookup/update.
Maximal in-memory write buffer size for embedding update. Used for asynchronuous training. If the training is synchronuous, set to 1.
Used in:
Lookup without changing existing memory data.
Lookup keys are used to update existing memory data, but new clusters would not be created.
Lookup keys are used to update existing memory data, and a new cluster can be created if the lookup input is too far away from existing ones.
Config for constructing a phrase EmbeddingLookup used for sentence embedding.
Used in:
Config for the embedding data that is stored in the LevelDB.
Used in:
Config for the embedding data that are stored in a TFRecord file, The key of each embedding is stored in the EmbeddingVectorProto.tag field.
Used in:
The path to the TFRecord file.
Used in:
Sampled results.
A sparse features embedding consists of a phrase embedding lookup and meta_data for composition.
Config for phrase embedding lookup.
MetaData for computing the sparse features embedding.
Information used during serving of sentence embedding. It should be paired with a PhraseEmbeddingLookup in serving.
Used in:
Embedding dimension, should be the same as keyword embedding.
Used for computing sigma(x) from the last sigma_dimension of the embedding data and if this is set, params should contain "sigma_kernel" and "sigma_bias" for the computation.
Parameters for computing the sparse features embedding. For example, in the case of the paper (https://openreview.net/pdf?id=SyK00v5xx), the parameter should be params.feature_map["a"] as used for computing weight $a / (P(w) + a)$ for each phrase w.
Context free embedding or also known as v_c in CAML, can be used for OOV embedding in NN model. If combine_method = WEIGHTED_BY_FREQ, it represents the principal component computed from all sentence embeddings. The size should equal to embedding_dimension.
Combine method for computing the embedding of a sentence or a phrase.
Used in:
Compute the weight of a phrase by $a / (P(w) + a)$ and require params['a'] to be set. P(w) (phrase frequency) is stored in the weight field of the embedding. See the paper https://openreview.net/pdf?id=SyK00v5xx for more details.
Simply $\sum_w (1 - \sigma(w)) emb_s(w)$ and $\sigma(w)$ is computed by projecting `emb(w)` to the line segment connecting `emb_i(w)` and `v_c`, where `emb_s(w)` is the component left by remove vc component from `emb(w)`. This is used for reembedding.
Computes the full $\sum_X ((1 - \sigma(x)) emb_s(x) + \sigma(x) v_c)$ where $\sigma(x)$ is computed by using the sigma_dimension in MetaData, namely $1 / (1 + exp(-(sigma_kernel * w[-sigma_dimension:-1]+ sigma_bias)))$. `emb_s(x)` is `w[:embedding_dimension]`. This is used by embeddings learned from training.
Simply compute the mean of segmented phrase embeddings.
(message has no fields)
Used in:
Weights associated with this feature vlaue.
Human-readable information for each of the feature values.