Original: I NTERPRETABLE R ELATIONAL R EPRESENTATIONS FOR F OOD I NGREDIENT R ECOMMENDATION S YSTEMS
Revised: I NTERPRETABLE R ELATIONAL R EPRESENTATIONS FOR F OOD I NGREDIENT R ECOMMENDATION S YSTEMS

Original: Anonymous authors
Revised: Anonymous authors

Original: Paper under double-blind review
Revised: Paper under double-blind review

Original: A BSTRACT
Revised: A BSTRACT

Original: Supporting chefs with ingredient recommender systems to create new recipes is challenging, as good ingredient combinations depend on many factors like taste, smell, cuisine style, texture among others.
Revised: Supporting chefs with ingredient recommender systems to create new recipes is challenging, as good ingredient combinations depend on many factors like taste, smell, cuisine style, texture among others.

Original: There have been few attempts to address these issues using machine learning.
Revised: There have been few attempts to address these issues using machine learning.

Original: Importantly, useful models do obviously need to be accurate but importantly – especially for food professionals – interpretable.
Revised: Useful Machine Learning models do obviously need to be accurate but importantly – especially for food professionals – interpretable.

Original: In order to address these issues, we propose the Interpretable Relational Representation Model (IRRM).
Revised: In order to address these issues, we propose the Interpretable Relational Representation Model (IRRM).

Original: The main component of the model is a key-value memory network to represent relationships of ingredients.
Revised: The main component of the model is a key-value memory network to represent relationships of ingredients.

Original: We propose and test two variants of the model.
Revised: We propose and test two variants of the model.

Original: One can learn latent relational representations over a trainable memory network (Implicit model), and the other can learn explainable relational representations over a pre-trained memory network that integrates an external knowledge base (Explicit model).
Revised: One can learn latent relational representations over a trainable memory network (Implicit model), and the other can learn explainable relational representations over a pre-trained memory network that integrates an external knowledge base (Explicit model).

Original: The relational representations resulting from the model are interpretable – they allow to inspect why certain ingredient pairings have been suggested.
Revised: The relational representations resulting from the model are interpretable – they allow to inspect why certain ingredient pairings have been suggested.

Original: The Explicit model additionally allows to integrate any number of manually speciﬁed constraints.
Revised: The Explicit model additionally allows to integrate any number of manually speciﬁed constraints.

Original: We conduct experiments on two recipe datasets, including CulinaryDB with 45,772 recipes and Flavornet with 55,001 recipes, respectively.
Revised: We conduct experiments on two recipe datasets, including CulinaryDB with 45,772 recipes and Flavornet with 55,001 recipes, respectively.

Original: The experimental results show that our models are both predictive and informative.
Revised: The experimental results show that our models are both predictive and informative.

Original:  I NTRODUCTION
Revised:  I NTRODUCTION

Original: Due to the increasing availability of food related content – data mining and machine learning methods play an increasingly prominent role in food preference modelling, foodparing which discover good ingredient combinations, and new recipe generation.
Revised: Data mining and machine learning methods play an increasingly prominent role in food preference modeling, food ingredient pairing discovery and new recipe generation .

Original: Solving these tasks is non-trivial, since the goodness of ingredient combinations depends on many factors like taste, smell, cuisine, texture, andtheir culture.
Revised: Solving these tasks is nontrivial, since the goodness of ingredient combinations depends on many factors like taste, smell, cuisine, texture, and culture.

Original: Ahn et al.
Revised: Ahn et al.

Original: (2011) detected that the number of shares of ﬂavor molecules between ingredients is one of important factors for food paring.
Revised: (2011) detected that the number of shared ﬂavor molecules between ingredients is one of important factors for food pairing.

Original: They found Western cuisines show  tendency to use ingredient pairs that share many ﬂavor compound, while East Asian cuisines tend to avoid compound sharing ingredients.
Revised: They found Western cuisines show a tendency to use ingredient pairs that share many ﬂavor compounds, while East Asian cuisines tend to avoid compound sharing ingredients.

Original: Using this idea, Garg et al.
Revised: Using this idea, Garg et al.

Original: (2017) developed a rule-based food paring system which ranks ingredients based on the number of shares of ﬂavor molecules.
Revised: (2017) developed a rule-based food pairing system which ranks ingredients based on the number of shares of ﬂavor molecules.

Original: Recently, Park et al.
Revised: Recently, Park et al.

Original: (2019) suggested a neural network approach based on ﬂavor molecules and co-occurrence of ingredients in recipes.
Revised: (2019) suggested a neural network approach based on ﬂavor molecules and co-occurrence of ingredients in recipes.

Original: These approaches focus on one-to-one food paring.
Revised: These approaches focus on one-to-one food pairing.

Original: There are also some researches related with many-to-one paring.
Revised: There is also research related to many-to-one pairing.

Original: De Clercq et al.
Revised: De Clercq et al.

Original: (2016) proposed the recipe completion task which assumes the situation forpreparing a meal using some leftover ingredients in a refrigerator, and then adopted arecommender style approaches with Matrix Factorization.
Revised: (2016) proposed the Recipe Completion Task which tries to identify matching ingredients for a partial list of ingredients (the recipe) using a Matrix Factorization based recommender system.

Original: Although efforts have been made to detect good ingredient combinations, there isstill no  method  that can interpretthe reasons why suggested pairs are good.
Revised: Although efforts have been made to detect good ingredient combinations, there is no current Machine Learning method in this ﬁeld that allows to interpret why suggested pairs are good.

Original: Our work is targeted at interpretable recommendation systems forthe food pairing, that is, given some preselected ingredients  by an user, the recommender suggests top-N ingredients from  candidates.Therefore, our models support both one-to-one and many-to-one paring.
Revised: Our work is targeted at interpretable recommendation systems for food pairing and recipe completion. Given a set of pre-selected ingredients (cardinality 1 or more) by a user, the recommender suggests top-N ingredients from a set of candidates.

Original: For example, suppose an user selects apple and chocolate as the preselected ingredients, our recommender suggests some good paired ingredients (e.g. cinnamon ) with reasons (e.g. cinnamon is good for apple and chocolate in terms of their ﬂavor afﬁnity).
Revised: For example, suppose a user selects apple and chocolate as the pre-selected ingredients, our recommender suggests some good paired ingredients (e.g. cinnamon ) and also identiﬁes reasons (e.g. cinnamon is good for apple and chocolate in terms of their ﬂavor afﬁnity).

Original: In this paper, we propose the Interpretable Relational Representations Model (IRRM) in two variants to address food pairing.
Revised: For this, we propose the Interpretable Relational Representations Model (IRRM) in two variants to address food pairing and recipe completion tasks.

Original: The model features a key-value memory network (Sukhbaatar et al.
Revised: The model features a key-value memory network (Sukhbaatar et al.

Original: (2015), Miller et al.
Revised: (2015), Miller et al.

Original: (2016)) to represent relationships of ingredients.
Revised: (2016)) to represent relationships of ingredients.

Original: One variant of the model is trained to learn latent relational representations over the trainable memory network (Implicit model), and the other  can learn explainable relational representations over the pre-trained memory network which integrates an external knowledge base (Explicitly model).
Revised: One variant of the model is trained to learn latent relational representations over a trainable memory network (Implicit Model). The other model can learn explainable relational representations over the pretrained memory network integrating an external knowledge base (Explicit Model).

Original: The relational representations are interpretable and can be queried as to the reasons why the ingredients have been suggested.
Revised: The relational representations are interpretable and can be queried as to the reasons why the ingredients have been suggested.

Original: The

Original:  Explicit model can integrate any number of constraints which can be decided manually based on the characteristics of the desired recommender system.
Revised: The Explicit model can integrate any number of constraints which can be decided manually based on the characteristics of the desired recommender system.

Original: Our contributions are as follows:
Revised: Our contributions are as follows:

Original: We model ingredient pairing as a general recommendation task with implicit feedback.
Revised: We model ingredient pairing as a general recommendation task with implicit feedback.

Original: We introduce the Interpretable Relational Representations Model
Revised: We introduce the Interpretable Relational Representations Model

Original: and it’s two variants: Implicit and Explicit.
Revised: and it’s two variants: Implicit and Explicit.

Original: Both of which can learn pair speciﬁc relational representations (vectors) for one-to-one (i
Revised: Both of which can learn pair speciﬁc relational representations (vectors) for one-to-one (i

Original: e. ingredient to ingredient) and many-to-one (ingredient-set to ingredient) food pairing tasks.
Revised: e. ingredient to ingredient) and many-to-one (ingredient-set to ingredient) food pairing tasks.

Original: The relational vectors are also interpretable.
Revised: The relational vectors are also interpretable.

Original: We propose a training procedure to learn one-to-one and many-to-one relationships effectively using recipes.
Revised: We propose a training procedure to learn one-to-one and many-to-one relationships effectively using recipes.

Original: We evaluate our proposed models in the Recipe Completion Task and the Artiﬁcial Food Paring Task on the CulinaryDB and the Flavornet datasets.
Revised: We evaluate our proposed models in the Recipe Completion Task and the Artiﬁcial Food pairing Task on the CulinaryDB and the Flavornet datasets.

Original: Our proposed approaches demonstrate competitive results on all datasets, outperforming many other baselines.
Revised: Our proposed approaches demonstrate competitive results on all datasets, outperforming many other baselines.

Original: We perform qualitative analysis.
Revised: We perform qualitative analysis.

Original: The results presents our proposed Explicit model is capable of unraveling hidden ingredients structures within recipes
Revised: The results presents our proposed Explicit model is capable of unraveling hidden ingredients structures within recipes.  R ELATED W ORK

Revised: There are two related streams of work in recommender systems that are important for this paper: the session-based setting and the knowledge-aware systems .

Revised: In the session-based setting, user proﬁle can be constructed from past user behavior.

Original: P ROBLEM D EFINITION
Revised: A natural solution to this problem is the item-to-item recommendation approach. A variety of methods exist for this problem. For example, Quadrana et al. (2017) models the item sequence using RNNs, Kang & McAuley (2018) uses Self-Attention layers, and Wu et al.

Revised: (2020) uses Transformer layers.

Revised: While these methods mainly focus on how to encode item click-sequence interactions, we target good ingredient pairing using only ingredient attributes and the relationship between a ingredient set and an ingredient based on co-occurrence in recipes.

Revised: For this we develop a new architecture integrating set encoders and relational memory with novel loss and score functions.

Revised: There are also increasingly methods for integrating knowledge into recommenders.

Revised: Zhang et al.

Revised: (2016) and Cheng et al.

Revised: (2016) directly incorporate user and item features as user proﬁle into neural network models.

Revised: Huang et al.

Revised: and Wang & Cai (2020) integrate them using a pre-trained knowledge graph.

Revised: These methods try to represent user context using external knowledge base, therefore, usually these knowledge embeddings are integrated to user embeddings.

Revised: In this work, we incorporate knowledge speciﬁcally to detect relationships between an ingredient set and an ingredient for interpretation to improve recommendation performance.

Revised:  P ROBLEM D EFINITION

Original: We ﬁrst introduce the notations used throughout this paper.
Revised: We ﬁrst introduce the notations used throughout this paper.

Original: We model ingredient pairing as a recommendation scenario with implicit feedback (Huang et al. (2018), Tay et al.
Revised: We model recipe completion as a recommendation scenario with implicit feedback (Huang et al., 2018, Tay et al., 2018.

Original: (2018)), where the only concern is whether a user has interacted with an item and the system infers the item that user will interact next based on the interaction records of the user.
Revised: In such scenarios, a user has interacted with an item and the system infers the item that user will interact next based on the interaction records of the user.

Original: In our food ingredient recommendation system, we use recipes instead of the interaction records.
Revised: We apply this to the food domain by using recipes as interaction records.

Original: Let I denote a set of ingredients and { i 1 , . .
Revised: Let I denote a set of ingredients and { i 1 , . .

Original: , i M } denote a preselected ingredient set, where i ∈ I is the ingredient and M is the number of ingredients.
Revised: , i M } denote a pre-selected ingredient set, where i ∈ I is the ingredient and M is the number of ingredients.

Original: We call { i 1 , . . .
Revised: We call { i 1 , . . .

Original: , i M } preselected ingredients or a preselected ingredient set in this paper.
Revised: , i M } pre-selected ingredient set in this paper.

Original: Next, let I candidate denote a set of candidate ingredients which depends on each preselected ingredient set, that is, I candidate =
Revised: Next, let I candidate denotes a set of candidate ingredients. I candidate depends on each pre-selected ingredient set, that is, I candidate =

Original: I − { i 1 , . . .
Revised: I − { i 1 , . . .

Original: , i M } .
Revised: , i M } .

Original: We call I candidate candidate ingredients or a candidate ingredient set.

Original: In addition, we assume that a knowledge base (KB) of ingredients is also available and the KB contains factors which are related to why some ingredients are goodfor combinations.
Revised: In addition, we assume that a knowledge base (KB) of ingredients is also available and the KB contains factors which are related to why some ingredients are good combinations.

Original: A KB is deﬁned as a set of triplets over a entity set E and a relationship set L .
Revised: A KB is deﬁned as a set of triplets over a ingredient set ingredient :

Original: A KB triplet (cid:104) e i , l, e a (cid:105) composed of two entities e i , e a ∈ E and a relationship l ∈ L , where e i is an ingredient (e.i. e i ∈ I ) and l is an attribute and e a is the attribute value. For instance, (cid:104) apple, ﬂavorMolecule, (-)-Epicatechin (cid:105) denotes that apple contains the (-)-Epicatechin ﬂavor molecule. Based on these preliminaries, we deﬁne the food ingredient recommendation task.
Revised: ○○

Original: Given a preselected ingredient set { i 1 , . . . , i M } and candidate ingredients I candidate , we would like to infer the top-N ingredients from I candidate .  R ECOMMENDATIONS WITH M EMORY N ETWORK In this section, we introduce our IRRM architectures.
Revised: ○○

Original: We start with the Implicit model that consists of a trainable key-value memory network. We then augument the Implicit model using a key-value memory network which integrates pre-trained entity and relationship vectors with ingredient attributes in the KBs – we call this extention the Explicit model. The overall model architecture is described in Figure 1. Our models aim to model preselected ingredient sets, ingredients, and relationships of pairs between a preselected ingredient set and an ingredient.
Revised: ○

Original: The input of our models is a pair between a preselected ingredient set and an candidate ingredient i candidate ∈ I candidate , and the output is a score of the pair. In the prediction phase, our recommender uses these models to rank I candidate . [Figure] set ingredient : ○
Revised: ○

Original: ○○ ○
Revised: ○ ○

Original: ○ ○
Revised: ○ ○

Original: ○ ○
Revised: ○ ○

Original: ○○ ○ ○
Revised: ○

Original: ○ ○○
Revised: ○ ○

Original: ○
Revised: ○

Original: ○○ k 1 k 2 kkv 1 v 2 vvp
Revised: ○○ k 1 k 2 kkv 1 v 2 vvp

Original: Scoring s(p, q’, r)
Revised: Scoring s(p, q’, r)

Original: Scoring s(p, q, r) q
Revised: Scoring s(p, q, r) q

Original: Negativeexample
Revised: Negativeexample

Original: Loss 0000100:0000100:
Revised: Loss 0000100:0000100:

Original: Ingredient Set Encoder ○
Revised: Ingredient Set Encoder ○

Original: ○ ○
Revised: ○ ○

Original: ○ ○
Revised: ○ ○

Original: ○ r Add&Norm + Sum
Revised: ○ r Add&Norm + Sum

Original: Ingredient EmbeddingLayer
Revised: Ingredient EmbeddingLayer

Original: Softmax ○○
Revised: Softmax ○○

Original: ○
Revised: ○

Original: ○
Revised: ○

Original: ○○ q’
Revised: ○○ q’

Original: Residual connection (a) Implicit model : :
Revised: Residual connection (a) Implicit model : :

Original: Ingredient EmbeddingLayer ○
Revised: Ingredient EmbeddingLayer ○

Original: ○ ○
Revised: ○ ○

Original: ○ ○
Revised: ○ ○

Original: ○ ○
Revised: ○ ○

Original: ○ ○
Revised: ○ ○

Original: ○
Revised: ○

Original: ○○ k 1 k 2 kkv 1 v 

Revised: ○○ k 1 k 2 kkv 1 v

Original: vv○○
Revised: vv○○

Original: ○
Revised: ○

Original: ○ ○
Revised: ○ ○

Original: ○
Revised: ○

Original: Scorings(p, q’, r)
Revised: Scorings(p, q’, r)

Original: Scorings(p, q, r) q r ingredient set ○
Revised: Scorings(p, q, r) q r ingredient set ○

Original: ○ ○
Revised: ○ ○

Original: ○ ○
Revised: ○ ○

Original: ○ p
Revised: ○ p

Original: e
Revised: e

Original: i 1:M ○○
Revised: i 1:M ○○

Original: ○
Revised: ○

Original: ○ ○
Revised: ○ ○

Original: TransE pretrained ○
Revised: TransE pretrained ○

Original: ○ ○
Revised: ○ ○

Original: ○ ○
Revised: ○ ○

Original: ○ ○
Revised: ○ ○

Original: ○
Revised: ○

Original: ○○ l att 1:N
Revised: ○○ l att 1:N

Original: Writer
Revised: Writer

Original: Writer [Figure]
Revised: Writer ingredient :

Original: [Figure] Set Encoder
Revised: Ingredient Set Encoder

Original: Add&Norm e i candidate + Sum write write write ○
Revised: Add&Norm e i candidate + Sum write write write ○

Original: ○
Revised: ○

Original: ○ ○
Revised: ○ ○

Original: ○○ q’ Negativeexample
Revised: ○○ q’ Negativeexample

Original: Softmax
Revised: Softmax

Original: Loss
Revised: Loss

Revised: Residual connection (b) Explicit model entity set E and a relationship set L .

Original: [Figure]
Revised: A KB triplet (cid:104) e i , l, e a (cid:105) composed of two entities e i , e a ∈ E and a relationship l ∈ L , where e i is an ingredient (e.i. e i ∈ I ) and l is an attribute and e a is the attribute value. For instance, (cid:104) apple, ﬂavorMolecule, (-)-Epicatechin (cid:105) denotes that apple contains the (-)-Epicatechin ﬂavor molecule. Based on these preliminaries, we deﬁne the food ingredient recommendation task.

Original: [Figure]
Revised: Given a preselected ingredient set { i 1 , . . . , i M } and candidate ingredients I candidate , we would like to infer the top-N ingredients from I candidate .  R ECOMMENDATIONS WITH M EMORY N ETWORKS In this section, we introduce the IRRM architectures.

Original: Explicit model 
Revised: We start with the Implicit model that consists of a trainable key-value memory network. We then augment the Implicit model using a key-value memory network which integrates pre-trained entity and relationship vectors with ingredient attributes in the KBs – we call this extention the Explicit model. The overall architecture is described in Figure 1. The input of our architecture are a pre-selected ingredient set and a candidate ingredient i candidate ∈

Revised: I candidate .

Revised: The output is a score.

Revised: In inference, our recommender uses these scores to rank I candidate .

Original: 3. I NGREDIENT E MBEDDING L AYER AND I NGREDIENT S ET E NCODER
Revised: 4. I NGREDIENT E MBEDDING L AYER AND I NGREDIENT S ET E NCODER

Original: Ingredients are represented asvectors encoded via one-hot encoding  (corresponding to a unique index key belonging to each ingredient).
Revised: Ingredients are represented as one-hot encoding vectors (corresponding to a unique index key belonging to each ingredient).

Original: At the embedding layer,this one-hot encoded vector is converted into a low-dimensional real-valued dense vector representation which is multiplied with the embedding matrices Q ∈ R d ×|I| – which stores ingredient embeddings.
Revised: At the embedding layer, this one-hot encoded vector is converted into a low-dimensional real-valued dense vector representation which is multiplied with the embedding matrices Q ∈ R d ×|I| – which stores ingredient embeddings.

Original: d is the dimensionality of the ingredient embeddings while |I| is the total number of ingredients.
Revised: d is the dimensionality of the ingredient embeddings while |I| is the total number of ingredients.

Original: i candidate is converted to q using this embedding layer.
Revised: i candidate is converted to q using this embedding layer.

Original: On the other hand, the preselected ingredients { i 1 , . ..
Revised: On the other hand, pre-selected ingredients { i 1 , . .

Original: , i M } is encoded by the Ingredient Set Encoder (Figure 6).
Revised: , i M } are encoded by the Ingredient Set Encoder (Figure 6).

Original: At ﬁrst, each ingredient i j is converted to a vector using the Ingredient Embedding Layer (same as i candidate ).
Revised: At ﬁrst, each ingredient i j is converted to a vector using the Ingredient Embedding Layer (same as i candidate ).

Original: As a result, i j ∈ R d vectors are generated.
Revised: As a result, i j ∈ R d vectors are generated.

Original: The sum of these vectors is converted to the ingredient set vector p using a feed-forward network with a single hidden layer, followed by Layer Normalization.
Revised: The sum of these vectors is converted to the ingredient set vector p using a feed-forward network with a single hidden layer, followed by Layer Normalization.

Original: 3. R ELATION E NCODER
Revised: 4. R ELATION E NCODER

Original: Tay et al.
Revised: Tay et al.

Original: (2018) introducedthe LRAM (Latent Relational Attentive Memory) module in order to generatethe latent relational vectors between user-item interactions, which gives insight and interpetability of the model.
Revised: (2018) introduced LRAM (Latent Relational Attentive Memory), in order, to generate latent relational vectors between user-item interactions.

Original: In order to improve performance, we expand this module by adding a residual connection, followed by Layer Normalization.
Revised: We expand this module by adding a residual connection, followed by Layer Normalization.

Original: This idea is inspired by Vaswani et al.
Revised: This idea is inspired by Vaswani et al.

Original: Given the pair of a preselected ingredient set vector and a candidate ingredient vector, (cid:104) p , q (cid:105) , the
Revised: Given the pair of a pre-selected ingredient set vector and a candidate ingredient vector, (cid:104) p , q (cid:105) , the

Original: Relation Encoder ﬁrst applies s = p + q to generate the joint embedding of p and q .
Revised: Relation Encoder ﬁrst applies s = p + q to generate the joint embedding of p and q .

Original: The generated vector s ∈ R d is of the same dimension of p and q .
Revised: The generated vector s ∈ R d is of the same dimension of p and q .

Original: Note that while other  functions like the element-wise multiplication and the multi-layered perceptron MLP ( p , q ) are also available, we found thatthe addition performs better.
Revised: Note we also tried other transfer functions here such as element-wise multiplication or just using a multi-layered perceptron MLP ( p , q ) . However, we found that addition performs best.

Original: This joint embedding s is used as the input of the memory network.
Revised: This joint embedding s is used as the input of the memory network.

Original: The attention vector a ∈ R d is a vector of importance weights over keys which are represented as the key matrix K =
Revised: The attention vector a ∈ R d is a vector of importance weights over keys which are represented as the key matrix K =

Original: [ k 1 , . . .
Revised: [ k 1 , . . .

Original: , k N ] T ∈ R N × d , where N is the number of key-value pairs in the memory network and
Revised: , k N ] T ∈ R N × d , where N is the number of key-value pairs in the memory network and

Original: k j ∈ R d is a key vector.
Revised: k j ∈ R d is a key vector.

Original: Each element of the attention vector a can be deﬁned as a j = s T k j , where a j ∈ R .
Revised: Each element of the attention vector a can be deﬁned as a j = s T k j , where a j ∈ R .

Original: In order to normalize the attention vector a to a probability distribution, we use the Softmax function: Softmax ( a j ) =
Revised: In order to normalize the attention vector a to a probability distribution, we use the Softmax function: Softmax ( a j ) =

Original: exp( a j ) (cid:80) Nn
Revised: exp( a j ) (cid:80) Nn

Original: =1 exp( a n ) .
Revised: =1 exp( a n ) .

Original: We generate the vector m = (cid:80) Nn =1 Softmax ( a n ) v n as the summation of weighted value vectors which are represented as the value matrix V =
Revised: We generate the vector m = (cid:80) Nn =1 Softmax ( a n ) v n as the summation of weighted value vectors which are represented as the value matrix V =

Original: [ v 1 , . . .
Revised: [ v 1 , . . .

Original: , v N ] T ∈ R N × d .
Revised: , v N ] T ∈ R N × d .

Original: Finally, in order to generate the relational vector  r , m is added with the joint embedding s and Layer Normalization is applied like r =LayerNorm
Revised: Finally, in order to generate the relational vector – r , m is added with the joint embedding s and Layer Normalization is applied as follows r =

Original:  ( s + m ).
Revised: LayerNorm ( s + m )

Original: 3.2. T HE E XPLICIT M ODEL
Revised: . 4.2. T HE E XPLICIT M ODEL

Original: In order to improve interpretability and predictive performance, we incorporate ingredient attribute information from a given KB into the memory network.
Revised: In order to improve interpretability and predictive performance, we incorporate ingredient attribute information from a given KB into the memory network.

Original: Inspired by recent works which integrate a memory network with external memories (Huang et al.
Revised: Inspired by recent works which integrate a memory network with external memories (Huang et al.

Original: , we propose the Explicit Relational
Revised: , we propose the Explicit Relational

Original: Encoder.
Revised: Encoder.

Original: Instead of the trainable key matrix K and value matrix V , we use pre-trained vectorswhich are trained over the KB in advance.
Revised: Instead of the trainable key matrix K and value matrix V , we pre-train vectors over a given KB.

Original: The key and value matrix are frozen in our explicit model training.
Revised: We then freeze key and value matrix for training the explicit model.

Original: Given a pair of a preselected ingredient set { i 1 , . . .
Revised: Given a pair of a preselected ingredient set { i 1 , . . .

Original: , i M } and an candidate ingredient i candidate , { i 1 , . . .
Revised: , i M } and a candidate ingredient i candidate , { i 1 , . . .

Original: , i M , i candidate } is converted into the entity vectors using the KB embeddings which provide the entity vectors e ∈ R d KB and the relationship vectors l ∈ R d KB .
Revised: , i M , i candidate } is converted into the entity vectors using the KB embeddings which provide the entity vectors e ∈ R d KB and the relationship vectors l ∈ R d KB .

Original: Note that in case of d KB (cid:54) =
Revised: Note that in case of d KB (cid:54) =

Original: d , we convert the joint embedding s ∈ R d into s (cid:48)
Revised: d , we convert the joint embedding s ∈ R d into s (cid:48)

Original: ∈ R d KB and the relational vector r ∈ R d KB into r (cid:48) ∈ R d with linear projections.
Revised: ∈ R d KB and the relational vector r ∈ R d KB into r (cid:48) ∈ R d with linear projections.

Original: We use the TransE (Bordes et al.
Revised: We use the TransE (Bordes et al.

Original: for the KB embeddings.
Revised: for the KB embeddings.

Original: Because, giventhe triplet (cid:104) e i , l att , e iatt (cid:105) ,the TransE can learn entity vectors and relationship vectors to follow e iatt 
Revised: The reason for this choice is that given triplet (cid:104) e i , l att , e iatt (cid:105) , TransE can learn entity vectors and relationship vectors to follow e iatt =

Original: = e i + l att .
Revised: e i + l att .

Original: KB relationships usually correspond to attribute types of entities, so we use the notation l att as the attribute type and e iatt as its value.
Revised: KB relationships usually correspond to attribute types of entities, so we use the notation l att as the attribute type and e iatt as its value.

Original: Hence, we set the key matrix like the following:
Revised: Hence, we set the key matrix as follows:

Original: [Equation]
Revised: [Equation]

Original: where N depends on the number of attribute types which you want to integrateinto and K isthe constantmatrix through training.
Revised: where N depends on the number of attribute types which you want to integrate and K is constant through training.

Original: And the value matrix is initialized for the each pair based on:
Revised: The value matrix is initialized as follows:

Original: [Equation]
Revised: [Equation]

Original: Since there are many one-to-multiple relations inKB, e.g. the  apple has multiple ﬂavor molecules in case the attribute type is flavorMolecule , the entity vector e att on the KB embeddings is not the ingredient speciﬁc vector. Hence, we use e i + l att instead of using e att .
Revised: There can be many one-to-multiple relations in the KB. For instance, an apple has multiple ﬂavor molecules. Therefore, the entity vector e att should not be an ingredient speciﬁc vector and we use e i + l att instead of using e att .

Original: 3. SCORE FUNCTION
Revised: 4. SCORE FUNCTION

Original: Finally, we deﬁne our score function as the relationship between the preselected ingredient set vector p , the candidate ingredient vector q , and the relational vector r :
Revised: Finally, we deﬁne our score function as the relationship between the pre-selected ingredient set vector p , the candidate ingredient vector q , and the relational vector r :

Original: [Equation]
Revised: [Equation]

Original: where CosSim is the cosine similarity, and good pairs will have high scores and vice versa.
Revised: where CosSim is the cosine similarity, and good pairs will have high scores etc.

Original: We show the geometric differences between our score function and others in Figure 2.
Revised: Figure 2 shows the geometric differences between our score function and other possible ones.

Original: While Figure2(a) tries to place the ingredient set and each ingredient into the same spot in vector space, Figure2(b) learns to ﬁt the ingredient set and each ingredient with the relational vector r , which concepts come from translation between user and item in the domain of collaborative ﬁltering.
Revised: Figure2(a) tries to place the ingredient set and each ingredient into the same spot in vector space, Figure2(b) learns to ﬁt the ingredient set and each ingredient with the relational vector r . This score function is often used in the domain of collaborative ﬁltering.

Original: These score functions  are suggested in previous works.
Revised: The score functions a and b are suggested in previous work.

Original: Tay et al.
Revised: Tay et al.

Original: (2018) reported −|| p + r − q || could achieve better performance than −|| p − q || in the domain of collaborative ﬁltering, which is the user-item based recommender.
Revised: (2018) reported −|| p + r − q || could achieve better performance than −|| p − q || in the domain of collaborative ﬁltering, which is the user-item based recommender.

Original: However, in the food pairing task, the results was the opposite.
Revised: However, in the food pairing task, the result was the opposite.

Original: It seems if we use −|| p + r − q || , because of r , p and q can not be trained properly.
Revised: It seems if we use −|| p + r − q || , because of r , p and q can not be trained properly.

Original: As r approaches (cid:126) 0 , the performance is improved, so the representation of r cannot be learned.
Revised: As r approaches (cid:126) 0 , the performance is improved, so the representation of r cannot be learned.

Original: Since the ingredient set is a mixture rather than a list of ingredients, andit is also an ingredient like a kind of processed ingredient, this result is reasonable.
Revised: This makes sense, since the ingredient set is a mixture rather than a list of ingredient and ingredient sets can be seen as a single processed ingredient.

Original: In addition, since our network structure is symmetric with respect to p and q , we adopt the score function which is a symmetric bilinear form (Figure2(c)).
Revised: r [Figure]

Original: Our score function tries to place the ingredient set p and each ingredient q into the same spot in vector space and rotate the relationship between p and q closer to the same place as a relational vector r which is represented using attributes from KB.
Revised: Ing. Set Ing.

Original: 3. O BJECTIVE F UNCTION
Revised: Ing. Set Ing. Ing.

Original: Our objective function is deﬁned as:
Revised: Set r (a) -|| p – q || (b) -|| p + r – q || (c) Ours: CosSim ( p , q ) + CosSim ( p + q , r ) p q q q p p

Original: [Equation]
Revised: [Figure]

Original: where λ is the margin that separates the golden pairs and corrupted pairs, τ is the temperature parameter, Batch is the mini-batch size, Pos is the number of positive examples, Neg is the number [Figure] r (a) [Figure]
Revised: Therefore, we propose to use a score function (Figure2(c)) that tries to place the ingredient set p and each ingredient q into the same location in vector space and rotate the relationship between p and q closer to the same place as a relational vector r which is represented using attributes from KB.

Original: || [Figure] | [Figure]
Revised: In addition, since our network structure is symmetric with respect to p and q , we require a symmetric bilinear score function .

Original: [Figure] [Figure] | [Figure]
Revised: 4. O BJECTIVE F UNCTION

Original: (c) [Figure] q ) [Figure]
Revised: Our objective function is deﬁned as:

Original: p +

Original: [Figure]

Original: [Figure]
Revised: [Equation]

Original: q p p

Original: [Figure] [Figure] [Figure] of negative examples for each positive example, and the score function for negative examples take the same relational vector as their positive example.
Revised: where λ is the margin that separates the golden pairs and corrupted pairs, τ is a temperature parameter, Batch is the mini-batch size, Pos is the number of positive examples, Neg is the number of negative examples for each positive example, and the score function for negative examples take the same relational vector as their positive example.

Original: In oder to deﬁne this objective function, we refer to the Batch All loss (Hermans et al.
Revised: In order, to deﬁne this objective function, we combine the Batch All loss (Hermans et al.

Original: for the effective triplet loss in Metric Learning and the additive margin in the softmax loss (Huang et al.
Revised: with the effective triplet loss in Metric Learning and the additive margin in the softmax loss (Wang et al.

Original: Note that while the hinge loss is also available, we found  the softmax loss is better performance and stable for customizing the deﬁnition of score functions.
Revised: Note that while the hinge loss is also possible, we found that the softmax loss has better performance and is more stable.

Original: 3. T RAINING
Revised: 4. T RAINING

Original: In this section, we propose how to generate mini-batches from recipes in our training scheme, which is inspired by the Session-Parallel mini-batches (Hidasi et al.

Original: and the Link Prediction based on Graph Neural Networks (Zhang & Chen (2018)).

Original: In the Graph domain, nodes are embedded by neighbor nodes which are used as its context, e.g. local enclosing subgraphs (Zhang & Chen (2018)).

Original: Since each recipe is like the local enclosing subgraph, we generate a mini-batch to have the recipe related pairs parallelly.

Original: Beforehand we eliminate ingredients which has no attributes and then remove recipes which size is less than 1. Using pre-processed recipes, we train our models in the following steps (Figure 3):
Revised: Using pre-processed recipes (removed all ingredients without attributes and empty recipes), we train our models in the following steps (Figure 3):

Original: At ﬁrst, we randomize the order of recipes and its ingredients (Figure 3(1)), and then generate the sequence of ingredients from recipes (Figure 3(2)).
Revised: At ﬁrst, we randomize the order of recipes and its ingredients (Figure 3(1)), and then generate the sequence of ingredients from recipes (Figure 3(2)).

Original: After that, we generate pairs between a preselected ingredient set and a candidate ingredient from the sequence like Figure 3(3) and loosely make pairs from same recipes belong to the same mini-batch.
Revised: After that, we generate pairs between a pre-selected ingredient set and a candidate ingredient from the sequence (see Figure 3/3) and loosely make pairs from same recipes belong to the same minibatch.

Original: Next, we sample additional positive examples as necessary which are taken from other recipes randomly.
Revised: Next, we sample additional positive examples as necessary which are taken from other recipes randomly.

Original: Finally, we sample negative examples randomly.
Revised: Finally, we sample negative examples randomly.

Original: In the end, mini-batches are generated.
Revised: In the end, mini-batches are generated.

Original: Note that although we also trained our models without the recipe restriction, the performance was degraded in both one-to-one and many-to-one pairs.
Revised: Note, we also trained our models without the recipe restriction. However, performance was worse in both one-to-one and many-to-one pairs.

Original:  E VALUATION
Revised:  E VALUATION

Original: We evaluated theIRRMs, the Implicit model and the Explicit model, on two tasks against standard baselines and we analyzed the relational representations in terms of interpretability.
Revised: We evaluated the the Implicit model and the Explicit model on two tasks against standard baselines and we analyzed the relational representations in terms of interpretability.

Original: We propose two tasks for evaluation
Revised: We propose two tasks for evaluation

Original: For evaluation, we ﬁrst use the same ranking procedure as in De Clercq et al.
Revised: For evaluation, we ﬁrst use the same ranking procedure as in De Clercq et al.

Original: (2016), namely the
Revised: (2016), namely the

Original: Recipe Completion Task .
Revised: Recipe Completion Task .

Original: In the Recipe Completion Task, the recommender ranks all ingredients to predict one randomly eliminated ingredient, and the remaining ingredients of each recipe are used as input to the model – which is the preselected ingredient set in our deﬁnition.
Revised: In the Recipe Completion Task, the recommender ranks all ingredients to predict one randomly eliminated ingredient, and the remaining ingredients of each recipe are used as input to the model – which is the pre-selected ingredient set in our deﬁnition.

Original: We adopt three evaluation metrics for this task (same as the previous work); Mean Rank: the mean position of the eliminated ingredient in the ranked ingredients, Hit Ratio(HR)@10: the proportion of correct ingredients ranked in the top 10, and ROC-AUC(AUC): the mean area under the ROC curve.
Revised: We adopt three evaluation metrics for this task (same as the previous work); Mean Rank: the mean position of the eliminated ingredient in the ranked ingredients, Hit Ratio(HR)@10: the proportion of correct ingredients ranked in the top 10, and ROC-AUC(AUC): the mean area under the ROC curve.

Original: This task is useful as it allows us to measure the basic performance of our model in the same setting as existing baselines (for many-to-one pairing) and against ground truth data.
Revised: This task is useful as it allows us to measure the basic performance of our model in the same setting as existing baselines (many-to-one pairing) and against ground truth data.

Original: In order to understand the model performance further, we also prepare a another prediction task, which we call Artiﬁcial Food Pairing Task .
Revised: In order to understand the model performance further, we tested on a second task called Artiﬁcial Food Pairing Task .

Original: In this task we generate pairs from existing recipes based on ingredient co-occurrences.
Revised: In this task, we generate pairs from existing recipes based on ingredient cooccurrences.

Original: Given some ingredients as a preselected ingredient set and a candidate ingredient, pairs that occur in any of recipes are used as a positive example, otherwise it is a negative candidate example.
Revised: Given some ingredients as a pre-selected ingredient set and a candidate ingredient, pairs that occur in any of recipes are used as a positive example, otherwise as a negative candidate example.

Original: Thetask of the Artiﬁcial Food Pairing  consists of positive pairs and negative pairs where a same preselected ingredient set is always used for both positive and negative pairs but positive and negative examples are randomly taken from its candidates with a pre-speciﬁedthe number and ratio.
Revised: The Artiﬁcial Food Pairing task consists of positive pairs and negative pairs where the same pre-selected ingredient set is always used for both positive and negative pairs but positive and negative examples are randomly taken from its candidates with a pre-speciﬁed number and ratio.

Original: In this task, a recommender predicts whether pairs are positive or negative examples based on the ranking.
Revised: In this task, the recommender predicts whether pairs are positive or negative examples.

Original: We use this task for more detailed analysis.
Revised: We use this task for more detailed analysis.

Original: In this task, we use

Original:  MAP@10: the mean average precision in top-10 and AUC as metrics.
Revised: We measure MAP@10: the mean average precision in top-10 and AUC as metrics.

Original: We evaluatethe proposed models against some baselines on two datasets.
Revised: We evaluate on two datasets.

Original: The ﬁrst dataset is taken from the CulinaryDB (Bagler (2017)), and the second dataset is from Flavornet (Ahn et al.
Revised: The ﬁrst dataset is taken from the CulinaryDB (Bagler (2017)), and the second dataset is from Flavornet (Ahn et al.

Original: Both datasets contain the recipe set which consist of the list of ingredients and the cuisine categories (e.g. Chinese, Japanese) and the ingredient sets which consist of the names, the food categories (e.g. Meat, Fruit), the ﬂavor molecules the ingredient has.
Revised: Both datasets contain the recipe set which consist of the list of ingredients and the cuisine categories (e.g. Chinese, Japanese) and the ingredient sets which consist of the names, the food categories (e.g. Meat, Fruit), the ﬂavor molecules the ingredient has.

Original: The statistics of datasets shows in Table 4.
Revised: The statistics of datasets shows in Table 4.

Original: Before training models, the recipe set are divided into a train, a validation and a test set.
Revised: Before training models, the recipe set are divided into a train, a validation and a test set.

Original: On the other hand, we generate triplets (Figure 7) from whole ingredient set in order to train TransE, 172,207 triplets for CulinaryDB and 40,952 triplets for Flavornet.4. I MPLEMENTATION
Revised: On the other hand, we generate triplets (Figure 7) from whole ingredient set in order to train TransE, 172,207 triplets for CulinaryDB and 40, triplets for Flavornet.

Original: We implemented our models in PyTorch 1 on a Linux machine.

Original: For tuning the hyperparameters, we select the model that performs best on the validation set based on the precision metric and report the results on the test set.

Original: All models are optimized by the Adam optimizer (Kingma & Ba (2015)), and are trained until convergence, the maximum is 35 epochs.

Original: The dimensionality d and d KB is tuned amongst { 64 , 128 , 200 } , the batch size Batch is tuned { 16 , 32 , 64 } , the number of positive examples Pos is tuned { 1 , 2 , 3 , 5 , 10 } , the number of negative examples is tuned { 1 , 2 , 3 , 5 , 10 } , the learning rate is tuned { 0 . 1 , 0 . 01 , 0 . 001 } , the margin λ is tuned { 0 . 1 , 0 . 2 , 0 . 25 , 0 . 5 } , the temperature τ is tuned { 0 . 5 , 1 , 10 } .

Original: Since CulinaryDB has 4 attribute types and Flavornet has 3 attribute types, we use the memory size N CulinaryDB = 4 and N Flavornet = 3 respectively in our Implicit/Explicit models.

Original: For most datasets, we found the following hyperparameters work well: d = d KB = 128 , Batch = 64 , Pos = 1 is for Recipe Completion Task, Pos = 2 is for Artiﬁcial Food Pairing Task, Neg = 5 , learning rate = 0 .

Original: 001 , λ = 0 . 2 , and τ = 1 .

Original: Ingredients with less than 1 occurrence in the train set are learned as the UNK ingredient.

Original: 4. BASELINES
Revised: 5. BASELINES

Original: We compare our Implicit/Explicit models to the following baselines.
Revised: We compare our Implicit/Explicit models to the following baselines.

Original: • FREQ : Frequency predictor that always recommend the most frequently used ingredients of the training recipes.
Revised: • FREQ : Frequency predictor that always recommend the most frequently used ingredients of the training recipes.

Original: Despite its simplicity it is often a strong baseline in certain domains.
Revised: Despite its simplicity it is often a strong baseline in certain domains.

Original: • PMI : Recommender based on the PMI score.
Revised: • PMI : Recommender based on the PMI score.

Original: • TFIDF :
Revised: • TFIDF :

Original: Recommender based on the TF-IDF score.
Revised: Recommender based on the TF-IDF score.

Original: • NMF : Non-negative matrix factorization based recommender which is suggested by De Clercq et al.
Revised: • NMF (De Clercq et al. Non-negative matrix factorization based recommender.

Original: The model is trained using the train and the validation recipes.
Revised: The model is trained using the train and the validation recipes.

Original: It is implemented by ourselves.
Revised: It is implemented by ourselves.

Revised: • NeuMF (He et al.

Revised: (2017)): Neural matrix factorization model which is based on the Neural collaborative ﬁltering framework.

Revised: We use our Ingredient Embedding layer and Ingredient Set Encoder (Section 4.1) as embedding layers of this model.

Revised: And the training process is also same as ours (Section 4.5).

Original: 4. R ESULTS AND D ISCUSSION
Revised: More details of implementation can be found in section A.5. • WIDE&DEEP (Cheng et al. Wide & Deep model based recommender.

Revised: We use a pre-selected ingredient set, a candidate ingredient, and attributes (Table 4) as inputs of this model.

Revised: And the training process is same as ours (Section 4.5).

Revised: More details of implementation can be found in section A.5.

Revised: 5. R ESULTS AND D ISCUSSION

Original: Predictive performance Table 1 shows the results on all datasets for all compared baselines in
Revised: Predictive performance Table 1 shows the results on all datasets for all compared baselines in

Original: Recipe Completion Task.
Revised: Recipe Completion Task.

Original: While both our Implicit and Explicit models outperform all counterparts[Table] [Table] on all metrics usually with a clear margin, our Explicit model is approximately same performance as the Implicit model.
Revised: While both our Implicit and Explicit models outperform all counterparts on all metrics usually with a clear margin, our Explicit model is approximately same performance as the Implicit model.

Original: On the other hand, NMF is the best in baselines.
Revised: On the other hand, NMF is the best baseline.

Original: Performance is good since the Recipe Completion task requires ﬁnding only one missing ingredient - eventhough there should  be multiple correct ingredients in the real situation.
Revised: Performance is good since the Recipe Completion task requires ﬁnding only one missing ingredient - even though there should [Table] [Table] be multiple correct ingredients in the real situation.

Original: It appears that our approaches are effective for many-to-one pairs which are constrained by recipes.
Revised: It appears that our approaches are effective for many-to-one pairs which are constrained by recipes.

Original: In order to evaluate the pairing skills from one-to-one to many-to-one, we use the Artiﬁcial Food Paring Task.
Revised: In order to evaluate the pairing skills from one-to-one to many-to-one, we use the Artiﬁcial Food Pairing Task.

Original: We report the results of one-to-one, two-to-one, and three-to-one.
Revised: We report the results of one-to-one, two-to-one, and three-to-one.

Original: We sample positive examples and negative examples according to three ratio settings like ( Pos, Neg ) ∈ { (20 , 80) , (50 , 50) , (80 , 20) } .
Revised: We sample positive examples and negative examples according to three ratio settings like ( Pos, Neg ) ∈ { (20 , 80) , (50 , 50) , (80 , 20) } .

Original: Beforehand we classify all ingredients into two categories: { Low, High } depending on the number of ingredient occurrences in recipes.
Revised: Beforehand we classify all ingredients into two categories: { Low, High } depending on the number of ingredient occurrences in recipes.

Original: And then, preselected ingredient sets and positive examples are randomly sampled from each category set to have thealmost same ratio, and negative examples are randomly sampled from all candidates.
Revised: Then, preselected ingredient sets and positive examples are randomly sampled from each category set to have the same ratio, and negative examples are randomly sampled from all candidates.

Original: We adopt this process since it is expected that low frequency ingredients arebasically more difﬁcult  than high frequency ingredients and we also need to evaluate this tendency.
Revised: We adopt this process since generally speaking low frequency ingredients are more difﬁcult to handle than high frequency ingredients.

Original: In the end, We prepare 4, tasks by preselected ingredient set size, where each task consists of 100 pairs.
Revised: In the end, We prepare 4,536 tasks by pre-selected ingredient set size, where each task consists of 100 pairs.

Original: As can be seen in Table 2, our modelsusually outperform NMF on one-to-one, two-to-one, and three-to-one test sets and it appears our models are considerably stable against the number of preselected ingredients.
Revised: As can be seen in Table 2, our models outperform NMF on one-to-one, two-to-one, and three-to-one test sets. The proposed models show stable performance as the number of pre-selected ingredients increases.

Original: In order to clarify the effectiveness of the Relation Encoder module, we have added W/O RELENC model which is same as our models without the Relation Encoder module.
Revised: Here, we only report the results of the Explicit model since the Implicit model shows the same tendency. As expected, L-L seems to be the most difﬁcult task for our models followed by H-L. This result is good since it shows that our model does not overﬁt to low frequency ingredients. Since one of the main contributions of the paper is the Relation Encoder Model, We performed an ablation study and evaluated a version of our model without it (W/O RELENC model).

Original: W/O RELENC is similar performance with NMF on only one-to-one and horribly on two-to-one and three-to-one test sets in MAP@10.
Revised: W/O RELENC has similar performance to NMF on the one-to-one Artiﬁcial Food Pairing task but fails on two-to-one and three-to-one test sets in MAP@10.

Original: Apparently, the Relation Encoder module plays an important role in our models.
Revised: This clearly show that the Relation Encoder module plays an important role in our models.

Original: For more detailed analysis, we compare Roc-curves for our models by ingredient frequency-based pair types(Figrure 4), which consists of HighFrequency-to-High Frequency(HH), High Frequency-to-Low Frequency(H-L), Low Frequency-to-High Frequency(L-H), and Low
Revised: For more detailed analysis, we compare Roccurves for our models by ingredient frequency-based pair types(Figure 4), which consists of High

Original:  Frequency-to-Low Frequency(L-L), e.g. H-L describes pairs that a preselected ingredient is used in various recipes frequently, a paired ingredient is used in only speciﬁc recipes.Here, we report the result of Explicit model since Implicit model is also same tendency. As expected, L-L seems to be the most difﬁcult task for our models, and H-L is follow. This result is some good since our model does not overﬁt to a low frequency ingredients overall.
Revised: Frequency-to-High Frequency(H-H), High Frequency-to-Low Frequency(H-L), Low Frequency-toHigh Frequency(L-H), and Low Frequency-to-Low Frequency(L-L), e.g. H-L describes pairs that a pre-selected ingredient is used in various recipes frequently, while the paired ingredient is used in only few recipes.

Original: Interpretablity At ﬁrst, we visualize attention weights in the Explicit model for some speciﬁc food pairs.
Revised: Interpretablity We ﬁrst analyzed attention weights in the Explicit model for some speciﬁc food pairs around chocolate (see Figure 5).

Original: Figure 5 shows while egg is paired with chocolate for food categories or culinary conveniences, miso is considerably for ﬂavor molecules related afﬁnity, too.
Revised: The data shows that egg is paired with chocolate because of correlations in food category. miso on the other hand has considerable ﬂavor molecule related afﬁnity to chocolate.

Original: The result of egg is consistent with the results reported by De Clercq et al.
Revised: This interpretation for eggs is consistent with the results reported by De Clercq et al.

Original: Next, we focus on the attention weights of ﬂavor molecules in our trained Explicit model for the quantitative analysis.
Revised: Next, we focus on the attention weights for ﬂavor molecules in our trained Explicit model for a quantitative analysis.

Original: We compare the averageof Flavor Molecule attention weights with correlation coefﬁcients which are calculated on full recipes.
Revised: We compare the average Flavor Molecule attention weights with correlation coefﬁcients which are calculated on full recipes.

Original: Details are in the caption of Table 3.
Revised: Details are in the caption of Table 3.

Original: In  the ranking of attention weights, up to the top 5 areillegally high scores and listed ingredients does not seem to berelated with ﬂavor correlation.
Revised: In [Figure] [Table] the ranking of attention weights, up to the top 5 are high score ingredients that do not seem to be ﬂavor molecule correlated.

Original: It would appear that since the number of ingredient occurrences is very low, the relational representations are not learned properly.
Revised: It would appear that since the number of ingredient occurrences is very low, the relational representations are not learned properly.

Original: On the other hand, the top 6 and below looks  fairly good results.
Revised: On the other hand, the top 6 and below looks like a fairly good result.

Original: In the rank- [Figure] [Table] ing of correlation coefﬁcients, there are some ingredients likesome breads and wafﬂe that seems to have little to do with ﬂavor molecules.
Revised: In the ranking of correlation coefﬁcients, there are some ingredients like breads and wafﬂe that seems to have little to do with ﬂavor molecules.

Original: It looks like our models is able to ﬁnd hidden ingredients structures within recipes different from simple correlation coefﬁcients.
Revised: In consequence the model is able to ﬁnd hidden ingredients structures within recipes different from simple correlation coefﬁcients.

Original:  C ONCLUSION
Revised:  C ONCLUSION

Original: For ingredient recommendation systems, we proposed models, which rank ingredients based on cooccurrence of ingredients in cooking recipes and learn the relational representations which can give reasons as to why ingredients are recommended.
Revised: We proposed interpretable models for food ingredient recommendation systems that rank ingredients based on the co-occurrence of ingredients in cooking recipes and learned relational representations.

Original: In our experiments, we found that our explicitly/implicitly integrated factors can improve predictions, and our trained relational representation detected some correlations between ingredients and factors such as molecular structure.
Revised: In our experiments, we found that explicitly and implicitly integrated factors can improve predictions, and our trained relational representations detect interesting correlations between ingredients and factors such as molecular structure.

Original: We hope these analysis encourage the discovery of new ingredient combinations discovery and new recipe creation. Some opportunities for future work are controlling ranking scores based onthe manual modiﬁcation of relational representations.
Revised: Future work will focus on controlling ranking scores based on manual modiﬁcations of relational representations by domain experts (e.g. chefs and food professionals). A A PPENDIX A. I MPLEMENTATION D ETAILS AND H YPERPARAMETERS

Original: In case some chefs want to know good combinations in terms of ﬂavor, this functions will be helpful.
Revised: We implemented our models in PyTorch 1 on a Linux machine. For tuning the hyperparameters, we select the model that performs best in validation set based on the precision metric.

Original: A A PPENDIX A. I NGREDIENT S
Revised: We report results on the test set. All models are optimized using the Adam optimizer (Kingma & Ba (2015)), and are trained until convergence, the maximum is 35 epochs. The dimensionality d and d KB is tuned amongst { 64 , 128 , 200 } , the batch size Batch is tuned { 16 , 32 , 64 } , the number of positive examples Pos is tuned { 1 , 2 , 3 , 5 , 10 } , the number of negative examples is tuned { 1 , 2 , 3 , 5 , 10 } , the learning rate is tuned { 0 . 1 , 0 . 01 , 0 . 001 } , the margin λ is tuned { 0 . 1 , 0 . 2 , 0 . 25 , 0 . 5 } , the temperature τ is tuned { 0 . 5 , 1 , 10 } .

Original: ET E NCODER
Revised: Since CulinaryDB has 4 attribute types and Flavornet has 3 attribute types, we use the memory size N CulinaryDB = 4 and N Flavornet = 3 respectively in our Implicit/Explicit models. For most datasets, we found the following hyperparameters work well: d = d KB = 128 , Batch = 64 , Pos = 1 is for Recipe Completion Task, Pos = 2 is for Artiﬁcial Food Pairing Task, Neg = 5 , learning rate = 0 . 001 , λ = 0 . 2 , and τ = 1 . Ingredients with less than 1 occurrence in the train set are learned as the UNK ingredient.

Revised: A.

Revised: I NGREDIENT S ET E NCODER 〇〇〇〇〇〇〇〇

Original: [Figure]
Revised: [Figure]

Original: ○○
Revised: ○○

Original: ○ ○
Revised: ○ ○

Original: ○ ○
Revised: ○ ○

Revised: [Figure]

Original: ○ ○ ○
Revised: ○○ ○

Original: ○ ○
Revised: ○ ○

Original: ○
Revised: ○

Original: [Figure] [Figure]
Revised: ○ ○ ○

Revised: ○

Revised: ○

Revised: ○ p

Revised: A. T RIPLETS FOR I NGREDIENTS

Revised: [Figure]

Original: A. D ATASET S TATISTICS
Revised: A. D ATASET S TATISTICS

Original: [Table]
Revised: [Table]

Original: Flavornet

Original: [Table]
Revised: [Table]

Original: A. E XAMPLE R ANKING R ESULTS ON THE C ULINARY DB
Revised: A. T HE IMPLEMENTATION DETAILS OF N EU MF AND W IDE &D EEP

Revised: We implemented both the NeuMF model and the Wide&Deep model from scratch in PyTorch 2 .

Revised: We trained the NeuMF model without pre-training.

Revised: The size of predictive factors is 8, then the architecture of the neural CF layers is 32 −→ 16 −→ 8 , and the embedding size is 16.

Revised: In the Wide&Deep model, the wide component consists of the cross-product transformation of preselected ingredient sets and candidate ingredients.

Revised: For the deep part of the model, a 16-dimensional 2 https://pytorch.org/ embedding vector is learned for each categorical feature.

Revised: We concatenate all the embeddings together with the dense features, resulting in a dense vector of approximately 80 dimensions

Original: [Table]
Revised: [Table]

Revised: A. E XAMPLE R ANKING R ESULTS ON THE C ULINARY DB

Revised: [Table]