WO2021152715A1 - 学習装置、検索装置、学習方法、検索方法及びプログラム - Google Patents

学習装置、検索装置、学習方法、検索方法及びプログラム Download PDF

Info

Publication number
WO2021152715A1
WO2021152715A1 PCT/JP2020/003097 JP2020003097W WO2021152715A1 WO 2021152715 A1 WO2021152715 A1 WO 2021152715A1 JP 2020003097 W JP2020003097 W JP 2020003097W WO 2021152715 A1 WO2021152715 A1 WO 2021152715A1
Authority
WO
WIPO (PCT)
Prior art keywords
document
feature amount
search query
search
index
Prior art date
Application number
PCT/JP2020/003097
Other languages
English (en)
French (fr)
Inventor
拓 長谷川
京介 西田
準二 富田
久子 浅野
Original Assignee
日本電信電話株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 日本電信電話株式会社 filed Critical 日本電信電話株式会社
Priority to JP2021573681A priority Critical patent/JP7363929B2/ja
Priority to PCT/JP2020/003097 priority patent/WO2021152715A1/ja
Priority to US17/795,868 priority patent/US20230072537A1/en
Publication of WO2021152715A1 publication Critical patent/WO2021152715A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/31Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/084Backpropagation, e.g. using gradient descent

Definitions

  • the present invention relates to a learning device, a search device, a learning method, a search method, and a program.
  • Document search requires high-speed retrieval of documents related to search queries from a large number of documents.
  • a technology to realize this request for example, after creating an inverted index in which a word contained in a document is used as a key and the document number of the document containing the word as a value, a search query is performed using this inverted index.
  • a technique for searching a document using the words contained in is known.
  • Non-Patent Document 1 a technology that can perform document retrieval even if words do not exactly match.
  • Non-Patent Document 1 a technology that considers the vector obtained by the neural network as a potential word vector, creates an inverted index, and performs document retrieval. It is known (for example, Non-Patent Document 1).
  • Non-Patent Document 1 in order to realize a high-speed search using an inverted index, the sparseness of a vector obtained by a neural network is evaluated by an approximation of a differentiable L1 norm. ing. Therefore, the vector obtained by the neural network may not sufficiently acquire sparsity.
  • One embodiment of the present invention has been made in view of the above points, and an object of the present invention is to stably acquire the sparseness of a vector obtained by a neural network in a document retrieval using an inverted index.
  • the learning device is neural with a search query, a first document related to the search query, and a second document not related to the search query as inputs.
  • a feature amount generating means for generating a feature amount of the search query, a feature amount of the first document, and a feature amount of the second document using a network model parameter, and a feature amount of the search query.
  • the model parameter is updated by using the error function including the cost function as the differential approximate function of the L0 norm. It is characterized by having a renewal means to be performed.
  • the sparseness of the vector obtained by the neural network can be stably obtained.
  • a search device 10 for searching a document related to a search query from among the documents to be searched by using a vector and an inverted index obtained by a neural network will be described.
  • the inverted index generation device 20 for generating the inverted index and the learning device 30 for learning the neural network will also be described.
  • the search device 10, the inverted index generation device 20, and the learning device 30 are described as different devices, but two or more of these devices are realized by the same device. You may be.
  • the search device 10 and the inverted index generator 20 may be realized by the same device
  • the inverted index generator 20 and the learning device 30 may be realized by the same device
  • the learning device 30 and the search device 30 may be realized by the same device.
  • 10 may be realized by the same device, or the search device 10, the inverted index generation device 20, and the learning device 30 may be realized by the same device.
  • Example 1 First, Example 1 will be described.
  • the set of documents searched as ⁇ D 1, ⁇ , D m ⁇ the search unit 10 inputs a search query Q, the ordered set ⁇ D 1 of the document relating to the search query Q, ⁇ ..., D k ⁇ and its relevance ⁇ S 1 , ..., Sk ⁇ shall be output.
  • m is the number of documents to be searched
  • k (where k ⁇ m) is the number of documents related to the search query Q.
  • the search query Q and each search target document Di are texts (character strings).
  • the document related to the search query Q is a document obtained as a search result for the search query Q.
  • FIG. 1 is a diagram showing an example of the overall configuration of the search device 10 according to the present embodiment.
  • the search device 10 includes a context coding unit 101, a sparse coding unit 102, an inverted index utilization unit 103, and a ranking unit 104.
  • the context coding unit 101 and the sparse coding unit 102 are realized by a neural network, and their parameters have been learned in advance.
  • model parameters the parameters of the neural network that realizes the context coding unit 101 and the sparse coding unit 102 will be referred to as “model parameters”.
  • the learned model parameters are stored in an auxiliary storage device such as an HDD (Hard Disk Drive) or an SSD (Solid State Drive), for example.
  • the context coding unit 101 takes the search query Q as an input and outputs the feature amount U of the search query Q using the trained model parameters.
  • BERT Bidirectional Encoder Representations from Transformers
  • BERT is a context-aware pre-learning model using Transformer, which takes text as input and outputs d-dimensional features. By converting this feature quantity with one layer of a fully coupled neural network, it demonstrates high performance in various tasks of natural language processing.
  • Reference 1 “J. Devlin, M.-W. Chang, K. Lee, and K. Toutanova. Bert: Pre-training of deep bidirectional transformers for language understanding. , 2018. ”etc.
  • the CLS tag is added to the beginning of the search query Q and the SEP tag is added to the end of the sentence, and then input to the context coding unit 101.
  • BERT is an example, and as a neural network that realizes the context coding unit 101, another context-considered pre-learning model using Transformer may be used. More generally, as the neural network that realizes the context coding unit 101, any neural network capable of encoding text may be used. However, by realizing the context coding unit 101 with a context-aware pre-learning model such as BERT, it becomes possible to obtain a feature amount considering the entire context.
  • a context-aware pre-learning model such as BERT, it becomes possible to obtain a feature amount considering the entire context.
  • the context coding unit 101 is realized by BERT, and the feature quantity U is a d-dimensional vector.
  • the sparse coding unit 102 inputs the feature amount U of the search query Q and outputs the sparse feature amount U'of the search query Q using the trained model parameters.
  • the model of the fully connected layer described in Non-Patent Document 1 can be used. More specifically, several fully connected layers (for example, about 3 to 5 layers) are stacked so that the dimension number d'of the sparse feature amount U'is larger than the dimension number d of the feature amount U.
  • a model in which the firing function of the final layer of these fully connected layers is the ReLu function can be used. By setting the firing function of the final layer as the ReLu function, it is possible to obtain a sparse feature U'having 0 as an element (that is, it is possible to acquire a sparse expressive ability).
  • Non-Patent Document 1 The model described in Non-Patent Document 1 is an example, and as a neural network for realizing the sparse coding unit 102, the output dimension is higher than the input dimension and is final. Any model can be used as long as the layer uses a general ignition function f: R ⁇ R that satisfies all of the following conditions 1-1 to 1-3.
  • Condition 1-1 f (x) ⁇ 0 for all x
  • Condition 1-3: a ⁇ R such that f (a) 0
  • the dimension number d'of the sparse feature quantity U' is as high as possible.
  • the higher the number of dimensions d' the higher the expressive power of the sparse feature U', while the higher the calculation cost for calculating the sparse feature U'and the higher the learning cost for learning the model parameters.
  • the amount of information and the allowable calculation cost of the document set to be searched may differ depending on the situation, and the number of dimensions d'and the number of dimensions of the space covered by the codomain of the map by the neural network that realizes the sparse coding unit 102. (That is, the rank of the representation matrix of the mapping) does not always match. Therefore, how much the dimension number d'is set may differ depending on, for example, the amount of information possessed by the document set to be searched, the available computational resources, and the like.
  • the context coding unit 101 and the sparse coding unit 102 are expressed as different functional units, but this is for convenience, and the context coding unit 101 and the sparse coding unit 102 are used. It may be one functional unit.
  • the inverted index utilization unit 103 takes the sparse feature amount U'as an input and uses the inverted index generated in advance to obtain a subset ⁇ V'i
  • K is
  • k, and is a set of document indexes (or document numbers, document IDs, etc.) related to the search query Q.
  • V 'i (v ' i1, v 'i2, ⁇ , v' id ') and.
  • the document index is also referred to as a "document index”.
  • the inverted index is stored in an auxiliary storage device such as an HDD or SSD, for example.
  • the inverted index uses each dimension 1, 2, ..., D'(that is, a dimension index or a dimension number) of the sparse feature as a key, and ⁇ (i, v) with respect to the key r. ' Ir )
  • a set represented by i ⁇ ⁇ 1, ..., M ⁇ is set as a value.
  • v'ir ⁇ 0 ⁇ i ⁇ ⁇ 1, ..., m ⁇ is obtained from the inverted index.
  • the inverted index utilization unit 103 obtains a subset ⁇ V'i
  • Ranking unit 104 the search query Q sparse feature quantity U 'subset of sparse feature amount of the target document ⁇ V' of
  • i ⁇ K ⁇ is a set ordered in ascending or descending order of the degree of relevance S i.
  • i ⁇ K ⁇ are ⁇ D 1 , ..., D k , respectively, by renumbering the document indexes.
  • the distance function d for example, the inner product distance or the like can be used.
  • the distance function d any distance function capable of measuring the distance between vectors can be used.
  • FIG. 2 is a flowchart showing an example of the search process according to the present embodiment.
  • Step S101 First, the context coding unit 101 inputs the search query Q and outputs the feature amount U of the search query Q using the trained model parameters.
  • Step S102 Next, the sparse coding unit 102 inputs the feature amount U obtained in step S101 above, and outputs the sparse feature amount U'of the search query Q using the trained model parameters.
  • Step S103 Next, the inverted index utilization unit 103 takes the sparse feature amount U'obtained in the above step S102 as an input, and uses the inverted index generated in advance to use a subset of the sparse feature amount of the search target document. Obtain ⁇ V'i
  • Step S104 Then, the ranking unit 104 inputs the sparse feature amount U'obtained in the above step S102 and the set ⁇ V'i
  • i ⁇ K ⁇ are output.
  • the search device 10 obtains an ordered set ⁇ D i
  • the search device 10 according to the present embodiment orders the document amount of the search target document by using the sparse feature amount U'of the search query Q and the inverted index generated in advance by the inverted index generation device 20.
  • Related documents and their degree of relevance can be obtained at high speed without depending on.
  • Example 2 Next, Example 2 will be described.
  • the inverted index generator 20 inputs a set of documents to be searched ⁇ D 1 , ..., D m ⁇ and outputs an inverted index.
  • FIG. 3 is a diagram showing an example of the overall configuration of the inverted index generator 20 according to the present embodiment.
  • the inverted index generation device 20 has a context coding unit 101, a sparse coding unit 102, and an inverted index generation unit 105.
  • the context coding unit 101 and the sparse coding unit 102 are realized by the same neural network as the context coding unit 101 and the sparse coding unit 102 described in the first embodiment, and the model parameters thereof are learned in advance. It is assumed that it has been completed.
  • Context coding unit 101 is input with the target document D i, using the learned model parameter, and outputs the feature quantity V i of the target document D i.
  • Sparse coding unit 102 is input with the feature quantity V i of the target document D i, using the learned model parameter, and outputs a sparse feature quantity V 'i of the target document D i.
  • the inverted index uses the index or the dimension number of the dimension of the sparse feature as the key, and ⁇ (i, v'ir )
  • FIG. 4 is a flowchart showing an example of the inverted index generation process according to the present embodiment.
  • the inverted index generation process is executed after the learning process described later is completed and before the search process described above is executed.
  • Step S201 First, the context coding unit 101 is input with the target document D i, using the learned model parameter, and outputs the feature quantity V i of the target document D i.
  • Step S202 Next, sparse coding unit 102 is input with the feature quantity V i of the target document D i, using the learned model parameter, and outputs a sparse feature quantity V 'i of the target document D i ..
  • the inverted index generation device 20 can generate an inverted index from the set of input search target documents ⁇ D 1 , ..., D m ⁇ .
  • the search device 10 can obtain the related document and its relevance at high speed without depending on the order of the document amount of the search target document (that is, the search). You can search for documents related to Query Q.).
  • Example 3 Next, Example 3 will be described.
  • the learning device 30 is used to learn the neural network (the neural network that realizes the context coding unit 101 and the sparse coding unit 102) will be described.
  • the model parameters have not been learned in the third embodiment, and the learning device 30 inputs the training data set and learns the model parameters.
  • a training data set is a set of training data used for training (training) model parameters.
  • D j documents related to Q i ⁇ is It shall be labeled as correct data.
  • FIG. 5 is a diagram showing an example of the overall configuration of the learning device 30 according to the present embodiment.
  • the learning device 30 includes a context coding unit 101, a sparse coding unit 102, a ranking unit 104, a division unit 106, an update unit 107, and a determination unit 108.
  • the context coding unit 101 and the sparse coding unit 102 are realized by the same neural network as the context coding unit 101 and the sparse coding unit 102 described in Examples 1 and 2, but the model parameters thereof. Is not learned.
  • the division unit 106 takes the training data set as an input and randomly divides this training data set into a plurality of mini-batch. In this embodiment, it is assumed that the model parameters are repeatedly updated (learned) for each mini-batch.
  • the determination unit 108 determines whether or not the end condition for ending the repeated update of the model parameter is satisfied.
  • the number of times one training data is repeatedly learned is called an epoch, and the number of repetitions is called the number of epochs.
  • the context coding unit 101 takes the training data (Q i , Di + , Di ⁇ ) as an input, and uses the untrained model parameters to generate the training data (Q i , Di + , Di ⁇ ). amount characteristic (U i, V i +, V i -) to output a. That is, the context coding unit 101, a search query Q i, positive sample D i + and a negative example D i - as input, each feature quantity U i, V i + and V i - to output a.
  • Sparse coding section 102 the training data (Q i, D i +, D i -) feature amounts of (U i, V i +, V i -) as input, using the model parameters not been learned, the training data (Q i, D i +, D i -) sparse feature quantity (U 'i, V' i +, V 'i -) of outputting a. That is, the sparse encoding unit 102, feature quantity U i, V i + and V i - as input, each sparse feature quantity U 'i, V' i + and V 'i - to output a.
  • Ranking unit 104 the search query Q i of sparse feature quantity U 'i and positive example D i + sparse feature quantity V' i + and a negative example D i - sparse feature quantity V 'i - as input and search negative cases positive example D i + of relevance to the query Q i S i + and to the search query Q i D i - of relevance S i - outputs and.
  • Updating unit 107 a sparse feature quantity U 'i, V' i + and V 'i - a relevance S i + and S i - as an input and to update the model parameters by a technique supervised learning.
  • the error function of supervised learning an error function in ranking learning and a cost function obtained by approximating the L0 norm with a differentiable function may be used.
  • hinge loss described in Non-Patent Document 1 described above (that is, the equation (3) described in Non-Patent Document 1) is used.
  • the cost function is a modified sigmoid function in order to strictly consider sparsity.
  • a for example, it is conceivable to a value of more than 10 6 times the maximum value of each element of all sparse feature quantity.
  • Equation (3) can be used as the error function loss for supervised learning.
  • is a parameter (learning coefficient) that is arbitrarily set.
  • FIG. 6 is a flowchart showing an example of the learning process according to the present embodiment. It is assumed that the model parameters are initialized with appropriate values.
  • Step S301 First, the division unit 106 takes the training data set as an input and randomly divides this training data set into a plurality of mini-batch.
  • Step S302 Next, the learning device 30 executes the model parameter update process for each mini-batch. As a result, the model parameters are updated by the model parameter update process. Details of the model parameter update process will be described later.
  • Step S303 Then, the determination unit 108 determines whether or not the predetermined end condition is satisfied.
  • the learning device 30 ends the learning process when it is determined that the end condition is satisfied (YES in step S303), while the learning device 30 ends the learning process when it is determined that the end condition is not satisfied (NO in step S303). return.
  • steps S301 to S302 are repeatedly executed until a predetermined end condition is satisfied.
  • the predetermined end conditions include, for example, that the number of epochs is equal to or greater than the predetermined first threshold value and that the error function loss has converged (for example, the value of the error function is less than the predetermined second threshold value). That, the amount of change in the error function loss before and after updating the model parameters became less than the predetermined third threshold value, etc.).
  • FIG. 7 is a flowchart showing an example of the model parameter update process according to the present embodiment. In the following, a case where the model parameters are updated using a certain mini-batch will be described.
  • Step S401 First, the context coding unit 101, the training data in the mini-batch (Q i, D i +, D i -) as input, using the model parameters not been learned, the training data (Q i, D i +, D i - characteristic quantity (U i, V i + of), V i -) to output a.
  • Step S402 Next, sparse coding unit 102, the training data (Q i, D i +, D i -) feature amounts of (U i, V i +, V i -) as input, not been learned using the model parameters, the training data (Q i, D i +, D i -) sparse feature quantity (U 'i, V' i +, V 'i -) of outputting a.
  • Step S403 Next, the ranking portion 104, a search query Q i of sparse feature quantity U 'i and positive example D i + sparse feature quantity V' i + and a negative example D i - sparse feature quantity V 'i - as input the door, the search query Q i positive sample D i + relevance S i + and of the search query Q negative example for i D i - outputs the - of relevance S i.
  • the above steps S401 to S403 are repeatedly executed for all the training data (Q i , Di + , Di ⁇ ) included in the mini-batch.
  • Step S404 Subsequently, the update unit 107 shows, for example, the above equation (3), for example, by inputting each sparse feature amount obtained in the above step S402 and each degree of relevance obtained in the above step S403. Calculate the value of the error function loss (ie, the error or loss) and the gradient of the error function loss with respect to the model parameters.
  • the gradient of the error function loss related to the model parameters may be calculated by, for example, an error backpropagation method.
  • Step S405 Then, the update unit 107 updates the model parameters by an arbitrary optimization method using the value of the error function loss calculated in step S404 above and its gradient.
  • the learning device 30 can learn the model parameters of the neural network that realizes the context coding unit 101 and the sparse coding unit 102 by using the input training data set.
  • the sparseness of the sparse feature obtained as the output of the neural network is stably acquired. Is possible.
  • mini-batch learning is used for learning the model parameters, but the present invention is not limited to this, and the model parameters may be learned by using other methods such as batch learning and online learning.
  • a differentiable approximation function of the L0 norm is constructed by using a function ⁇ '(x) (the above equation (1)) which is a modification of the sigmoid function. ), Any function g (x) that satisfies all of the following conditions 2-1 to 2-3 may be used.
  • Condition 2-1 The range is 0 ⁇ g (x) ⁇ 1 in x ⁇ 0
  • Condition 2-2 Monotonically increasing and differentiable in x ⁇ 0
  • ⁇ 1 is a very small value satisfying ⁇ 1> 0. Since the range of the firing function f is non-negative as shown in the above condition 1-1, it is possible to add the condition x ⁇ 0 to the above conditions 2-1 and 2-2. Become.
  • the above condition 2-1 indicates that g (x) can take a value of 0 or more and 1 or less within a range in which the output of the neural network is positively restricted (x ⁇ 0).
  • "monotonically increasing when x ⁇ 0" in the above condition 2-2 is a condition for determining whether g (x) is close to 0 or 1 when x ⁇ 0, and the closer x is to 0. It means that g (x) becomes closer to 0, and as x increases more than 0, g (x) becomes closer to 1.
  • "differentiable" in the above condition 2-2 indicates that the gradient of g can be calculated.
  • a predetermined cost function may be added to the error function loss shown in the above equation (3).
  • a cost function for example, (specifically, variance, etc. of the p r for r) the following formula cost function to bring the distribution of p r represented by (4) to a particular distribution be used It is possible.
  • B is a set of a certain training data (e.g., in the case of mini-batch training mini-batch, if the training data set, such as batch learning) training data contained in the (Q i, D i +, D i -) of It is a set of indexes i.
  • the search device 10, the inverted index generation device 20, and the learning device 30 can be realized by the hardware configuration of a general computer or computer system, and can be realized by, for example, the hardware configuration of the computer 500 shown in FIG.
  • FIG. 8 is a diagram showing an example of the hardware configuration of the computer 500.
  • the computer 500 shown in FIG. 8 has an input device 501, a display device 502, an external I / F 503, a communication I / F 504, a processor 505, and a memory device 506. Each of these hardware is communicably connected via bus 507.
  • the input device 501 is, for example, a keyboard, a mouse, a touch panel, or the like.
  • the display device 502 is, for example, a display or the like.
  • the computer 500 does not have to have at least one of the input device 501 and the display device 502.
  • the external I / F 503 is an interface with an external device.
  • the external device includes a recording medium 503a and the like.
  • the computer 500 can read and write the recording medium 503a via the external I / F 503. Even if the recording medium 503a stores one or more programs that realize each functional unit (context coding unit 101, sparse coding unit 102, inverted index utilization unit 103, and ranking unit 104) of the search device 10. good. Similarly, the recording medium 503a stores one or more programs that realize each functional unit (context coding unit 101, sparse coding unit 102, and inverted index generation unit 105) of the inverted index generation device 20. May be good. Similarly, the recording medium 503a contains one or more programs that realize each functional unit (context coding unit 101, sparse coding unit 102, ranking unit 104, division unit 106, and update unit 107) of the learning device 30. It may be stored.
  • the recording medium 503a includes, for example, a CD (Compact Disc), a DVD (Digital Versatile Disc), an SD memory card (Secure Digital memory card), a USB (Universal Serial Bus) memory card, and the like.
  • a CD Compact Disc
  • DVD Digital Versatile Disc
  • SD memory card Secure Digital memory card
  • USB Universal Serial Bus
  • the communication I / F 504 is an interface for connecting the computer 500 to the communication network.
  • One or more programs that realize each functional unit of the search device 10 may be acquired (downloaded) from a predetermined server device or the like via the communication I / F 504.
  • one or more programs that realize each functional unit included in the inverted index generation device 20 may be acquired from a predetermined server device or the like via the communication I / F 504.
  • one or more programs that realize each functional unit included in the learning device 30 may be acquired from a predetermined server device or the like via the communication I / F 504.
  • the processor 505 is, for example, various arithmetic units such as a CPU (Central Processing Unit) and a GPU (Graphics Processing Unit).
  • Each functional unit included in the search device 10 is realized, for example, by a process in which one or more programs stored in the memory device 506 are executed by the processor 505.
  • each functional unit included in the inverted index generation device 20 is realized, for example, by a process in which one or more programs stored in the memory device 506 are executed by the processor 505.
  • each functional unit included in the learning device 30 is realized, for example, by a process in which one or more programs stored in the memory device 506 are executed by the processor 505.
  • the memory device 506 is, for example, various storage devices such as HDD, SSD, RAM (RandomAccessMemory), ROM (ReadOnlyMemory), and flash memory.
  • the search device 10 can realize the above-mentioned search process by having the hardware configuration of the computer 500 shown in FIG.
  • the inverted index generation device 20 can realize the above-described inverted index generation process by having the hardware configuration of the computer 500 shown in FIG.
  • the learning device 30 can realize the above-mentioned learning process by having the hardware configuration of the computer 500 shown in FIG.
  • the hardware configuration of the computer 500 shown in FIG. 8 is an example, and the computer 500 may have another hardware configuration.
  • the computer 500 may have a plurality of processors 505 or may have a plurality of memory devices 506.
  • Search device 20 Inverted index generator 30 Learning device 101 Context coding unit 102 Sparse coding unit 103 Inverted index utilization unit 104 Ranking unit 105 Inverted index generation unit 106 Division unit 107 Update unit 108 Judgment unit

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Software Systems (AREA)
  • Databases & Information Systems (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Health & Medical Sciences (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

一実施形態に係る学習装置は、検索クエリと、前記検索クエリに関連がある第1の文書と、前記検索クエリに関連がない第2の文書とを入力として、ニューラルネットワークのモデルパラメータを用いて、前記検索クエリの特徴量と、前記第1の文書の特徴量と、前記第2の文書の特徴量とを生成する特徴量生成手段と、前記検索クエリの特徴量と、前記第1の文書の特徴量と、前記第2の文書の特徴量とを入力として、L0ノルムの微分可能な近似関数をコスト関数が含まれる誤差関数を用いて、前記モデルパラメータを更新する更新手段と、を有することを特徴とする。

Description

学習装置、検索装置、学習方法、検索方法及びプログラム
 本発明は、学習装置、検索装置、学習方法、検索方法及びプログラムに関する。
 文書検索では、大量の文書の中から検索クエリに関連する文書を高速に取り出すことが要求される。この要求を実現する技術として、例えば、文書内に含まれる単語をキー、その単語が含まれる文書の文書番号をバリューとする転置インデックスを作成した上で、この転置インデックスを利用して、検索クエリに含まれる単語で文書検索を行う技術が知られている。
 また、単語の完全一致で文書検索を行う場合、語彙の曖昧性や表記ゆれ等により検索漏れが起こり得る。このため、単語が完全一致しなくても文書検索を行うことができる技術として、ニューラルネットワークで得られたベクトルを潜在的な単語ベクトルとみなして、転置インデックスを作成し、文書検索を行う技術が知られている(例えば、非特許文献1)。
H. Zamani, M. Dehghani, W.B. Croft E. Learned-Miller and J. Kamps, "From Neural Re-Ranking to Neural Ranking: Learning a Sparse Representation for Inverted Indexing", Proceedings of the 27th ACM International Conference on Information and Knowledge Management, Pages 497-506, 2018.
 しかしながら、上記の非特許文献1に記載されている技術では、転置インデックスを利用した高速な検索を実現するために、ニューラルネットワークで得られるベクトルのスパース性を微分可能なL1ノルムの近似で評価している。このため、ニューラルネットワークで得られるベクトルがスパース性を十分に獲得できない場合がある。
 一方で、L0ノルムを直接計算してスパース性を評価することは、微分可能性の観点から現在のニューラルネットワーク技術の枠内では不可能である。
 本発明の一実施形態は、上記の点に鑑みてなされたもので、転置インデックスを利用した文書検索において、ニューラルネットワークで得られるベクトルのスパース性を安定的に獲得することを目的とする。
 上記目的を達成するため、一実施形態に係る学習装置は、検索クエリと、前記検索クエリに関連がある第1の文書と、前記検索クエリに関連がない第2の文書とを入力として、ニューラルネットワークのモデルパラメータを用いて、前記検索クエリの特徴量と、前記第1の文書の特徴量と、前記第2の文書の特徴量とを生成する特徴量生成手段と、前記検索クエリの特徴量と、前記第1の文書の特徴量と、前記第2の文書の特徴量とを入力として、L0ノルムの微分可能な近似関数をコスト関数が含まれる誤差関数を用いて、前記モデルパラメータを更新する更新手段と、を有することを特徴とする。
 転置インデックスを利用した文書検索において、ニューラルネットワークで得られるベクトルのスパース性を安定的に獲得することができる。
本実施形態に係る検索装置の全体構成の一例を示す図である。 本実施形態に係る検索処理の一例を示すフローチャートである。 本実施形態に係る転置インデックス生成装置の全体構成の一例を示す図である。 本実施形態に係る転置インデックス生成処理の一例を示すフローチャートである。 本実施形態に係る学習装置の全体構成の一例を示す図である。 本実施形態に係る学習処理の一例を示すフローチャートである。 本実施形態に係るモデルパラメータ更新処理の一例を示すフローチャートである。 コンピュータのハードウェア構成の一例を示す図である。
 以下、本発明の一実施形態について説明する。本実施形態では、ニューラルネットワークで得られるベクトルと転置インデックスを利用して、検索対象の文書の中から検索クエリに関連する文書を検索する検索装置10について説明する。また、当該転置インデックスを生成する転置インデックス生成装置20と、当該ニューラルネットワークの学習を行う学習装置30についても説明する。
 なお、本実施形態では、検索装置10と転置インデックス生成装置20と学習装置30とがそれぞれ異なる装置であるものとして説明するが、これらの装置のうちの2以上の装置が同一の装置で実現されていてもよい。例えば、検索装置10と転置インデックス生成装置20が同一装置で実現されていてもよいし、転置インデックス生成装置20と学習装置30が同一装置で実現されていてもよいし、学習装置30と検索装置10が同一装置で実現されていてもよいし、検索装置10と転置インデックス生成装置20と学習装置30とが同一装置で実現されていてもよい。
 [実施例1]
 まず、実施例1について説明する。実施例1では、検索装置10により文書検索を行う場合について説明する。ここで、検索対象の文書集合を{D,・・・,D}として、検索装置10は、検索クエリQを入力し、この検索クエリQに関連する文書の順序集合{D,・・・,D}とその関連度{S,・・・,S}とを出力するものとする。mは検索対象の文書数、k(ただし、k≦m)は検索クエリQに関連する文書数である。
 なお、検索クエリQ及び各検索対象文書D(i=1,・・・,m)はテキスト(文字列)である。また、検索クエリQに関連する文書とは、この検索クエリQに対する検索結果として得られる文書のことである。
 <検索装置10の全体構成>
 本実施形態に係る検索装置10の全体構成について、図1を参照しながら説明する。図1は、本実施形態に係る検索装置10の全体構成の一例を示す図である。
 図1に示すように、本実施形態に係る検索装置10は、文脈符号化部101と、スパース符号化部102と、転置インデックス活用部103と、ランキング部104とを有する。ここで、文脈符号化部101及びスパース符号化部102はニューラルネットワークで実現されており、そのパラメータは予め学習済みであるものとする。以降では、文脈符号化部101及びスパース符号化部102を実現するニューラルネットワークのパラメータを「モデルパラメータ」と表す。なお、学習済みモデルパラメータは、例えば、HDD(Hard Disk Drive)やSSD(Solid State Drive)等の補助記憶装置に記憶されている。
 文脈符号化部101は、検索クエリQを入力として、学習済みモデルパラメータを用いて、この検索クエリQの特徴量Uを出力する。
 ここで、文脈符号化部101を実現するニューラルネットワークとしては、例えば、BERT(Bidirectional Encoder Representations from Transformers)等を用いることができる。BERTはTransformerを用いた文脈考慮型の事前学習モデルであり、テキストを入力として、d次元の特徴量を出力する。この特徴量を全結合のニューラルネットワーク1層で変換することで、自然言語処理の様々なタスクで高性能を発揮している。BERTの詳細については、例えば、参考文献1「J. Devlin, M.-W. Chang, K. Lee, and K. Toutanova. Bert:Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805, 2018.」等を参照されたい。また、Transformerの詳細については、例えば、参考文献2「Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, Illia Polosukhin. Attention Is All You Need. arXiv preprint arXiv:1706.03762, 2017.」等を参照されたい。
 文脈符号化部101を実現するニューラルネットワークとしてBERTを用いる場合、検索クエリQの文頭にCLSタグ、文末にSEPタグを追加した上で、文脈符号化部101に入力する。
 なお、BERTは一例であって、文脈符号化部101を実現するニューラルネットワークとしては、Transformerを用いた文脈考慮型の他の事前学習モデルが用いられてもよい。より一般には、文脈符号化部101を実現するニューラルネットワークとしては、テキストを符号化することが可能な任意のニューラルネットワークが用いられてもよい。ただし、BERT等の文脈考慮型の事前学習モデルで文脈符号化部101を実現することで、文脈全体を考慮した特徴量を得ることが可能になる。以降では、文脈符号化部101はBERTで実現されているものとして、特徴量Uはd次元ベクトルであるものとする。
 スパース符号化部102は、検索クエリQの特徴量Uを入力として、学習済みモデルパラメータを用いて、検索クエリQのスパース特徴量U'を出力する。
 ここで、スパース符号化部102を実現するニューラルネットワークとしては、例えば、上記の非特許文献1に記載されている全結合層のモデル等を用いることができる。より具体的には、特徴量Uの次元数dよりもスパース特徴量U'の次元数d'の方が大きくなるように全結合層を数層(例えば、3から5層程度)積み上げると共に、これらの全結合層の最終層の発火関数をReLu関数としたモデルを用いることができる。最終層の発火関数をReLu関数とすることで、0を要素に持つスパース特徴量U'を得ることが可能となる(つまり、スパースな表現能力の獲得が可能となる)。
 なお、上記の非特許文献1に記載されているモデルは一例であって、スパース符号化部102を実現するニューラルネットワークとしては、入力次元よりも出力次元の方が高次元であり、かつ、最終層に以下の条件1-1~条件1-3の全てを満たす一般的な発火関数f:R→Rを用いているものであれば任意のモデルを用いることが可能である。
 条件1-1:全てのxに対して、f(x)≧0であること
 条件1-2:fは単調増加であること
 条件1-3:f(a)=0となるa∈Rが存在すること
 また、スパース特徴量U'の次元数d'は可能な限り高次元であることが好ましい。ただし、次元数d'が高いほどスパース特徴量U'の表現力は高くなる一方で、スパース特徴量U'を計算するための計算コストやモデルパラメータを学習するための学習コスト等が高くなる。更に、検索対象の文書集合が持つ情報量と許容可能な計算コストは状況によって異なり得ると共に、次元数d'とスパース符号化部102を実現するニューラルネットワークによる写像の終域が張る空間の次元数(つまり、当該写像の表現行列のランク)とは必ずしも一致するとは限らない。そのため、次元数d'をどの程度とするかは、例えば、検索対象の文書集合が持つ情報量や利用可能な計算資源等によって異なり得る。
 なお、本実施形態では、文脈符号化部101とスパース符号化部102とを異なる機能部として表現しているが、これは便宜上であって、文脈符号化部101とスパース符号化部102とが1つの機能部であってもよい。
 転置インデックス活用部103は、スパース特徴量U'を入力として、予め生成された転置インデックスを用いて、検索対象文書のスパース特徴量の部分集合{V'|i∈K}を得る。Kは|K|=kであり、検索クエリQに関連する文書のインデックス(又は、文書番号や文書ID等)の集合である。また、検索対象文書のスパース特徴量V'は、検索対象文書Dを文脈符号化部101及びスパース符号化部102に入力することで得られるd'次元のベクトルである。以降では、i=1,・・・,mに対して、V'=(v'i1,v'i2,・・・,v'id')と表す。また、文書のインデックスを「文書インデックス」とも表す。なお、転置インデックスは、例えば、HDDやSSD等の補助記憶装置に記憶されている。
 ここで、本実施形態に係る転置インデックスは、スパース特徴量の各次元1,2,・・・,d'(つまり、次元のインデックス又は次元番号)をキーとし、キーrに関して{(i,v'ir)|v'ir≠0}i∈{1,・・・,m}で表される集合をバリューとして設定した情報である。このとき、転置インデックス活用部103は、スパース特徴量U'=(u',u',・・・,u'd')に関してu'≠0である各次元rをキーとして、バリューの集合{(i,v'ir)|v'ir≠0}i∈{1,・・・,m}を転置インデックスから取得する。そして、転置インデックス活用部103は、取得したバリューの集合に含まれる全ての文書インデックスの集合をKとして、検索対象文書のスパース特徴量の部分集合{V'|i∈K}を得る。
 ランキング部104は、検索クエリQのスパース特徴量U'と検索対象文書のスパース特徴量の部分集合{V'|i∈K}とを入力として、検索クエリQに関連する文書(以降、「関連文書」とも表す。)の順序集合{D|i∈K}とその関連度{S|i∈K}とを出力する。なお、関連文書の順序集合{D|i∈K}は、関連度Sの昇順又は降順に順序付けた集合である。
 ここで、関連文書の順序集合{D|i∈K}とその関連度{S|i∈K}は、文書インデックスをリナンバリングすることで、それぞれ{D,・・・,D}及び{S,・・・,S}と表すことができる。また、検索クエリQと文書Dの関連度Sは、適当な距離関数dを用いて、S=d(U',V')で計算される。距離関数dとしては、例えば、内積距離等を用いることが可能である。ただし、距離関数dとしては、ベクトル間の距離を測ることができる任意の距離関数を用いることが可能である。
 <検索処理>
 入力された検索クエリQの関連文書の順序集合{D|i∈K}とその関連度{S|i∈K}とを得るための検索処理について、図2を参照しながら説明する。図2は、本実施形態に係る検索処理の一例を示すフローチャートである。
 ステップS101:まず、文脈符号化部101は、検索クエリQを入力として、学習済みモデルパラメータを用いて、この検索クエリQの特徴量Uを出力する。
 ステップS102:次に、スパース符号化部102は、上記のステップS101で得られた特徴量Uを入力として、学習済みモデルパラメータを用いて、検索クエリQのスパース特徴量U'を出力する。
 ステップS103:次に、転置インデックス活用部103は、上記のステップS102で得られたスパース特徴量U'を入力として、予め生成された転置インデックスを用いて、検索対象文書のスパース特徴量の部分集合{V'|i∈K}を得る。
 ステップS104:そして、ランキング部104は、上記のステップS102で得られたスパース特徴量U'と、上記のステップS103で得られた集合{V'|i∈K}とを入力として、検索クエリQの関連文書の順序集合{D|i∈K}とその関連度{S|i∈K}とを出力する。
 以上により、本実施形態に係る検索装置10は、入力された検索クエリQに関連する文書の順序集合{D|i∈K}とその関連度{S|i∈K}とを得ることができる。このとき、本実施形態に係る検索装置10は、検索クエリQのスパース特徴量U'と、転置インデックス生成装置20によって予め生成された転置インデックスとを用いることで、検索対象文書の文書量のオーダーに依存せずに、高速に関連文書とその関連度とを得ることができる。
 [実施例2]
 次に、実施例2について説明する。実施例2では、転置インデックス生成装置20により転置インデックスを生成する場合について説明する。ここで、転置インデックス生成装置20は、検索対象文書の集合{D,・・・,D}を入力し、転置インデックスを出力するものとする。
 <転置インデックス生成装置20の全体構成>
 本実施形態に係る転置インデックス生成装置20の全体構成について、図3を参照しながら説明する。図3は、本実施形態に係る転置インデックス生成装置20の全体構成の一例を示す図である。
 図3に示すように、本実施形態に係る転置インデックス生成装置20は、文脈符号化部101と、スパース符号化部102と、転置インデックス生成部105とを有する。ここで、文脈符号化部101及びスパース符号化部102は、実施例1で説明した文脈符号化部101及びスパース符号化部102と同一のニューラルネットワークで実現されており、そのモデルパラメータは予め学習済みであるものとする。
 文脈符号化部101は、検索対象文書Dを入力として、学習済みモデルパラメータを用いて、この検索対象文書Dの特徴量Vを出力する。
 スパース符号化部102は、検索対象文書Dの特徴量Vを入力として、学習済みモデルパラメータを用いて、検索対象文書Dのスパース特徴量V'を出力する。
 転置インデックス生成部105は、各検索対象文書D(i=1,・・・,m)のスパース特徴量の集合{V',・・・,V'}を入力として、転置インデックスを生成及び出力する。上述したように、転置インデックスは、スパース特徴量の次元のインデックス又は次元番号をキーとし、キーrに関して{(i,v'ir)|v'ir≠0}i∈{1,・・・,m}で表される集合をバリューとして設定した情報である。したがって、転置インデックス生成部105は、各スパース特徴量V'(i=1,・・・,m)の各要素v'ir(r=1,・・・,d')がv'ir=0であるか否かを判定し、v'ir≠0であればキーがrであるバリューの集合に(i,v'ir)を追加することで、転置インデックスを生成する。
 <転置インデックス生成処理>
 入力された検索対象文書の集合{D,・・・,D}から転置インデックスを生成するための転置インデックス生成処理について、図4を参照しながら説明する。図4は、本実施形態に係る転置インデックス生成処理の一例を示すフローチャートである。なお、転置インデックス生成処理は、後述する学習処理が終了した後、上述した検索処理を実行する前に実行される。
 ステップS201:まず、文脈符号化部101は、検索対象文書Dを入力として、学習済みモデルパラメータを用いて、この検索対象文書Dの特徴量Vを出力する。
 ステップS202:次に、スパース符号化部102は、検索対象文書Dの特徴量Vを入力として、学習済みモデルパラメータを用いて、検索対象文書Dのスパース特徴量V'を出力する。
 上記のステップS201~ステップS202は、全ての検索対象文書D(i=1,・・・,m)に対して繰り返し実行される。
 ステップS203:そして、転置インデックス生成部105は、各検索対象文書D(i=1,・・・,m)のスパース特徴量の集合{V',・・・,V'}を入力として、転置インデックスを生成及び出力する。
 以上により、本実施形態に係る転置インデックス生成装置20は、入力された検索対象文書の集合{D,・・・,D}から転置インデックスを生成することができる。上述したように、この転置インデックスを用いることで、検索装置10は、検索対象文書の文書量のオーダーに依存せずに、高速に関連文書とその関連度とを得ることができる(すなわち、検索クエリQに関連する文書を検索することができる。)。
 [実施例3]
 次に、実施例3について説明する。実施例3では、学習装置30によりニューラルネットワーク(文脈符号化部101及びスパース符号化部102を実現するニューラルネットワーク)の学習を行う場合について説明する。ここで、実施例3ではモデルパラメータは学習済みでないものとして、学習装置30は、訓練データセットを入力し、このモデルパラメータを学習するものとする。訓練データセットはモデルパラメータの学習(訓練)に用いられる訓練データの集合のことである。
 本実施形態では、例えば、参考文献3「Payal Bajaj, Daniel Campos, Nick Craswell, Li Deng, Jianfeng Gao, Xiaodong Liu, Rangan Majumder, Andrew McNamara, Bhaskar Mitra, Tri Nguyen, Mir Rosenberg, Xia Song, Alina Stoica, Saurabh Tiwary, Tong Wang. MS MARCO: A Human Generated MAchine Reading COmprehension Dataset. arXiv preprint arXiv: 1611.09268, 2018.」に記載されているデータセットから訓練データセットを予め作成しておくものとする。
 上記の参考文献3に記載されているデータセットは、検索クエリ集合R={Q,・・・,Q}と検索対象文書の集合G={D,・・・,Dm'}とで構成される。cは検索クエリ数、m'は検索対象文書数である。なお、m'=mであってもよいし、m'≠mであってもよい。ただし、m'≧mであることが好ましい。
 また、検索クエリQ(i=1,・・・,c)に対して、この検索クエリQに関連する文書の集合G={D|DはQに関連する文書}が正解データとしてラベル付けされているものとする。
 このとき、検索クエリQに関連する文書の集合Gからランダムに抽出した1つの文書をD 、検索クエリQに関連しない文書の集合G\Gからランダムに抽出した1つの文書をD として、(Q,D ,D )を訓練データとする(つまり、検索クエリQとその正例とその負例とで構成されるデータを訓練データとする。)。そして、これらの訓練データの集合{(Q,D ,D )|i=1,・・・,c}を訓練データセットとする。
 <学習装置30の全体構成>
 本実施形態に係る学習装置30の全体構成について、図5を参照しながら説明する。図5は、本実施形態に係る学習装置30の全体構成の一例を示す図である。
 図5に示すように、本実施形態に係る学習装置30は、文脈符号化部101と、スパース符号化部102と、ランキング部104と、分割部106と、更新部107と、判定部108とを有する。ここで、文脈符号化部101及びスパース符号化部102は、実施例1及び2で説明した文脈符号化部101及びスパース符号化部102と同一のニューラルネットワークで実現されているが、そのモデルパラメータは学習済みでないものとする。
 分割部106は、訓練データセットを入力として、この訓練データセットを複数のミニバッチにランダムに分割する。本実施形態では、ミニバッチ毎にモデルパラメータが繰り返し更新(学習)されるものとする。
 判定部108は、モデルパラメータの繰り返し更新を終了するための終了条件を満たしたか否かを判定する。なお、一つの訓練データを何回繰り返して学習させるかをエポックといい、その繰り返し数のことはエポック数という。
 文脈符号化部101は、訓練データ(Q,D ,D )を入力として、学習済みでないモデルパラメータを用いて、この訓練データ(Q,D ,D )の特徴量(U,V ,V )を出力する。すなわち、文脈符号化部101は、検索クエリQ、正例D 及び負例D を入力として、それぞれの特徴量U、V 及びV を出力する。
 スパース符号化部102は、訓練データ(Q,D ,D )の特徴量(U,V ,V )を入力として、学習済みでないモデルパラメータを用いて、訓練データ(Q,D ,D )のスパース特徴量(U',V' ,V' )を出力する。すなわち、スパース符号化部102は、特徴量U、V 及びV を入力として、それぞれのスパース特徴量U'、V' 及びV' を出力する。
 ランキング部104は、検索クエリQのスパース特徴量U'と正例D のスパース特徴量V' と負例D のスパース特徴量V' とを入力として、検索クエリQに対する正例D の関連度S と検索クエリQに対する負例D の関連度S とを出力する。ここで、関連度S 及びS は、実施例1で説明した距離関数dを用いて、それぞれS =d(U',V' )及びS =d(U',V' )で計算される。
 更新部107は、スパース特徴量U',V' 及びV' と関連度S 及びS とを入力として、教師あり学習の手法によりモデルパラメータを更新する。ここで、教師あり学習の誤差関数としては、ランキング学習における誤差関数と、L0ノルムを微分可能な関数で近似したコスト関数とを用いればよい。
 より具体的には、ランキング学習における誤差関数には、上記の非特許文献1に記載されているhinge loss(つまり、非特許文献1に記載されている式(3))を用いる。hinge lossは、任意の設定されるパラメータεを用いて、hinge loss=max{0,ε-(S -S )}で表される。
 また、コスト関数には、スパース性を厳密に考慮するために、シグモイド関数を変形させた関数
Figure JPOXMLDOC01-appb-M000001
をスパース特徴の各要素に作用させた和で表される関数を用いる。すなわち、
Figure JPOXMLDOC01-appb-M000002
をコスト関数として用いる。ここで、Xはスパース特徴量X=(x,・・・,xd')であり、aは非常に大きい値である。なお、aとしては、例えば、全てのスパース特徴量の各要素の最大値に対して10倍以上の値とすることが考えられる。
 以上により、教師あり学習の誤差関数lossとしては、例えば、以下の式(3)を用いることができる。
Figure JPOXMLDOC01-appb-M000003
 ここで、λは任意に設定されるパラメータ(学習係数)である。
 上記の式(3)に示す誤差関数loss(すなわち、L0ノルムの微分可能な近似関数をコスト関数とした誤差関数)を用いることで、スパース特徴量のスパース性を安定的に獲得することが可能となる。すなわち、L0ノルムの微分可能な近似関数をコスト関数とした誤差関数を用いることで、微分可能性が担保された上でスパース特徴量のゼロ要素を増やすことができるため、スパース特徴量のスパース性を促進することが可能となる。
 <学習処理>
 入力された訓練データセットからモデルパラメータを学習するための学習処理について、図6を参照しながら説明する。図6は、本実施形態に係る学習処理の一例を示すフローチャートである。なお、モデルパラメータは適当な値で初期化されているものとする。
 ステップS301:まず、分割部106は、訓練データセットを入力として、この訓練データセットを複数のミニバッチにランダムに分割する。
 ステップS302:次に、学習装置30は、各ミニバッチに対して、モデルパラメータの更新処理を実行する。これにより、モデルパラメータ更新処理によってモデルパラメータが更新される。モデルパラメータ更新処理の詳細については後述する。
 ステップS303:そして、判定部108は、所定の終了条件を満たしたか否かを判定する。学習装置30は、終了条件を満たしたと判定された場合(ステップS303でYES)は学習処理を終了する一方で、終了条件を満たしていないと判定された場合(ステップS303でNO)はステップS301に戻る。これにより、所定の終了条件を満たすまで、ステップS301~ステップS302が繰り返し実行される。
 なお、所定の終了条件としては、例えば、エポック数が所定の第1の閾値以上となったこと、誤差関数lossが収束したこと(例えば、誤差関数の値が所定の第2の閾値未満となったこと、モデルパラメータの更新の前後で誤差関数lossの変化量が所定の第3の閾値未満となったこと等)等が挙げられる。
 <モデルパラメータ更新処理>
 上記のステップS302のモデルパラメータ更新処理について、図7を参照しながら説明する。図7は、本実施形態に係るモデルパラメータ更新処理の一例を示すフローチャートである。なお、以降では、或るミニバッチを用いてモデルパラメータを更新する場合について説明する。
 ステップS401:まず、文脈符号化部101は、当該ミニバッチ中の訓練データ(Q,D ,D )を入力として、学習済みでないモデルパラメータを用いて、この訓練データ(Q,D ,D )の特徴量(U,V ,V )を出力する。
 ステップS402:次に、スパース符号化部102は、当該訓練データ(Q,D ,D )の特徴量(U,V ,V )を入力として、学習済みでないモデルパラメータを用いて、当該訓練データ(Q,D ,D )のスパース特徴量(U',V' ,V' )を出力する。
 ステップS403:次に、ランキング部104は、検索クエリQのスパース特徴量U'と正例D のスパース特徴量V' と負例D のスパース特徴量V' とを入力として、検索クエリQに対する正例D の関連度S と検索クエリQに対する負例D の関連度S とを出力する。
 上記のステップS401~ステップS403は、当該ミニバッチに含まれる全ての訓練データ(Q,D ,D )に対して繰り返し実行される。
 ステップS404:続いて、更新部107は、上記のステップS402で得られた各スパース特徴量と、上記のステップS403で得られた各関連度とを入力として、例えば上記の式(3)に示す誤差関数lossの値(つまり、誤差又は損失)とモデルパラメータに関する誤差関数lossの勾配とを計算する。なお、モデルパラメータに関する誤差関数lossの勾配は、例えば、誤差逆伝播法等により計算すればよい。
 ステップS405:そして、更新部107は、上記のステップS404で計算した誤差関数lossの値とその勾配とを用いて、任意の最適化手法によりモデルパラメータを更新する。
 以上により、本実施形態に係る学習装置30は、入力された訓練データセットを用いて、文脈符号化部101及びスパース符号化部102を実現するニューラルネットワークのモデルパラメータを学習することができる。このとき、本実施形態では、誤差関数に含まれるコスト関数としてL0ノルムの微分可能な近似関数を用いることで、当該ニューラルネットワークの出力として得られるスパース特徴量のスパース性を安定的に獲得することが可能となる。
 なお、本実施形態では、モデルパラメータの学習にミニバッチ学習を用いたが、これに限られず、例えば、バッチ学習やオンライン学習等の他の手法を用いてモデルパラメータを学習してもよい。
 また、本実施形態では、シグモイド関数を変形させた関数σ'(x)(上記の式(1))を用いてL0ノルムの微分可能な近似関数を構成したが、例えば、上記の式(1)に示すσ'(x)の代わりに、以下の条件2-1~条件2-3の全てを満たす任意の関数g(x)が用いられてもよい。
 条件2-1:x≧0において値域が0≦g(x)≦1であること
 条件2-2:x≧0において単調増加、かつ、微分可能であること
 条件2-3:x=0において0、かつ、g(x+ε)が限りなく1に近いこと
 ここで、εはε>0を満たす、非常に小さい値である。なお、上記の条件1-1に示したように発火関数fの値域が非負であるため、上記の条件2-1及び条件2-2に対してx≧0という条件を付加することが可能となる。
 なお、上記の条件2-1はニューラルネットワークの出力を正に制限(x≧0)した範囲内においてg(x)は0以上1以下の値を取り得ることを表している。また、上記の条件2-2における「x≧0において単調増加」はx≧0においてg(x)が0に近いか1に近いかを判定するための条件であり、xが0に近いほどg(x)は0に近くなり、xが0よりも増加するほどg(x)は1に近くなることを意味している。また、上記の条件2-2における「微分可能」はgの勾配が計算可能であることを表している。更に、上記の条件2-3はg(0)=0であることと、x≧0においてg(x)が0に近いか1に近いかを判定するために、x≧0においてg(x)は急激な変化を持っている(つまり、0≦x≦ε間でxが増加するとg(x)は急激に1に近付く)こととを表している。
 更に、スパース特徴量の特徴空間が特定の低次元の部分空間で表現されることを防ぐため、上記の式(3)に示す誤差関数lossに対して所定のコスト関数が追加されてもよい。このようなコスト関数としては、例えば、以下の式(4)で表されるpの分布を特定の分布へ近付けるコスト関数(具体的には、rに対するpの分散等)を用いることが可能である。
Figure JPOXMLDOC01-appb-M000004
 ここで、Bは、或る訓練データの集合(例えば、ミニバッチ学習の場合はミニバッチ、バッチ学習の場合は訓練データセット等)に含まれる訓練データ(Q,D ,D )のインデックスiの集合である。
 ただし、rに対するpの分散をコスト関数とする以外にも、例えば、適当な確率分布を仮定し、KL(Kullback-Leibler)ダイバージェンス等の分布間距離尺度を用いてコスト関数が定められてもよい。また、この際、分布パラメータにpの平均等のL0ノルムと等価な尺度が存在する場合には、L0ノルムの微分可能な近似関数をコスト関数として用いなくてもよい。
 <ハードウェア構成>
 最後に、本実施形態に係る検索装置10、転置インデックス生成装置20及び学習装置30のハードウェア構成について説明する。検索装置10、転置インデックス生成装置20及び学習装置30は一般的なコンピュータ又はコンピュータシステムのハードウェア構成により実現可能であり、例えば、図8に示すコンピュータ500のハードウェア構成により実現可能である。図8は、コンピュータ500のハードウェア構成の一例を示す図である。
 図8に示すコンピュータ500は、入力装置501と、表示装置502と、外部I/F503と、通信I/F504と、プロセッサ505と、メモリ装置506とを有する。これら各ハードウェアは、それぞれがバス507を介して通信可能に接続されている。
 入力装置501は、例えば、キーボードやマウス、タッチパネル等である。表示装置502は、例えば、ディスプレイ等である。なお、コンピュータ500は、入力装置501及び表示装置502のうちの少なくとも一方を有していなくてもよい。
 外部I/F503は、外部装置とのインタフェースである。外部装置には、記録媒体503a等がある。コンピュータ500は、外部I/F503を介して、記録媒体503aの読み取りや書き込み等を行うことができる。記録媒体503aには、検索装置10が有する各機能部(文脈符号化部101、スパース符号化部102、転置インデックス活用部103及びランキング部104)を実現する1以上のプログラムが格納されていてもよい。同様に、記録媒体503aには、転置インデックス生成装置20が有する各機能部(文脈符号化部101、スパース符号化部102及び転置インデックス生成部105)を実現する1以上のプログラムが格納されていてもよい。同様に、記録媒体503aには、学習装置30が有する各機能部(文脈符号化部101、スパース符号化部102、ランキング部104、分割部106及び更新部107)を実現する1以上のプログラムが格納されていてもよい。
 なお、記録媒体503aには、例えば、CD(Compact Disc)、DVD(Digital Versatile Disc)、SDメモリカード(Secure Digital memory card)、USB(Universal Serial Bus)メモリカード等がある。
 通信I/F504は、コンピュータ500を通信ネットワークに接続するためのインタフェースである。なお、検索装置10が有する各機能部を実現する1以上のプログラムは、通信I/F504を介して、所定のサーバ装置等から取得(ダウンロード)されてもよい。同様に、転置インデックス生成装置20が有する各機能部を実現する1以上のプログラムは、通信I/F504を介して、所定のサーバ装置等から取得されてもよい。同様に、学習装置30が有する各機能部を実現する1以上のプログラムは、通信I/F504を介して、所定のサーバ装置等から取得されてもよい。
 プロセッサ505は、例えば、CPU(Central Processing Unit)やGPU(Graphics Processing Unit)等の各種演算装置である。検索装置10が有する各機能部は、例えば、メモリ装置506に格納されている1以上のプログラムがプロセッサ505に実行させる処理により実現される。同様に、転置インデックス生成装置20が有する各機能部は、例えば、メモリ装置506に格納されている1以上のプログラムがプロセッサ505に実行させる処理により実現される。同様に、学習装置30が有する各機能部は、例えば、メモリ装置506に格納されている1以上のプログラムがプロセッサ505に実行させる処理により実現される。
 メモリ装置506は、例えば、HDDやSSD、RAM(Random Access Memory)、ROM(Read Only Memory)、フラッシュメモリ等の各種記憶装置である。
 本実施形態に係る検索装置10は、図8に示すコンピュータ500のハードウェア構成を有することにより、上述した検索処理を実現することができる。同様に、本実施形態に係る転置インデックス生成装置20は、図8に示すコンピュータ500のハードウェア構成を有することにより、上述した転置インデックス生成処理を実現することができる。同様に、本実施形態に係る学習装置30は、図8に示すコンピュータ500のハードウェア構成を有することにより、上述した学習処理を実現することができる。なお、図8に示すコンピュータ500のハードウェア構成は一例であって、コンピュータ500は、他のハードウェア構成を有していてもよい。例えば、コンピュータ500は、複数のプロセッサ505を有していてもよいし、複数のメモリ装置506を有していてもよい。
 本発明は、具体的に開示された上記の実施形態に限定されるものではなく、請求の範囲の記載から逸脱することなく、種々の変形や変更、既知の技術との組み合わせ等が可能である。
 10    検索装置
 20    転置インデックス生成装置
 30    学習装置
 101   文脈符号化部
 102   スパース符号化部
 103   転置インデックス活用部
 104   ランキング部
 105   転置インデックス生成部
 106   分割部
 107   更新部
 108   判定部

Claims (6)

  1.  検索クエリと、前記検索クエリに関連がある第1の文書と、前記検索クエリに関連がない第2の文書とを入力として、ニューラルネットワークのモデルパラメータを用いて、前記検索クエリの特徴量と、前記第1の文書の特徴量と、前記第2の文書の特徴量とを生成する特徴量生成手段と、
     前記検索クエリの特徴量と、前記第1の文書の特徴量と、前記第2の文書の特徴量とを入力として、L0ノルムの微分可能な近似関数をコスト関数が含まれる誤差関数を用いて、前記モデルパラメータを更新する更新手段と、
     を有することを特徴とする学習装置。
  2.  前記特徴量生成手段は、
     前記検索クエリに関して検索対象となる文書集合を入力として、前記更新手段により更新された前記モデルパラメータを用いて、前記文書集合に含まれる各文書の特徴量をそれぞれ生成し、
     前記学習装置は、
     前記各文書の特徴量の集合を入力として、前記集合に含まれる特徴量毎に、前記特徴量に含まれる非ゼロの要素に対応する次元のインデックスをキー、前記非ゼロの要素と前記特徴量に対応する文書のインデックスとをバリューとする転置インデックスを生成する転置インデックス生成手段、
     を有することを特徴とする請求項1に記載の学習装置。
  3.  検索クエリを入力として、ニューラルネットワークの学習済みモデルパラメータを用いて、前記検索クエリのスパースな特徴量を生成する特徴量生成手段と、
     前記特徴量を入力として、前記特徴量の各次元のインデックスをキー、検索対象の文書のインデックスをバリューに設定した転置インデックスを用いて、前記特徴量に含まれる非ゼロ要素の次元のインデックスをキーとするバリューに設定されたインデックスの文書を、前記検索クエリに関連する文書として検索する検索手段と、
     を有することを特徴とする検索装置。
  4.  検索クエリと、前記検索クエリに関連がある第1の文書と、前記検索クエリに関連がない第2の文書とを入力として、ニューラルネットワークのモデルパラメータを用いて、前記検索クエリの特徴量と、前記第1の文書の特徴量と、前記第2の文書の特徴量とを生成する特徴量生成手順と、
     前記検索クエリの特徴量と、前記第1の文書の特徴量と、前記第2の文書の特徴量とを入力として、L0ノルムの微分可能な近似関数をコスト関数が含まれる誤差関数を用いて、前記モデルパラメータを更新する更新手順と、
     をコンピュータが実行することを特徴とする学習方法。
  5.  検索クエリを入力として、ニューラルネットワークの学習済みモデルパラメータを用いて、前記検索クエリのスパースな特徴量を生成する特徴量生成手順と、
     前記特徴量を入力として、前記特徴量の各次元のインデックスをキー、検索対象の文書のインデックスをバリューに設定した転置インデックスを用いて、前記特徴量に含まれる非ゼロ要素の次元のインデックスをキーとするバリューに設定されたインデックスの文書を、前記検索クエリに関連する文書として検索する検索手順と、
     をコンピュータが実行することを特徴とする検索方法。
  6.  コンピュータを、請求項1又は2に記載の学習装置における各手段又は請求項3に記載の検索装置における各手段として機能させるためのプログラム。
PCT/JP2020/003097 2020-01-29 2020-01-29 学習装置、検索装置、学習方法、検索方法及びプログラム WO2021152715A1 (ja)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP2021573681A JP7363929B2 (ja) 2020-01-29 2020-01-29 学習装置、検索装置、学習方法、検索方法及びプログラム
PCT/JP2020/003097 WO2021152715A1 (ja) 2020-01-29 2020-01-29 学習装置、検索装置、学習方法、検索方法及びプログラム
US17/795,868 US20230072537A1 (en) 2020-01-29 2020-01-29 Learning apparatus, search apparatus, learning method, search method and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2020/003097 WO2021152715A1 (ja) 2020-01-29 2020-01-29 学習装置、検索装置、学習方法、検索方法及びプログラム

Publications (1)

Publication Number Publication Date
WO2021152715A1 true WO2021152715A1 (ja) 2021-08-05

Family

ID=77078688

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2020/003097 WO2021152715A1 (ja) 2020-01-29 2020-01-29 学習装置、検索装置、学習方法、検索方法及びプログラム

Country Status (3)

Country Link
US (1) US20230072537A1 (ja)
JP (1) JP7363929B2 (ja)
WO (1) WO2021152715A1 (ja)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115166618A (zh) * 2022-09-06 2022-10-11 武汉格蓝若智能技术有限公司 一种非平稳输出的电流互感器误差评估方法

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008538149A (ja) * 2005-03-18 2008-10-09 ウィンク テクノロジ−ズ インコ−ポレイテッド 格付け方法、検索結果組織化方法、格付けシステム及び検索結果組織化システム
JP2017040972A (ja) * 2015-08-17 2017-02-23 日本電信電話株式会社 特徴量生成装置、方法、及びプログラム
JP6320649B1 (ja) * 2017-03-31 2018-05-09 三菱電機株式会社 機械学習装置及び画像認識装置

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6189002B1 (en) * 1998-12-14 2001-02-13 Dolphin Search Process and system for retrieval of documents using context-relevant semantic profiles
US8341095B2 (en) * 2009-01-12 2012-12-25 Nec Laboratories America, Inc. Supervised semantic indexing and its extensions
US9081831B2 (en) * 2012-03-30 2015-07-14 Google Inc. Methods and systems for presenting document-specific snippets
JP6150282B2 (ja) * 2013-06-27 2017-06-21 国立研究開発法人情報通信研究機構 ノン・ファクトイド型質問応答システム及びコンピュータプログラム
GB2549554A (en) * 2016-04-21 2017-10-25 Ramot At Tel-Aviv Univ Ltd Method and system for detecting an object in an image
US11392596B2 (en) * 2018-05-14 2022-07-19 Google Llc Efficient inner product operations
US11615149B2 (en) * 2019-05-27 2023-03-28 Microsoft Technology Licensing, Llc Neural network for search retrieval and ranking
WO2021076606A1 (en) * 2019-10-14 2021-04-22 Stacks LLC Conceptual, contextual, and semantic-based research system and method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008538149A (ja) * 2005-03-18 2008-10-09 ウィンク テクノロジ−ズ インコ−ポレイテッド 格付け方法、検索結果組織化方法、格付けシステム及び検索結果組織化システム
JP2017040972A (ja) * 2015-08-17 2017-02-23 日本電信電話株式会社 特徴量生成装置、方法、及びプログラム
JP6320649B1 (ja) * 2017-03-31 2018-05-09 三菱電機株式会社 機械学習装置及び画像認識装置

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115166618A (zh) * 2022-09-06 2022-10-11 武汉格蓝若智能技术有限公司 一种非平稳输出的电流互感器误差评估方法

Also Published As

Publication number Publication date
JPWO2021152715A1 (ja) 2021-08-05
US20230072537A1 (en) 2023-03-09
JP7363929B2 (ja) 2023-10-18

Similar Documents

Publication Publication Date Title
Zerveas et al. A transformer-based framework for multivariate time series representation learning
Biessmann et al. " Deep" Learning for Missing Value Imputationin Tables with Non-numerical Data
Kimothi et al. Distributed representations for biological sequence analysis
CN113535984B (zh) 一种基于注意力机制的知识图谱关系预测方法及装置
Liu et al. Robust and scalable graph-based semisupervised learning
Wang et al. Online collective matrix factorization hashing for large-scale cross-media retrieval
JP5881048B2 (ja) 情報処理システム、及び、情報処理方法
Lian et al. Product quantized collaborative filtering
Liu High performance latent dirichlet allocation for text mining
KR20230094955A (ko) 문서 데이터 검색 기법
WO2021152715A1 (ja) 学習装置、検索装置、学習方法、検索方法及びプログラム
Moskalenko et al. Scalable recommendation of wikipedia articles to editors using representation learning
CN113918807A (zh) 数据推荐方法、装置、计算设备及计算机可读存储介质
CN117435685A (zh) 文档检索方法、装置、计算机设备、存储介质和产品
JP7364058B2 (ja) 学習装置、検索装置、学習方法、検索方法及びプログラム
CN117171393A (zh) 一种面向多模态检索的自适应半配对询问哈希方法
WO2022123695A1 (ja) 学習装置、検索装置、学習方法、検索方法及びプログラム
Zhou et al. End-to-end modularity-based community co-partition in bipartite networks
WO2019144046A1 (en) Distributed high performance computing using distributed average consensus
Bartosova et al. Ranking of Search Requests in the Digital Information Retrieval System Based on Dynamic Neural Networks
WO2024042648A1 (ja) 学習装置、学習方法及びプログラム
Zhang et al. Quantization-based hashing with optimal bits for efficient recommendation
Xu et al. Cross-media retrieval based on pseudo-label learning and semantic consistency algorithm
Smatana et al. Extraction of keyphrases from single document based on hierarchical concepts
Huybrechts et al. Learning to rank with deep neural networks

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20916469

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2021573681

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20916469

Country of ref document: EP

Kind code of ref document: A1