A method and system for detecting AI-generated lyrics
Patent Information
- Application Number
- CN202611322305.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-28
- Publication Date
- 2026-10-20
AI Technical Summary
[0003]然而,歌词作为一种兼具语义表达与音乐属性的特殊文体,创作过程受到韵律结构的强大约束,词作者在填词时需要兼顾语义内容与押韵要求,这种双重约束会导致词汇的选择呈现特殊性,现有基于概率统计的检测方法在处理歌词文本时会面临显著挑战,例如,人类受韵律驱动创作的歌词的统计特征往往接近甚至难以与AI生成的常规文本区分,使得依据概率分布进行判断的传统策略难以有效区分两类文本,极易产生误判
通过引入韵律压力系数,将歌词文本中因押韵需求而产生的词汇选择偏差进行量化,进而利用语义还原手段消除该偏差,生成更贴近自然语言表达的语义序列,有效剥离歌词创作中由韵律约束引发的非语义干扰,使得后续AI生成特征检测能够聚焦于文本的语义逻辑和结构模式,而非表面的押韵形式,从而减少韵律约束造成的特征干扰,提高检测结果的准确性和稳定性,从歌词创作的内在约束出发,构建了更具解释性和针对性的检测路径;
Smart Images

Figure FT_1 
Figure FT_2 
Figure FT_3
Abstract
Description
Technical Field
[0001] This invention belongs to the field of natural language processing and artificial intelligence text detection technology, specifically relating to a method and system for detecting AI-generated lyrics. Background Technology
[0002] With the widespread application of large language models in music composition, automated detection of AI-generated content has become a crucial requirement for digital content moderation and copyright protection. Currently, the detection of AI-generated text primarily relies on statistical analysis methods based on the perplexity of language models, which has achieved some success in conventional text types such as news articles and academic papers.
[0003] However, lyrics, as a special genre that combines semantic expression and musical attributes, are strongly constrained by rhythmic structure during the creative process. Lyricists need to consider both semantic content and rhyme requirements when writing lyrics. This dual constraint leads to the special nature of word selection. Existing probability-based detection methods face significant challenges when processing lyric texts. For example, the statistical characteristics of lyrics created by humans driven by rhythm are often close to or even difficult to distinguish from regular text generated by AI. This makes it difficult for traditional strategies based on probability distribution to effectively distinguish between the two types of texts, and they are prone to misjudgment. Summary of the Invention
[0004] To overcome the shortcomings of the prior art, one aspect of the present invention proposes a method for detecting AI-generated lyrics, the method comprising:
[0005] The lyrics text to be detected is identified segment by segment. The final vowel or final syllable pattern at the end of each sentence in each segment of the lyrics text to be detected is used as the rhyme constraint. The words in the lyrics text to be detected that are at the end of each sentence in each segment and whose rhyme pattern matches the rhyme constraint are identified as rhyming words. If the rhyme coverage rate of the lyrics text to be detected is not lower than a first preset threshold, the prosodic pressure coefficient of each rhyming word is calculated; the rhyme coverage rate is the proportion of the number of sentence-final words identified as rhyming words to the total number of sentence-final words in the lyrics text to be detected; the prosodic pressure coefficient is determined based on the comparison result of the first occurrence probability under the condition of no prosodic constraint and the second occurrence probability under the condition of rhyme constraint, and is used to quantify the degree of directional shift of the prosodic constraint on the selection probability of each rhyming word; By using semantic restoration, each rhyming word in the lyrics text to be detected is replaced with a corresponding approximate word based on the prosodic pressure coefficient, thereby generating a semantic sequence; if the rhyme coverage of the lyrics text to be detected is lower than the first preset threshold, the lyrics text to be detected is used as a semantic sequence. The semantic sequence is subjected to AI-generated feature detection, and the detection results are used to determine whether the lyrics text to be detected is AI-generated.
[0006] Another aspect of the present invention also proposes a system for detecting AI-generated lyrics, the system comprising: The recognition module is used to recognize the lyrics text to be detected segment by segment, and to use the vowel or final syllable pattern at the end of each sentence in each segment of the lyrics text to be detected as rhyme constraints, and to identify the words in the lyrics text to be detected that are at the end of each sentence in each segment and whose rhyme pattern matches the rhyme constraints as rhyme words. The calculation module is used to calculate the prosodic pressure coefficient of each rhyming word when the rhyme coverage rate of the lyrics text to be detected is not lower than a first preset threshold; the rhyme coverage rate is the proportion of the number of sentence-final words identified as rhyming words to the total number of sentence-final words in the lyrics text to be detected; the prosodic pressure coefficient is determined based on the comparison result of the first occurrence probability under the condition of no prosodic constraint and the second occurrence probability under the condition of rhyme constraint, and is used to quantify the degree of directional shift of the prosodic constraint on the selection probability of each rhyming word; The replacement module is used to replace each rhyming word in the lyrics text to be detected with a corresponding approximate word based on the prosodic pressure coefficient through semantic restoration, thereby generating a semantic sequence. The detection module is used to perform AI-generated feature detection on the semantic sequence and determine whether the lyrics text to be detected is AI-generated based on the detection results; and when the rhyme coverage of the lyrics text to be detected is lower than the first preset threshold, the lyrics text to be detected is used as a semantic sequence for AI-generated feature detection.
[0007] The above-mentioned technical solution has at least the following beneficial effects: By introducing a prosodic pressure coefficient, the word selection bias caused by rhyming requirements in lyrics is quantified. Then, semantic restoration is used to eliminate this bias, generating a semantic sequence that is closer to natural language expression. This effectively removes non-semantic interference caused by prosodic constraints in lyric writing, allowing subsequent AI-generated feature detection to focus on the semantic logic and structural patterns of the text, rather than the surface rhyming form. This reduces feature interference caused by prosodic constraints and improves the accuracy and stability of detection results. Starting from the inherent constraints of lyric writing, a more interpretable and targeted detection path is constructed. The strategy of identifying rhymes segment by segment, rather than identifying rhymes uniformly throughout the entire song, can effectively handle the common phenomenon of multiple rhymes in modern lyrics, making the calculation of the rhythmic pressure coefficient more accurate and avoiding information loss and correction deviation caused by uniform identification throughout the entire song. By semantically replacing rhyming words instead of simply deleting or ignoring them, the semantic coherence and integrity of the lyrics are preserved, avoiding the risk of misjudgment due to information truncation. The calculation of the prosodic pressure coefficient is based on probability comparison, which can adapt to the constraint strength of different paragraphs and different rhyming patterns. This makes the replacement strategy flexible and context-aware, applicable to lyrics texts of various styles and themes. It can not only be used for the recognition of AI-generated lyrics, but also provide a reference framework for other text generation and detection tasks with structural constraints. Attached Figure Description
[0008] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0009] Figure 1 This is a flowchart illustrating the method for detecting AI-generated lyrics provided in Example 1. Figure 2 A flowchart illustrating the method for calculating the prosodic pressure coefficient of rhyming words; Figure 3 This is a flowchart illustrating the method for generating semantic sequences through semantic reduction. Figure 4 This is a schematic diagram of a method for AI-generated feature detection using emotion smoothness detection. Figure 5 A flowchart illustrating the method for determining the fluctuation threshold; Figure 6 A schematic diagram illustrating the process of AI-generated feature detection based on lexical richness fluctuations; Figure 7 This is a schematic diagram of the module architecture of the system for detecting AI-generated lyrics provided in Example 2. Detailed Implementation
[0010] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.
[0011] Various embodiments of the invention will be described more fully below. The invention may have various embodiments, and adjustments and changes may be made therein. However, it should be understood that there is no intention to limit the various embodiments of the invention to the specific embodiments disclosed herein, but rather the invention should be understood to cover all modifications, equivalents, and / or alternatives falling within the spirit and scope of the various embodiments of the invention.
[0012] Example 1 This embodiment proposes a method for detecting AI-generated lyrics. This method eliminates the systematic distortion of the probability distribution of word selection in lyrics caused by prosodic constraints. By using the Rhythm Pressure Index (RPI), it restores "words chosen for rhyming" to "words most likely to be used in normal context," thereby constructing a noise-free semantic sequence. This allows the detection method to work accurately on the lyric style, effectively solving the dual problems of human lyrics being misjudged as AI-generated due to their use of low-frequency words for rhyming, and AI lyrics escaping detection due to learning rhyming patterns. Please refer to [link to relevant documentation]. Figure 1 The methods specifically include: S100: Segment by segment, identify the lyrics text to be detected, and use the vowel or final syllable pattern at the end of each sentence in each segment of the lyrics text to be detected as rhyme constraints, and identify the words in the lyrics text to be detected that are at the end of each sentence in each segment and whose rhyme pattern matches the rhyme constraints as rhyme words.
[0013] Specifically, step S100 pre-acquires all languages contained in the lyrics text to be detected, and extracts the pronunciation units at the end of each sentence in the lyrics text to be detected according to the rhyme recognition method corresponding to each language in the text. Based on the pronunciation similarity of the pronunciation units, equivalent clustering is performed on each pronunciation unit, and pronunciation units with the same pronunciation or satisfying the preset similarity rules are classified into the same candidate rhyme category. In an optional implementation, the preset similarity rules include: the main vowel of the final is the same and the final consonant is consistent, which is considered to be similar in pronunciation. For example, the Chinese "ang" is classified into the same category as "iang" and "uang". Or the core phoneme of the vowel-consonant combination is the same, which is considered to be similar in pronunciation. For example, the English "eɪ" and "eɪn" are classified into the same category when the nasal sound can be ignored. The frequency of each candidate rhyme category appearing at the end of each sentence in each paragraph is counted, and at least one candidate rhyme category is selected as the main rhyme category of the corresponding paragraph based on the frequency from high to low; or, the rhyme coverage rate of each candidate rhyme category is calculated, and the candidate rhyme category with a rhyme coverage rate exceeding a preset coverage threshold is determined as the main rhyme category of the corresponding paragraph; preferably, when evaluating whether the pronunciation unit at the end of any current sentence satisfies the rhyme constraint, the method proposed in this embodiment excludes the current sentence itself from the calculation of the frequency and coverage rate, so as to avoid using the rhyme features of the current sentence itself as the basis for judging whether the sentence is rhyming, thereby more accurately reflecting the actual rhyme pattern of the paragraph to which the sentence belongs; Finally, the vowel or final syllable pattern corresponding to the phonetic unit belonging to the main rhyme category in each paragraph is determined as the rhyme constraint. When the rhyme coverage rate of a paragraph is lower than the preset rhyme coverage rate threshold, it indicates that the paragraph does not present a significant rhyme pattern. At this time, no rhyme constraint is set for the paragraph, that is, the sentence-final words in the paragraph do not participate in the calculation of the prosodic pressure coefficient and the subsequent semantic restoration steps, so as to avoid forcibly imposing prosodic constraints in free verse style or unrhymed paragraphs and generating noise.
[0014] The identification granularity is segment-by-segment rather than uniform throughout the entire song, which can effectively handle the common situation of multiple rhymes in modern lyrics. For example, the lyrics of a popular song may rhyme with "-a" in the verse and "-ang" in the chorus. The segment-by-segment identification mechanism in this method can accurately capture such segment-level rhythmic changes, thereby avoiding the information loss caused by uniform identification throughout the entire song. In one specific implementation, when the language of the lyrics to be detected includes Chinese, the corresponding rhyme recognition method includes extracting the vowel of the last character of each line; when the language of the lyrics to be detected includes English, the corresponding rhyme recognition method includes extracting the vowel-consonant combination of the last syllable; when the language of the lyrics to be detected includes Japanese, the corresponding rhyme recognition method includes extracting the mora pattern of the last kana.
[0015] Preferably, after determining each rhyming word in step S100, the method proposed in this embodiment calculates the rhyme coverage rate of the lyrics text to be detected, that is, the proportion of the number of sentence-end words identified as rhyming words to the total number of sentence-end words in the lyrics text to be detected. If the rhyme coverage of the lyrics to be detected is lower than the first preset threshold, it indicates that the rhythmic pattern of the lyrics is not significant. The method proposed in this embodiment will determine that the lyrics to be detected have not detected a significant rhythmic pattern, and at this time skip the rhythmic correction steps of calculating the rhythmic pressure coefficient and semantic restoration to replace similar words, that is, skip steps S200 and S300, and use the lyrics to be detected as the original semantic sequence to perform the subsequent step S400, that is, the AI generating feature detection step, and mark "no significant rhythmic pattern detected, no rhythmic correction performed" in the final output detection report. It should be noted that when the lyrics to be detected include free verse style lyrics such as rap or experimental lyrics, or when the recognition of the lyrics to be detected fails, the rhyme coverage of the lyrics to be detected will be lower than the first preset threshold.
[0016] The principle for setting the first preset threshold is to ensure that most intentionally rhyming lyrics can be identified as "rhyming" while excluding accidental rhymes. The specific value of the first preset threshold can be determined by analyzing the rhyme coverage distribution on the labeled dataset. For example, on a dataset containing thousands of lyrics labeled as "intentionally rhyming" and "free verse", the distribution curve of rhyme coverage can be statistically analyzed and plotted. The threshold can be set to ensure that the recognition rate of intentionally rhyming lyrics reaches more than 95%, while controlling the misrecognition rate of accidental rhymes to below 5%, thereby achieving the optimal binary classification effect.
[0017] S200: If the rhyme coverage of the lyrics text to be detected is not lower than the first preset threshold, calculate the prosodic pressure coefficient of each rhyming word.
[0018] It should be noted that the Rhyme Pressure Index (RPI) is determined based on the comparison between the first occurrence probability under no rhyme constraints and the second occurrence probability under rhyme constraints. The Rhyme Pressure Index is used to quantify the degree of directional shift of the probability of each rhyming word selection due to rhyme constraints. In other words, it assesses the extent to which a word is selected due to the "pressure" of the need to rhyme. Thus, the Rhyme Pressure Index can quantify the motivation for selecting words for the sake of rhyme, thereby providing a basis for subsequent semantic reconstruction.
[0019] S300: By using semantic restoration, each rhyming word in the lyrics text to be detected is replaced with a corresponding approximate word based on the prosodic pressure coefficient, thereby generating a semantic sequence; if the rhyme coverage of the lyrics text to be detected is lower than the first preset threshold, the lyrics text to be detected is used as a semantic sequence.
[0020] It should be noted that the semantic sequence generated in step S300 is the text sequence after noise removal. Semantic restoration can eliminate the directional shift of prosodic constraints on word selection, making the subsequent detection features more realistically reflect the semantic evolution and structural differences of the lyrics. However, the specific impact of semantic restoration on the detection features is not a simple cause-and-effect relationship. Replacing rare words with common words does not necessarily reduce the lexical richness (TTR) value. If both the word before and after the replacement is the only word that appears once in the paragraph, the TTR value remains unchanged. Replacement does not necessarily improve the sentiment analysis results, because the replaced word may deviate from the original text in terms of sentiment polarity, thus affecting the construction of the sentiment change curve. Therefore, the effect of the semantic sequence generated in step S300 on subsequent detection depends on the degree of fit between the replaced word and the original word in terms of semantics, part of speech, and sentiment polarity. The quality of replacement needs to be ensured by contextual constraint search in the semantic vector space, and statistically verified by ablation experiments on the validation set, rather than assuming a priori that any replacement can improve the detection effect.
[0021] To ensure the consistency and comparability of vocabulary richness statistics, this embodiment can use a unified word segmenter to segment the lyrics text. The word segmenter can maintain the same segmentation rules throughout the detection process. That is, the same word segmenter is used to segment the original text and semantic sequence of the same lyrics sample to avoid interference from differences in segmentation granularity to vocabulary richness statistics.
[0022] Furthermore, when performing vocabulary richness statistics between paragraphs, this embodiment can preset a minimum paragraph length threshold. Paragraphs with fewer than this threshold are not included in the vocabulary richness fluctuation statistics to avoid the dominant influence of low-frequency words that occasionally appear in short paragraphs on the statistical results. The actual effective length of each paragraph participating in the vocabulary richness calculation can be normalized. For paragraphs whose length exceeds the average paragraph length, they are randomly downsampled to the average length based on the number of lines. For paragraphs whose length is insufficient, if their number of lines is lower than the minimum paragraph length threshold, they are merged with adjacent paragraphs and re-divided, thereby ensuring that the text length of each paragraph participating in the vocabulary richness statistics is basically consistent and eliminating the influence of paragraph length differences on vocabulary richness calculation.
[0023] Furthermore, the method proposed in this embodiment can quantify the impact of semantic reconstruction on the detection features on the validation set. For example, on the validation set independent of the training set, the lexical richness of each paragraph and the emotional change of adjacent paragraphs are calculated for the original lyrics text and the semantic sequence generated in step S300, respectively. The distribution differences of the two sets of indicators are compared by paired statistical tests to confirm whether semantic reconstruction significantly improves the discriminativeness of the detection features. If the validation results show that the improvement is not significant, it indicates that the prosodic interference of the lyrics sample itself is not enough to affect subsequent detection. At this time, the original text can be used directly for subsequent detection or the weight of the semantic reconstruction step can be reduced.
[0024] S400: Perform AI-generated feature detection on semantic sequences and determine whether the lyrics text to be detected is AI-generated based on the detection results.
[0025] Specifically, please see Figure 2 The method for calculating the prosodic pressure coefficient of rhyming words in step S200 includes: S210: Without imposing prosodic constraints, calculate the first probability of a rhyming word appearing at the current rhyming position using a large language model; and, with prosodic constraints imposed, calculate the second probability of a rhyming word appearing at the current rhyming position using a large language model.
[0026] The first probability of occurrence represents the probability of the corresponding rhyming word appearing at the rhyming position without considering rhyme; the second probability of occurrence represents the probability of the corresponding rhyming word appearing at the rhyming position with rhyme in mind; both the first probability of occurrence and the second probability of occurrence are greater than zero. Preferably, when the rhyming word is a word-based word, the probability value of the word element in the corresponding rhyming word output by the large language model directly determines the first occurrence probability and the second occurrence probability; When the rhyming word is a multi-element word, the large language model outputs the conditional probability of each lexical element after the rhyming word is segmented under the preceding context, calculates the logarithmic mean of the conditional probabilities, and determines the first occurrence probability and the second occurrence probability based on the logarithmic mean.
[0027] Specifically, step S210 can use the same large language model, the same context to be predicted, and the same model parameters under both conditions of no prosodic constraints and prosodic constraints to obtain the conditional probabilities of one or more lexical units corresponding to the target rhyming word, and determine the first occurrence probability and the second occurrence probability based on the normalized log-likelihood of the conditional probabilities of each lexical unit.
[0028] In one specific implementation, the method proposed in this embodiment can employ a large language model M capable of outputting lexical conditional probabilities. For the target rhyme word w at the end of the i-th sentence, the target rhyme word is first removed from the input text, and the lyrics text of the same segment preceding the target position is used as the context. To avoid information leakage caused by the target word's involvement in rhyme constraint recognition, the current sentence can be excluded from its own rhyme constraint determination. Instead, the current rhyme constraint can be determined based on the final pronunciation units of other sentences in the same paragraph. ; When calculating the probability of the first occurrence, context is input into the large language model. The algorithm requires the large language model to predict the sentence-final word at the target position without adding a rhyme condition. When calculating the second occurrence probability, the large language model, context, model parameters, and prediction position remain unchanged, with only the condition that "the final pronunciation unit of the predicted word satisfies the rhyme constraint" being added. The condition is "" and under both conditions, random sampling is not performed; instead, the word probability distribution output by the large language model is directly read.
[0029] S220: If the probability of the first occurrence is less than the probability of the second occurrence, calculate the logarithm of the ratio of the probability of the second occurrence to the probability of the first occurrence, and take the larger value between the logarithm and zero as the prosodic pressure coefficient of the rhyming word.
[0030] It should be noted that if the probability of the first occurrence is... Less than the probability of the second occurrence This indicates that the probability of the word appearing under rhyme constraints is significantly higher than its natural probability of occurrence; in a preferred embodiment, step S220 can be achieved through the formula The prosodic pressure coefficient (RPI) of the rhyming word can be calculated; in the formula, This represents the logarithm with base b, where the base b is selected from any one of the natural constant e, 10, or 2. Preferably, the base b is the natural constant e. A preset smoothing term for very small positive numbers is used to prevent... A division-by-zero error occurs when the value is zero or close to zero, or the logarithm tends towards negative infinity; preferably, The range of values is ; Taking max{0,...} ensures that the prosodic stress coefficient is non-negative, avoiding negative values due to probability estimation noise or smoothing terms; When a rhyming word is composed of multiple sub-word units, step S210 can input the rhyming word into the large language model, sequentially obtain the conditional probability of each sub-word unit after the word is segmented under the preceding context, calculate the logarithmic average of each conditional probability, use the logarithmic average as the logarithmic value of the word's occurrence probability, and then obtain the word's occurrence probability by taking the exponentiation of the logarithmic value. This calculation method transforms multiplication into addition after taking the logarithm and then divides by the total number of sub-word units, eliminating the influence of the difference in the number of sub-word units contained in different words on the probability estimation, and making the occurrence probabilities of single-sub-word words and multi-sub-word words comparable.
[0031] It should also be noted that the reason for using logarithmic ratios instead of linear ratios in the formula is that prosodic constraints affect the probability of word selection across multiple orders of magnitude. For example, common rhymes such as the "ang" rhyme in Chinese may increase the conditional probability of certain words by 10 to 100 times, while the conditional probability of rare rhymes may only increase by 2 to 3 times. The logarithmic form can compress the differences across orders of magnitude into a linearly comparable range, maintain numerical stability, and avoid extreme values dominating the overall calculation results.
[0032] S230: If the probability of the first occurrence is greater than or equal to the probability of the second occurrence, the prosodic pressure coefficient of the rhyming word is set to zero.
[0033] It should be noted that the goal of semantic restoration is to eliminate the word selection bias caused by rhyme-driven processes. However, the case of prosodic suppression indicates that the probability of the word appearing under rhyme constraints is lower than or equal to its natural probability of occurrence, which means that the word selection is semantically driven rather than prosodic and does not require correction. Therefore, when the probability of the first occurrence Greater than or equal to the probability of the second occurrence At that time, the probability of the rhyming word appearing in the current rhyming position was not increased due to the rhyming constraint. On the contrary, it was suppressed or at least not significantly enhanced. This fully demonstrates that the selection of the rhyming word was not due to being forced to use it for the sake of rhyming, but rather the result of the lyricist's active selection under the natural semantic expression. There was no semantic distortion caused by the rhythm constraint in the word selection process. If it is forcibly replaced, it will introduce new semantic deviations, which may destroy the original natural semantic expression and reduce the fidelity of the semantic sequence.
[0034] Therefore, the method proposed in this embodiment only performs semantic restoration on rhyming words with a positive prosodic pressure coefficient that exceeds a preset threshold, so as to ensure that the correction operation accurately targets the word selection deviation driven by prosodic constraints, while preserving the original semantic information to the greatest extent.
[0035] Specifically, please see Figure 3 The method for generating a semantic sequence through semantic reduction in step S300 includes: S310: Retain rhyming words whose prosodic pressure coefficient is lower than or equal to the second preset threshold.
[0036] S320: For each rhyme word whose prosodic pressure coefficient is higher than the second preset threshold, perform context encoding, and combine the context information of the sentence where the rhyme word is located and the adjacent sentences to obtain the contextualized semantic vector representation of the rhyme word in the current lyrics context.
[0037] Preferably, the method proposed in this embodiment can construct an annotated dataset containing human-created lyrics samples and AI-generated lyrics samples. Each sample in the annotated dataset has completed rhyme word identification and prosodic pressure coefficient calculation. In the annotated dataset, the method for determining the annotation label of "whether it is prosodic driven" can include that, for each rhyme word in the sample, the annotator makes a judgment based on the semantics and rhyme pattern of the sentence in which the rhyme word is located. If the appearance of the rhyme word is obviously to meet the rhyming requirements of the current sentence, and in a context without rhyming constraints, the lyricist is more likely to choose other words, then the rhyme word can be labeled as "prosodic driven". Otherwise, the rhyme word can be labeled as "non-prosodic driven". In one specific implementation, to ensure annotation quality, the annotation work can be completed independently by at least two annotators with linguistics backgrounds. Cohen's Kappa coefficient is used to evaluate the consistency among annotators, and only annotation results with a Kappa value of 0.70 or higher are determined to be reliable results. Inconsistent samples can be resolved through discussion or arbitration by more annotators.
[0038] The method can divide the labeled dataset into training, validation, and test sets according to a preset ratio, and ensure that the training, validation, and test sets do not overlap. The training set is used for parameter tuning of the large language model during the calculation of prosodic stress coefficient, the validation set is used to determine the value of the second preset threshold, and the test set is used to finally evaluate the overall detection performance after the threshold is set. By dividing the dataset, the method can avoid the circular validation caused by re-labeling the prosodic stress coefficient threshold with derived labels of the prosodic stress coefficient, thus ensuring the objectivity and generalization ability of the threshold labeling. On a validation set independent of the training and test sets, this method uses prosodic stress coefficient as a classification variable. It iterates through candidate prosodic stress coefficient thresholds on the validation set, calculates the corresponding macro-average F1 score for each threshold, selects the threshold with the highest macro-average F1 score as the optimal cutoff value, and uses this optimal cutoff value as the second preset threshold. At the same time, it can plot the receiver operating characteristic curve and evaluate the overall discriminative ability of the prosodic stress coefficient to "whether prosodic is driven" by calculating the area under the curve (AUC), thus helping to verify the effectiveness of this feature. It should be noted that the F1 score is the harmonic mean of precision and recall, which can comprehensively evaluate the performance of the classification model at a given threshold. Precision represents the proportion of words that are actually prosodic-driven among those judged as prosodic-driven, while recall represents the proportion of words that are actually prosodic-driven and are correctly judged. The optimization objective is to maximize the harmonic mean of precision and recall, which can achieve a balance between precision and recall and avoid the threshold from being biased to either extreme. The macro-average F1 score is obtained by calculating the F1 scores of prosodic-driven and non-prosodic-driven classes separately and then taking the arithmetic mean. This can effectively eliminate the interference of the uneven proportion of positive and negative sample classes in the validation set on the selection of the threshold. If the value of the second preset threshold is too low, words driven by normal semantics will be misjudged as prosodic, triggering unnecessary semantic reconstruction and thus introducing semantic bias. If the value of the second preset threshold is too high, words that are truly driven by prosodicity will be missed, and the word selection distortion caused by prosodic constraints will not be effectively eliminated. By calculating the macro-average F1 score for each threshold on an independent validation set and selecting the optimal value, this method can achieve the best balance between precision and recall, so that the determination of the prosodic pressure coefficient has a data-driven statistical basis, rather than relying on a fixed value set by experience.
[0039] S330: Centered on the contextualized semantic vector representation, search in the semantic vector space for several nearest neighbor words with the highest similarity to the contextualized semantic vector representation, and exclude nearest neighbor words that satisfy the rhyme constraint.
[0040] S340: From the remaining nearest words, select the nearest word with the highest similarity to the corresponding contextualized semantic vector representation as the approximate word of the rhyme word, and replace the rhyme word with the approximate word; if the number of remaining nearest words is zero, then retain the corresponding rhyme word.
[0041] In an optional implementation, step S340 may select the nearest neighbor word with the highest cosine similarity to the corresponding contextualized semantic vector representation as the approximate word of the rhyming word.
[0042] S350: After processing all rhyming words, generate a semantic sequence.
[0043] Preferably, the number of nearest neighbor words K is determined by performing an ablation experiment on the labeled validation set; the ablation experiment uses the proportion of valid candidates after excluding nearest neighbor words that satisfy the rhyme constraints and the average semantic similarity between the restored word and the original word as evaluation indicators, and selects the value that maximizes the product of the evaluation indicators as the number of nearest neighbor words; It should be noted that the principle of determining the number of nearest neighbor words is that the K value needs to strike a balance between candidate sufficiency and semantic fidelity. When the K value is too small, there may be no effective candidates after excluding rhyming words, while when the K value is too large, the risk of semantic drift of candidate words increases. For example, in a validation set, when K=10, the proportion of valid candidate nearest neighbors after excluding rhyming words is 85%, the average semantic similarity is 0.75, and the product is 0.6375; while when K=50, the proportion of valid candidate nearest neighbors is 98%, but the average semantic similarity decreases to 0.60, and the product is 0.588. In this case, the value of K=10 is better than the value of K=50.
[0044] It should be noted that the purpose of excluding neighboring words that satisfy the rhyme constraints in step S330 is to ensure that the selected alternative word is "the word most likely to be used in normal context", rather than another rhyming word that is also driven by rhythm.
[0045] Specifically, the method proposed in this embodiment can achieve semantic restoration by replacing rhyming words with similar words. When there are no non-rhyming neighboring words that meet the requirements, the corresponding rhyming words can be retained unchanged to avoid introducing incorrect semantics through forced replacement.
[0046] Specifically, the AI-generated feature detection method for the semantic sequence in step S400 includes sentiment smoothness detection, please refer to [link to relevant documentation]. Figures 4-6 Among them, methods for AI-generated feature detection of semantic sequences through sentiment smoothness detection include: S410: Divide the semantic sequence into paragraphs, perform sentiment analysis on each paragraph, obtain the sentiment polarity value and sentiment activation degree of each paragraph, and construct the sentiment change curve of the semantic sequence based on the paragraph order, the sentiment polarity value and sentiment activation degree of each paragraph.
[0047] In step S410, the semantic sequence can be divided into sections such as verse, chorus, and bridge. The emotional polarity value can assess whether each section contains positive or negative tendencies, as well as the degree of the tendencies contained therein. The emotional activation can assess the intensity and / or smoothness of each section. The emotional change curve can reflect the dynamic evolution of the lyrics' emotions throughout the song.
[0048] S420: Based on the emotional polarity and emotional activation of each paragraph, calculate the amount of emotional change between adjacent paragraphs, and obtain the average and maximum values of each emotional change.
[0049] In one optional implementation, the formula for calculating the change in emotion includes:
[0050] in, This represents the difference in sentiment polarity between the i-th paragraph and the (i-1)-th paragraph. λ represents the difference in emotional activation between the i-th paragraph and the (i-1)-th paragraph, and λ represents a preset weight used to adjust the relative importance of the change in activation in the total change. For example, the value of λ can be determined through multiple experiments using actual datasets.
[0051] S430: If the average value is lower than the first fluctuation threshold and the maximum value is lower than the second fluctuation threshold, the emotion change curve is determined to be a smooth uniform curve, and the smoothness feature of the emotion change curve is used as the AI-generated lyrics detection feature of the lyrics text to be detected.
[0052] It should be noted that most large language models tend to generate sequences with smooth probability distributions in their decoding strategies. In the absence of explicit emotional control signals, they are unable to produce the emotional abrupt changes common in human creation. Therefore, lyrics created by humans usually show a sudden burst of emotion in the chorus, that is, the emotional change curve has a clear abrupt change point in the section entering the chorus. In contrast, the emotional changes in AI-generated lyrics are often too smooth and uniform, with low information entropy. This embodiment can quantify this difference by calculating the combined change in emotional polarity and emotional activation between adjacent sections. The emotional change considers changes in both emotional direction and emotional intensity, avoiding the possibility of missing emotional abrupt change types in a single-dimensional assessment.
[0053] Furthermore, the methods for determining the first fluctuation threshold and the second fluctuation threshold include: S431: Construct two sets of comparative datasets containing samples of lyrics created by humans and samples of lyrics generated by AI models.
[0054] It should be noted that the control dataset constructed in step S431 is independent of the training set used for tuning the prosodic stress coefficient related parameters.
[0055] S432: Calculate the significance probability values of the mean distribution and maximum value distribution in the two control datasets through statistical tests. If the significance probability value is less than the preset significance level threshold, it is determined that there is a significant difference between the two control datasets in the corresponding indicators.
[0056] In one specific implementation, the statistical test calculation method in step S432 may include a two-tailed t-test, and the significance level threshold may be set to 0.05.
[0057] It should be noted that if the significance probability value is greater than or equal to the significance level threshold, it indicates that there is no statistically significant difference between the average or maximum distribution of the emotional change in adjacent paragraphs of human-created lyrics samples and AI-generated lyrics samples on the current control dataset. In this case, this method can mark the fluctuation analysis of emotional change as an invalid feature under the current dataset, and reduce the weight of this feature or skip it in the comprehensive detection. That is, under the current distribution of lyric genre, language or style, the average or maximum value of emotional change does not have the statistical power to distinguish between human creation and AI generation, and the reliability of the detection result is low. It is not used as an independent judgment criterion. At this time, the comprehensive detection can be changed to rely on other effective features such as lexical richness fluctuation for detection, or the user can be prompted that the detection result is for reference only.
[0058] S433: On a validation set independent of the training and control datasets, using the mean and maximum values of each lyric sample as classification variables, iterate through the candidate combinations of the first and second fluctuation thresholds, with the optimization objective of maximizing detection accuracy or maximizing the harmonic mean of precision and recall, to determine the optimal threshold combination, and use this optimal combination as the first and second fluctuation thresholds.
[0059] Methods for AI-generated feature detection of semantic sequences based on lexical richness fluctuations include: S440: Divide the semantic sequence into paragraphs and calculate the lexical richness of each paragraph.
[0060] In this embodiment, the lexical richness (type-token ratio, TTR) is determined based on the ratio of the number of different words (Type) in a paragraph to the total number of words (Token).
[0061] S450: Calculate the variance of lexical richness between each paragraph to determine the semantic sequence gap. If the gap is lower than the fourth preset threshold, the gap is used as the AI-generated lyrics detection feature of the lyrics text to be detected.
[0062] Specifically, step S450 can calculate the variance of lexical richness between each paragraph, and use the variance as a reference index to comprehensively determine the degree of discrepancy of the semantic sequence; normalize the degree of discrepancy to a lexical uniformity score between 0 and 1. The higher the lexical uniformity score, the more uniform the lexical richness between each paragraph, and the more likely it is to be generated by AI; if the lexical uniformity score is not lower than the score value corresponding to the fourth preset threshold, the corresponding AI-generated feature score is obtained.
[0063] Further, the method for determining the fourth preset threshold comprises: calculating the variance of the inter-paragraph lexical richness of each lyric sample on an independent verification set, traversing candidate fourth preset thresholds, and selecting the threshold with the highest F1 score on the verification set as the fourth preset threshold with the goal of maximizing the F1 score.
[0064] For the case where the number of paragraphs is insufficient or the difference in paragraph lengths is too large, in a specific implementation manner, when the number of paragraphs of the to-be-detected lyrics is less than 3, the statistical reliability of the lexical richness fluctuation is insufficient. At this time, the weight of the lexical uniformity score is reduced in the comprehensive detection, or only the average value or the maximum value analysis of the emotional variation is used as the detection basis, and the note "The number of paragraphs is insufficient, and the detection result of lexical richness fluctuation is for reference only" is marked in the detection report; when the lengths of the paragraphs differ too much, equal-proportion paragraph resampling is performed according to the number of lines to make the lengths of the paragraphs substantially consistent before TTR calculation, so as to avoid the deviation caused by the difference in paragraph lengths to the statistics of lexical richness.
[0065] It should also be noted that human-created lyrics usually have a significant lexical richness gap between the verse and the chorus, where the chorus tends to use simple and repetitive words to enhance the memory point, while the verse is more narrative and lexically rich; in contrast, AI-generated lyrics often have a more uniform distribution of lexical richness across paragraphs and lack natural structural fluctuations. Therefore, the lexical richness gap can be used as an effective feature to distinguish human-created content from AI-generated content.
[0066] In addition, when selecting approximate words from neighbor words, multi-dimensional information such as part-of-speech matching degree, language model perplexity of the replaced sentence, and emotional polarity consistency can be further combined for comprehensive evaluation, and the weight of each evaluation dimension can be adjusted by the user according to the actual application scenario and the performance of the verification set; In a specific example, the second preset threshold is set to 0.80, inputting lyric texts including "I wander alone on the empty street", "Lights sink into the boundless vastness", "The familiar melody is still echoing" and "I am still hesitating facing tomorrow", the normalized word probabilities without rhyme constraint and with the "ang" rhyme constraint are calculated respectively using the same large language model and the same context, and the following Table 1 is obtained: Table 1 Rhyme word occurrence probability table
[0067] Since the second preset threshold is 0.80, the method proposed in this embodiment will perform semantic restoration on "wander", "vastness" and "hesitate" while retaining "echo". After screening the candidate words through contextual semantic vectors such as part-of-speech, context naturalness, semantic similarity and emotional deviation, the following Table 2 is obtained: Table 2 Rhyme word replacement table
[0068] Based on Table 2, the denoised semantic sequence can be obtained as follows: "I walk alone on the empty street", "The lights sink into the boundless night", "The familiar melody is still echoing", "I still hesitate in the face of tomorrow". After detecting the denoised semantic sequence of the complete lyrics, the lexical richness of each paragraph was 0.66, 0.65, 0.66, and 0.65, respectively, and the normalized lexical uniformity score was... The average value of sentiment smoothness was 0.87; the average value of sentiment variation was 0.12, and the maximum value was 0.24. The value is 0.82, using the formula. Calculate the overall score The calculation yielded S = 0.5 × 0.82 + 0.5 × 0.87 = 0.845, meaning the AI-generated lyrics tendency score was 0.845, which is higher than the judgment threshold of 0.70. Therefore, the lyrics were ultimately determined to be AI-generated. Furthermore, to calibrate the comprehensive score into a probabilistic AI generation probability, this embodiment can employ the Platt scaling method. Specifically, on a calibration set independent of the training, validation, and test sets, the comprehensive score S and its corresponding manually labeled y are collected for each sample, where y=1 indicates AI generation and y=0 indicates human creation. Platt scaling parameters a and b are fitted, and the comprehensive score S is mapped to the calibrated AI generation probability through a sigmoid transformation. The formula is:
[0069] In this study, parameters a and b were fitted using maximum likelihood estimation, with the optimization objective being to minimize the log loss on the calibration set. After calibration, the AI generation probability corresponding to the aforementioned comprehensive score S=0.845 was... The score is above the threshold of 0.70, therefore the lyrics are ultimately determined to be AI-generated. It should be noted that the calibration set and the validation set are independent of each other, which can ensure the objectivity and generalization ability of the calibration process. The probability value after calibration can be directly interpreted as the model's confidence in the judgment that "the lyrics are generated by AI", thus making it easier for users to understand the credibility of the detection results. This example exemplifies the entire process from raw input, RPI calculation, semantic reconstruction to final comprehensive scoring, verifying that the proposed method can effectively expose the emotional smoothness and lexical uniformity of AI-generated lyrics after eliminating prosodic interference.
[0070] In another specific example, a human lyricist created a classical Chinese-style song, using a large number of classical Chinese words with neat parallelism, such as "long pavilion," "ancient abyss," and "returning geese." This song is easily marked as "high-probability AI-generated" by existing AI detection tools. However, the method proposed in this embodiment analyzes the prosodic pressure coefficient and finds that the probability of these words appearing is greatly increased due to prosodic constraints. This indicates that these words are driven by strict prosodic and parallel constraints. The prosodic pressure coefficient exceeds the second preset threshold. After correction in step S300, the denoised semantic sequence can show obvious human creation characteristics, namely, the maximum value of the emotional change in the lyrics is high, there is a sudden burst in the chorus, the variance of the vocabulary richness between paragraphs is large, there is a significant gap between the verse and the chorus, and the overall score is lower than the judgment threshold. Finally, it is determined that the song is not AI-generated.
[0071] When sentiment change analysis and vocabulary richness fluctuation detection are used in combination, this embodiment can use a weighted comprehensive score as the main implementation scheme. The specific steps are as follows: The results of the sentiment variability analysis and sentiment smoothness test were normalized to a sentiment smoothness score between 0 and 1. The results of the vocabulary richness fluctuation detection are normalized to a vocabulary uniformity score between 0 and 1. The higher the emotional smoothness score and the lexical uniformity score, the more likely it is to be generated by AI; The overall score is calculated based on weights determined on the validation set with the objective of maximizing overall detection accuracy. ,in and For preset weights and The default weight can be set to And when the single-item accuracy of one detection method is significantly higher than that of another on the validation set, the weight ratio of that method is increased accordingly. When the comprehensive score S is not lower than the comprehensive judgment threshold, the lyrics are judged to be AI-generated; otherwise, they are judged to be non-AI-generated. If the text is judged to be AI-generated based on one of the emotional smoothness score and the vocabulary uniformity score, while the other is judged to be non-AI-generated, the method proposed in this embodiment will use the comprehensive score as the final judgment basis, thereby avoiding the limitation of single detection features from interfering with the final judgment result.
[0072] It should be noted that in this embodiment, perplexity is used to illustrate that traditional detection methods are easily interfered with by low-frequency rhyming words, and is not the only final judgment indicator. The method proposed in this embodiment eliminates the lexical probability shift caused by prosodic constraints through RPI and semantic restoration, uses the degree of emotional change and the fluctuation of lexical richness between paragraphs as AI-generated features, and uses semantic restoration to make the above features more realistically reflect the semantic evolution and structural differences of lyrics, which can effectively avoid the interference of low-frequency rhyming words on the detection results.
[0073] Preferably, after completing the AI-generated feature detection, step S400 will also generate and output a structured detection report based on the intermediate data and final judgment results during the detection process. The detection report not only includes the judgment conclusion on whether the lyrics text to be detected is generated by AI, but also provides multi-dimensional interpretability analysis to help users understand the detection basis and enhance the credibility and practicality of the detection results. For example, the detection report may include the file name and text summary of the identified lyrics text to be detected, the detection timestamp, the final AI generation probability score or comprehensive judgment result, the prosody analysis results of steps S100-S300, which may specifically include a rhyme recognition overview, a comparison table of prosodic pressure coefficient and semantic restoration, and AI feature detection details, such as the results of emotion change analysis, the results of vocabulary richness fluctuation detection, the comprehensive confidence score, and the risk warning content.
[0074] It should be noted that the technical effectiveness of the method proposed in this embodiment can be verified through comparative experiments. For example, an annotated dataset containing human-created lyrics and AI-generated lyrics can be constructed. Under the conditions of using the same AI detection model, the same data partitioning, and the same judgment threshold, the original lyrics and the semantic sequence after RPI correction can be detected respectively. At least one of accuracy, F1 score, and AUC can be used as evaluation indicators. By comparing the detection results before and after correction, the effect of RPI correction on reducing prosodic interference and improving detection performance can be determined. Ablation experiments can also be conducted by removing the RPI calculation step or the semantic restoration step respectively to determine the contribution of each step to the detection results.
[0075] Example 2 Please see Figure 7 This embodiment proposes a system for detecting AI-generated lyrics, used to implement the method for detecting AI-generated lyrics proposed in Embodiment 1. The system specifically includes: The recognition module 10 is used to recognize the lyrics text to be detected segment by segment. It uses the vowel or final syllable pattern at the end of each sentence in each segment of the lyrics text to be detected as rhyme constraints, and identifies words in the lyrics text to be detected that are at the end of each sentence in each segment and whose rhyme patterns match the rhyme constraints as rhyme words. The calculation module 20 is used to calculate the prosodic pressure coefficient of each rhyming word when the rhyme coverage of the lyrics text to be detected is not lower than the first preset threshold. The prosodic pressure coefficient is determined based on the comparison between the first occurrence probability under the condition of no prosodic constraint and the second occurrence probability under the condition of rhyme constraint, and is used to quantify the degree of directional shift of the prosodic constraint on the selection probability of each rhyming word. The replacement module 30 is used to replace each rhyming word in the lyrics text to be detected with a corresponding approximate word based on the prosodic pressure coefficient through semantic restoration, thereby generating a semantic sequence. The detection module 40 is used to perform AI-generated feature detection on the semantic sequence and determine whether the lyrics text to be detected is AI-generated based on the detection results; and when the rhyme coverage of the lyrics text to be detected is lower than the first preset threshold, the lyrics text to be detected is used as a semantic sequence for AI-generated feature detection.
[0076] Specifically, the recognition module 10 pre-acquires all languages contained in the lyrics text to be detected, and extracts the pronunciation units at the end of each sentence in the lyrics text to be detected according to the rhyme recognition method corresponding to each language in the text. Based on the pronunciation similarity of the pronunciation units, it performs equivalent clustering on each pronunciation unit, and classifies the pronunciation units with the same pronunciation or those that meet the preset similarity rules into the same candidate rhyme category; it counts the frequency of each candidate rhyme category at the end of each sentence in each paragraph, and selects at least one candidate rhyme category as the main rhyme category of the corresponding paragraph according to the frequency from high to low; or, it calculates the rhyme coverage rate of each candidate rhyme category, and determines the candidate rhyme category with the rhyme coverage rate exceeding the preset coverage threshold as the main rhyme category of the corresponding paragraph; finally, it determines the vowel or final syllable pattern corresponding to the pronunciation units belonging to the main rhyme category in each paragraph as the rhyme constraint.
[0077] Rhyme coverage is the ratio of the number of rhyming words at the end of a sentence to the total number of words at the end of all sentences in the lyrics text to be detected. If the rhyme coverage of the lyrics text to be detected is lower than the first preset threshold, it indicates that the prosodic pattern of the lyrics is not significant. The system proposed in this embodiment will judge the lyrics text to be detected as having no significant prosodic pattern, and the detection module 40 will perform steps based on the lyrics text to be detected as the original semantic sequence, and mark "no significant prosodic pattern detected, no prosodic correction performed" in the final output detection report. The specific value of the first preset threshold can be determined by analyzing the rhyme coverage distribution on the labeled dataset.
[0078] Specifically, the calculation module 20 can calculate the first probability of a rhyming word appearing at the current rhyme position using a large language model without imposing prosodic constraints, and the second probability of a rhyming word appearing at the current rhyme position using a large language model under prosodic constraints; when the first probability of occurrence... Less than the probability of the second occurrence When calculating the logarithm of the ratio of the second occurrence probability to the first occurrence probability, the larger value between the logarithm and zero is taken as the prosodic pressure coefficient (RPI) of the rhyming word; and when the first occurrence probability is greater than or equal to the second occurrence probability, the prosodic pressure coefficient of the rhyming word is determined to be zero; in another optional embodiment, when it is determined that the first occurrence probability is greater than or equal to the second occurrence probability, the calculation module 20 may choose not to calculate the prosodic pressure coefficient of the rhyming word.
[0079] The replacement module 30 can retain rhyming words with a prosodic pressure coefficient lower than or equal to a second preset threshold, and perform context encoding on rhyming words with a prosodic pressure coefficient higher than the second preset threshold. Combining the context information of the sentence where the rhyming word is located and the adjacent sentences, it obtains the contextualized semantic vector representation of the rhyming word in the current lyrics context. Centered on the contextualized semantic vector representation, it searches in the semantic vector space for several nearest neighbors with the highest similarity to the contextualized semantic vector representation, and excludes nearest neighbors that meet the rhyme constraints. From the remaining nearest neighbors, it selects the nearest neighbor with the highest similarity to the corresponding contextualized semantic vector representation as the approximate word of the rhyming word, and replaces the rhyming word with the approximate word. If the number of remaining nearest neighbors is zero, the corresponding rhyming word is retained. Finally, after processing all rhyming words, a semantic sequence is generated.
[0080] The detection module 40 performs AI-generated feature detection on semantic sequences using at least one of the following methods: sentiment change analysis detection and lexical richness fluctuation detection. These two methods can be combined to improve detection robustness. Specifically, the method of performing AI-generated feature detection on semantic sequences using sentiment change analysis includes: The semantic sequence is divided into paragraphs, and sentiment analysis is performed on each paragraph to obtain the sentiment polarity value and sentiment activation level of each paragraph. A sentiment change curve of the semantic sequence is constructed based on the paragraph order, the sentiment polarity value and sentiment activation level of each paragraph. Based on the sentiment polarity value and sentiment activation level of each paragraph, the amount of sentiment change between adjacent paragraphs is calculated, and the average and maximum values of each sentiment change are obtained. If the average value is lower than the first fluctuation threshold and the maximum value is lower than the second fluctuation threshold, the sentiment change curve is determined to be a smooth uniform curve, and the smoothness feature of the sentiment change curve is used as the AI-generated lyrics detection feature of the lyrics text to be detected.
[0081] It should be noted that the detection module 40 can construct two sets of control datasets containing human-created lyrics samples and AI-generated lyrics samples. Through statistical tests, the significance probability values of the mean distribution and maximum value distribution in the two sets of control datasets are calculated respectively. If the significance probability value is less than the preset significance level threshold, it is determined that there is a significant difference between the two sets of control datasets in the corresponding indicators. On the validation set independent of the training set and control dataset, the mean and maximum value of each lyrics sample are used as classification variables. The combination of candidate first fluctuation threshold and second fluctuation threshold is traversed. The optimal threshold combination is determined with the optimization objective of maximizing the detection accuracy or maximizing the harmonic mean of precision and recall. This optimal combination is then used as the first fluctuation threshold and the second fluctuation threshold.
[0082] The methods for AI-generated feature detection of semantic sequences based on lexical richness fluctuations include: The semantic sequence is divided into paragraphs, and the lexical richness of each paragraph is counted. The variance of the lexical richness between each paragraph is calculated to determine the discrepancy of the semantic sequence. If the discrepancy is lower than the fourth preset threshold, the discrepancy is used as the AI-generated lyrics detection feature of the lyrics text to be detected.
[0083] In this embodiment, the lexical richness (type-token ratio, TTR) is determined based on the ratio of the number of different words (Type) in a paragraph to the total number of words (Token).
[0084] In summary, this invention provides a method and system for detecting AI-generated lyrics. The proposed solution effectively captures the unnatural bias in word selection driven by rhyme through the prosodic pressure coefficient, and uses semantic restoration to restore words distorted by rhyme to a more natural semantic expression. This reduces interference factors before detection, allowing the detection to focus more on semantic logic, and helps improve the accuracy and targeting of the detection.
[0085] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for detecting AI-generated lyrics, characterized in that, The method includes: The lyrics text to be detected is identified segment by segment. The final vowel or final syllable pattern at the end of each sentence in each segment of the lyrics text to be detected is used as the rhyme constraint. The words in the lyrics text to be detected that are at the end of each sentence in each segment and whose rhyme pattern matches the rhyme constraint are identified as rhyming words. If the rhyme coverage rate of the lyrics text to be detected is not lower than a first preset threshold, the prosodic pressure coefficient of each rhyming word is calculated; the rhyme coverage rate is the proportion of the number of sentence-final words identified as rhyming words to the total number of sentence-final words in the lyrics text to be detected; the prosodic pressure coefficient is determined based on the comparison result of the first occurrence probability under the condition of no prosodic constraint and the second occurrence probability under the condition of rhyme constraint, and is used to quantify the degree of directional shift of the prosodic constraint on the selection probability of each rhyming word; By using semantic restoration, each rhyming word in the lyrics text to be detected is replaced with a corresponding approximate word based on the prosodic pressure coefficient, thereby generating a semantic sequence; if the rhyme coverage of the lyrics text to be detected is lower than the first preset threshold, the lyrics text to be detected is used as a semantic sequence. The semantic sequence is subjected to AI-generated feature detection, and the detection results are used to determine whether the lyrics text to be detected is AI-generated.
2. The method according to claim 1, characterized in that, Methods for calculating the prosodic pressure coefficient of rhyming words include: Without imposing the prosodic constraints, a first probability of occurrence of the rhyming word at the current rhyming position is calculated using a large language model; and, with the prosodic constraints imposed, a second probability of occurrence of the rhyming word at the current rhyming position is calculated using the large language model; both the first probability of occurrence and the second probability of occurrence are greater than zero. If the first probability of occurrence is less than the second probability of occurrence, calculate the logarithm of the ratio of the second probability of occurrence to the first probability of occurrence, and take the larger value between the logarithm and zero as the prosodic pressure coefficient of the rhyming word; If the first probability of occurrence is greater than or equal to the second probability of occurrence, the prosodic pressure coefficient of the rhyming word is determined to be zero.
3. The method according to claim 2, characterized in that, The methods for calculating the first occurrence probability and the second occurrence probability include: When the rhyming word is a word-based word, the probability values of the corresponding word elements in the rhyming word output by the large language model directly determine the first occurrence probability and the second occurrence probability. When the rhyming word is a multi-element word, the large language model sequentially outputs the conditional probabilities of each lexical element after the rhyming word is segmented under the preceding context, calculates the logarithmic average of the conditional probabilities, and determines the first occurrence probability and the second occurrence probability based on the logarithmic average.
4. The method according to claim 1, characterized in that, The method for generating the semantic sequence through semantic reduction includes: Retain all rhyming words whose prosodic pressure coefficient is lower than or equal to a second preset threshold; For each rhyme word whose prosodic pressure coefficient is higher than the second preset threshold, context encoding is performed, and the contextualized semantic vector representation of the rhyme word in the current lyrics context is obtained by combining the context information of the sentence in which the rhyme word is located and the adjacent sentences. Centered on the contextualized semantic vector representation, search in the semantic vector space for several nearest neighbor words with the highest similarity to the contextualized semantic vector representation, and exclude nearest neighbor words that satisfy the rhyme constraint; From the remaining nearest neighbor words, select the nearest neighbor word with the highest similarity to the corresponding contextualized semantic vector representation as the approximate word of the rhyme word, and replace the rhyme word with the approximate word; if the number of remaining nearest neighbor words is zero, then retain the corresponding rhyme word; After processing all the rhyming words, the semantic sequence is generated.
5. The method according to claim 4, characterized in that, The number of nearest neighbor words is determined by performing an ablation experiment on the labeled validation set. The ablation experiment uses the proportion of valid candidates after excluding nearest neighbor words that satisfy the rhyme constraints and the average semantic similarity between the restored word and the original word as evaluation indicators. The value that maximizes the product of the evaluation indicators is selected as the number of nearest neighbor words.
6. The method according to claim 1, characterized in that, Methods for AI-generated feature detection of semantic sequences include: The semantic sequence is divided into paragraphs, and sentiment analysis is performed on each paragraph to obtain the sentiment polarity value and sentiment activation degree of each paragraph. The sentiment change curve of the semantic sequence is constructed based on the paragraph order, the sentiment polarity value and sentiment activation degree of each paragraph. Based on the emotional polarity and emotional activation of each paragraph, the amount of emotional change between adjacent paragraphs is calculated, and the average and maximum values of each amount of emotional change are obtained. If the average value is lower than the first fluctuation threshold and the maximum value is lower than the second fluctuation threshold, the emotion change curve is determined to be a smooth uniform curve, and the smoothness feature of the emotion change curve is used as the AI-generated lyrics detection feature of the lyrics text to be detected.
7. The method according to claim 6, characterized in that, The method for determining the first fluctuation threshold and the second fluctuation threshold includes: Two sets of control datasets were constructed, containing samples of lyrics created by humans and samples of lyrics generated by AI models; the control datasets were independent of the training set. Calculate the average and maximum values of the emotional change between adjacent paragraphs for each lyric sample in the control dataset; The significance probability values of the mean distribution and maximum value distribution in the two control datasets are calculated by statistical test. If the significance probability value is less than the preset significance level threshold, it is determined that there is a significant difference between the two control datasets in the corresponding indicators. On a validation set independent of the training set and the control dataset, using the average and maximum values of each lyric sample as classification variables, the candidate combinations of the first fluctuation threshold and the second fluctuation threshold are iterated through. With the optimization objective of maximizing detection accuracy or maximizing the harmonic mean of precision and recall, the optimal threshold combination is determined and used as the first fluctuation threshold and the second fluctuation threshold.
8. The method according to claim 1 or 2, characterized in that, Methods for AI-generated feature detection of semantic sequences also include: The semantic sequence is divided into paragraphs, and the lexical richness of each paragraph is calculated. The lexical richness is determined based on the ratio of the number of different words in the paragraph to the total number of words. The variance of lexical richness among the paragraphs is calculated to determine the disparity of the semantic sequence. If the disparity is lower than a fourth preset threshold, the disparity is used as the AI-generated lyrics detection feature of the lyrics text to be detected.
9. The method according to claim 1, 4, or 5, characterized in that, Methods for determining rhyme constraints include: Obtain all languages contained in the lyrics text to be detected; Based on the rhyme recognition method corresponding to each of the aforementioned languages, the pronunciation units at the end of each sentence in the lyrics text to be detected are extracted; Based on the similarity of pronunciation of the pronunciation units, equivalent clustering is performed on each of the pronunciation units, and pronunciation units with the same pronunciation or that meet the preset similarity rules are grouped into the same candidate rhyme category; The frequency of each candidate rhyme category appearing at the end of each sentence in each paragraph is counted, and at least one candidate rhyme category is selected as the main rhyme category of the corresponding paragraph according to the frequency from high to low; or, the rhyme coverage rate of each candidate rhyme category is calculated, and the candidate rhyme category with the rhyme coverage rate exceeding the preset coverage threshold is determined as the main rhyme category of the corresponding paragraph. The vowel or final syllable pattern corresponding to the pronunciation unit belonging to the main rhyme category in each paragraph is determined as the rhyme constraint.
10. A system for detecting AI-generated lyrics, characterized in that, The system includes: The recognition module is used to recognize the lyrics text to be detected segment by segment, and to use the vowel or final syllable pattern at the end of each sentence in each segment of the lyrics text to be detected as rhyme constraints, and to identify the words in the lyrics text to be detected that are at the end of each sentence in each segment and whose rhyme pattern matches the rhyme constraints as rhyme words. The calculation module is used to calculate the prosodic pressure coefficient of each rhyming word when the rhyme coverage rate of the lyrics text to be detected is not lower than a first preset threshold; the rhyme coverage rate is the proportion of the number of sentence-final words identified as rhyming words to the total number of sentence-final words in the lyrics text to be detected; the prosodic pressure coefficient is determined based on the comparison result of the first occurrence probability under the condition of no prosodic constraint and the second occurrence probability under the condition of rhyme constraint, and is used to quantify the degree of directional shift of the prosodic constraint on the selection probability of each rhyming word; The replacement module is used to replace each rhyming word in the lyrics text to be detected with a corresponding approximate word based on the prosodic pressure coefficient through semantic restoration, thereby generating a semantic sequence. The detection module is used to perform AI-generated feature detection on the semantic sequence and determine whether the lyrics text to be detected is AI-generated based on the detection results; and when the rhyme coverage of the lyrics text to be detected is lower than the first preset threshold, the lyrics text to be detected is used as a semantic sequence for AI-generated feature detection.